Skip to content

spaCy use of "pickle"? #13368

Discussion options

You must be logged in to vote

When you call spacy.load(package_name), you're loading a package you downloaded previously, and so this can execute code (it's the same as importing it).

If you call the Language.from_disk() or Language.from_bytes() methods, that's not supposed to execute code. You can distribute binary models to a service and that service won't execute arbitrary things.

Within the spacy.load() method, you'll also only execute code that's in installed modules. So you can audit the code that's to be executed --- it will be things in your installed packages, not some new code that's hiding in the binary.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by svlandeg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat / serialize Feature: Serialization, saving and loading
2 participants