Build your first ML pipelines with ZenML.
Then open notebooks/quickstart.ipynb to get started.
This quickstart demonstrates some of ZenML's features. We will:
- Import some data from a public dataset (Adult Census Income), then train two models (SGD and Random Forest)
- Compare and evaluate which model performs better, and deploy the best one.
- Run a prediction on the deployed model.
Along the way we will also show you how to:
- Automatically version, track, and cache data, models, and other artifacts,
- Track model hyperparameters and metrics in an experiment tracking tool
You can use Google Colab to see ZenML in action, no signup / installation required!
To run locally, install ZenML and pull this quickstart:
# Install ZenML
pip install "zenml[server]"
# clone the ZenML repository
git clone https://github.com/zenml-io/zenml.git
cd zenml/examples/quickstart
Now we're ready to start. You have two options for running the quickstart locally:
pip install notebook
jupyter notebook
# open notebooks/quickstart.ipynb
# Install required zenml integrations
zenml integration install sklearn mlflow -y
# Initialize ZenML
zenml init
# Start the ZenServer to enable dashboard access
zenml up
# Register required ZenML stack
zenml experiment-tracker register mlflow_tracker --flavor=mlflow
zenml model-deployer register mlflow_deployer --flavor=mlflow
zenml model-registry register mlflow_registry --flavor=mlflow
# Register a new stack with the new stack components
zenml stack register quickstart_stack -a default\
-o default\
-d mlflow_deployer\
-e mlflow_tracker\
-r mlflow_registry\
--set
# Run the quickstart script
python run.py
You can also take a look at our dashboard where you can inspect the quickstart pipeline run and much more. Simply execute:
# only once you've already run `zenml up`
zenml show
To clean up, simply spin down the ZenML server.
zenml down
If you want to learn more about ZenML as a tool, then the 📄 ZenML Docs are the perfect place to get started.
Already have an MLOps stack in mind? ZenML most likely has 🔗 Integrations for whatever tools you plan to use.
Also, make sure to join our Slack Community to become part of the ZenML family!