Productionizing custom trained spacy pipelines #10448
-
Hello!I have been working on an entity based sentiment analyzer using spacy. I have custom trained both components and have my final model. I used the package command of spacy to get the model as a spacy package. However, using this package command also exposes my pipeline code. Currently I am using a simple API to deploy and test the model. While it works for internal distribution, I wanted to know if there are other ways in which spacy packages and models can be deployed in a production setting without exposing our custom codes to the user. Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @shrinidhin , if you have already written an API, perhaps you can expose those entrypoints in a separate package (i.e., create a package that separates your API calls to the actual business logic), and obfuscate the latter using Cython. In the end, you can produce |
Beta Was this translation helpful? Give feedback.
Hi @shrinidhin , if you have already written an API, perhaps you can expose those entrypoints in a separate package (i.e., create a package that separates your API calls to the actual business logic), and obfuscate the latter using Cython. In the end, you can produce
.so
/.dll
files that may be hard to reverse-engineer. Note that whenever you compile using Cython, you need to compile it into a specific platform, but you can probably circumvent that by just compiling into Linux and "hosting" it via Docker.