Task Queue ML Model Deployment
Code to deploy an ML model as a task in a task queue.
This code is used in this blog post.
Installation
The makefile included with this project contains targets that help to automate several tasks.
To download the source code execute this command:
Then create a virtual environment and activate it:
cd task-queue-ml-model-deployment
make venv
source venv/bin/activate
Install the dependencies:
Running the unit tests
To run the unit test suite execute these commands:
make test-dependencies
# run the test suite
make test
Making a Deployment Package
To create a tarball deployment package for the worker nodes, use this command:
Starting a Worker Process
To start a worker process execute these commands:
export APP_SETTINGS=ProdConfig
export PYTHONPATH=./
python3 -m model_task_queue --loglevel INFO