Training models inside notebooks is easy. Unfortunately, this is not enough when you want to build complete ML solutions for real-world problems.
In this hands-on tutorial you will learn how to
- train an ML model that predicts crypto prices, and
- deploy this model as a REST API
We will use Serverless ML tools to
- track experiment runs and publish our best model to the registy, with CometML.
- deploy the model as a REST API, with Cerebrium.
Without further ado, let's get to work!
-
Create a Python virtual environment with all project dependencies with
$ make init
-
Set your API keys for CometML and Cerebrium as environment variables.
$ . ./set_environment_variables.sh
-
Download historical data from Coinbase and save it locally to disk
$ make data
-
Train ML model
$ make train
-
Deploy the model
$ make deploy
-
Test the endpoint works
$ make test-endpoint
- Get data from Coinbase
- Transform ts data into supervised ML data
- Engineer a few features using technical indicators
- Train a decent model with linear regression
- Fix bug when computing tech indicators from raw prices
- Deploy the modelLightGBMRegressor
- Webhooks
- Add secrets to GitHub
- Trigger workflow from Comet ML model registry
- Optimize model hyper-parameter with out-of-time cross validation use