ate, please join our Slack and leave us a message!Generating project from a project template

First, to use the templates, you need to have ZenML and its templates extras installed:

pip install zenml[templates]

Now, you can generate a project from one of the existing templates by using the --template flag with the zenml init command:

zenml init --template <short_name_of_template>

# example: zenml init --template e2e_batch

Running the command above will result in input prompts being shown to you. If you would like to rely on default values for the ZenML project template - you can add --template-with-defaults to the same command, like this:

zenml init --template <short_name_of_template> --template-with-defaults

# example: zenml init --template e2e_batch --template-with-defaults

Creating your own ZenML template

Creating your own ZenML template is a great way to standardize and share your ML workflows across different projects or teams. ZenML uses Copier to manage its project templates. Copier is a library that allows you to generate projects from templates. It's simple, versatile, and powerful.

Here's a step-by-step guide on how to create your own ZenML template:

Create a new repository for your template. This will be the place where you store all the code and configuration files for your template.

Define your ML workflows as ZenML steps and pipelines. You can start by copying the code from one of the existing ZenML templates (like the starter template) and modifying it to fit your needs.

Create a copier.yml file. This file is used by Copier to define the template's parameters and their default values. You can learn more about this config file in the copier docs.

Test your template. You can use the copier command-line tool to generate a new project from your template and check if everything works as expected:

copier copy https://github.com/your-username/your-template.git your-project