Training and deploying with XGBoost and Sagify
Sagify is a CLI tool that minimizes the amount of work required to train and deploy models on SageMaker (https://github.com/Kenza-AI/sagify). You write a training function and a prediction function, and Sagify takes care of the rest, both locally and on SageMaker.
Note:
At the time of writing, Sagify hasn't been updated for SageMaker SDK v2. If that's still not the case by the time this book is in your hands, please make sure to install SDK v1 in your virtual environment.
Installing Sagify
You only need to run these steps once. If you need more details, you can find them at https://kenza-ai.github.io/sagify/#installation:
- We create a virtual environment and activate it:
$ virtualenv sagify-demo $ source sagify-demo/bin/activate
- We install the dependencies:
$ pip install sagify pandas
- We update our local AWS credentials with the SageMaker role in
~/.aws/config
. The file should look similar to this:[default...