Model development#
Train the pipeline components#
- Install dependencies:
poetry install(CUDA 11.1 is supported out-of-the-box)- To enable full GPU usage install PyTorch:
poetry run python -m pip install torch==1.10.2+cu111 -f https://download.pytorch.org/whl/torch_stable.html - Run
poetry run pip install -U pip setuptools wheelif these packages are missing or not uptodate
- To enable full GPU usage install PyTorch:
- Activate the virtual environment
poetry shell - Fetch datafiles:
spacy project assets - Build all the models:
spacy project run all
Fine-tune the models#
Hyperparameters of the underlying models can be fine-tuned using Weights&Biases: wandb sweep with one of the sweep_*.yml config file.
Publish models#
- Make sure dependencies are up-to-date:
poetry update - Bump version:
bumpversion --new-version x.x.x major/micro/patch --verbose - Build the model as described in the previous section
- Publish the new model to Hugging Face Hub:
poetry run spacy project run publish(must be executed in the model's directory)