-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CLI for inspection, and conversion to skops format, of sklearn pickle files #241
Comments
It will simply be a script with argument parser? Is there anything else on top of this? |
Maybe we could add a utility function to |
We would also need to define an entry point: |
Picking this up :) |
So I'm working on this, and I want to double check I'm not missing something: To check a pkl file is "trusted" or not, or convert it, we need to call Double checking I've not missed a method or API we already have for this. |
Yes, it involves loading the pickled object. That's a good point. So the help of those commands should emphasize that this will happen and what it implies. |
Right now the tree can only be constructed from a skops file, not a pickle file/object, and there isn't much of a point to try and check security once the object is loaded anyway. If the pickle file is compromised, the act of loading it runs arbitrary code. So as far as security goes, we only tell users that loading arbitrary pickle files can run arbitrary code, and then we convert the file. Once the file is converted, we can tell them which types they'd need to pass as trusted to load the file. This is also what I did in this space: https://huggingface.co/spaces/adrin/pickle-to-skops |
Yes, it should be framed as "unknown types", not "untrusted". |
It would be useful for skops to provide a CLI that allows to find the untrusted types in an sklearn pickle file, and to convert it to the skops format.
Details have yet to be discussed, but it could look something like this:
The text was updated successfully, but these errors were encountered: