Installation

TL;DR: Do pip install zenml to install.

Welcome

Your first step is to install ZenML, which comes bundled as a good old pip package. Please note that we only support Python >= 3.6, so please adjust your pip accordingly.

Virtual Environment

Also, we highly encourage you to install ZenML in a virtual environment. We install dependencies like PyArrow and Tensorflow that might cause your base installations to be overridden.

We like to use virtualenvwrapper to manage our Python virtual environments.

Install with pip

When you're set with your environment, run:

pip install zenml
`ZenML` requires >= Python 3.6 and < Python 3.9.0

Alternatively, if you’re feeling brave, feel free to install the bleeding edge: NOTE: Do so on your own risk, no guarantees given!

pip install git+https://github.com/maiot-io/[email protected] --upgrade

Integrations

The ZenML base package does not come up with all integrations pre-installed. Read more here. To install an integration, use the pattern:

pip install zenml[INTEGRATION]

e.g.

pip install zenml[pytorch]

Use the keyword all in the square brackets if you would like to install all integrations.

Once the installation is completed, you can check whether the installation was successful through:

Bash

zenml version

Python

import zenml
print(zenml.utils.version.__version__)

If you would like to learn more about the current release, please visit the PyPi homepage.

Enabling auto-completion on the CLI

For Bash, add this to ~/.bashrc:

eval "$(_ZENML_COMPLETE=source_bash zenml)"

For Zsh, add this to ~/.zshrc:

eval "$(_ZENML_COMPLETE=source_zsh zenml)"

For Fish, add this to ~/.config/fish/completions/foo-bar.fish:

eval (env _ZENML_COMPLETE=source_fish zenml)

Tensorflow Model Analysis support

In order to get the Tensorflow Model Analysis evaluation visualizations to work, you must also run:

jupyter nbextension install --py --symlink tensorflow_model_analysis
jupyter nbextension enable --py tensorflow_model_analysis
If you encounter a `File already exists in database error` error after the first command, this is most likely due to a [known bug](https://stackoverflow.com/questions/59165505/file-already-exists-in-database-error-from-protobuf-when-deploying-google-datafl) with one of our dependencies, namely [PyArrow](https://pypi.org/project/pyarrow/). Unfortunately, this will cause some features to not work on your machine \(namely pipeline evaluate and compare\).
We are aware of this issue and are working hard to fix it. A future release of `zenml` will fix this issue.