Best way to package spacy models for cloud

Hi!

What's the best way to package spacy models to be deployed on AWS EC2? Looking for a way that makes swapping/replacing models not too complicated as well.

Thanks!

hi @ChinmayR!

Are you aware of the spacy package command?

After you've trained a model, this line will convert the model into a python package.

But along the same idea, are you using spaCy projects, which was created with spaCy 3.0?

It provides a full end-to-end (e.g., asset fetching, annotation, training, and package creation) through a standard project.yml file. In addition, the config.cfg file can allow you to provide more detailed customization of your model training (e.g., tune hyperparameters) beyond the default config.cfg that is run when you use prodigy train.

There's great spaCy project documentation that's available along with this great blog post from my colleague @ljvmiranda921.

Be sure to check out this documentation on how to integrate Prodigy with spaCy projects and the accompanying template project.

spaCy projects are not unique to just a cloud -- they can work too locally. But I usually would put my spaCy projects on GitHub to enable me to clone easily to either the cloud (e.g., develop the package locally but then clone it on a cloud instance).

Let me know if this helps or if you're looking for something different.

Hey Ryan! Nice to see you again.

I apologize for the late reply. Yup, that's what I wanted. Thanks for the help once again!