Cli
ZenML CLI.
The ZenML CLI tool is usually downloaded and installed via PyPI and a
pip install zenml
command. Please see the Installation & Setup
section above for more information about that process.
How to use the CLI
Our CLI behaves similarly to many other CLIs for basic features. In order to find out which version of ZenML you are running, type:
zenml version
If you ever need more information on exactly what a certain command will
do, use the --help
flag attached to the end of your command string.
For example, to get a sense of all the commands available to you
while using the zenml
command, type:
zenml --help
If you were instead looking to know more about a specific command, you can type something like this:
zenml artifact-store register --help
This will give you information about how to register an artifact store. (See below for more on that).
If you want to instead understand what the concept behind a group is, you
can use the explain
sub-command. For example, to see more details behind
what a artifact-store
is, you can type:
zenml artifact-store explain
This will give you an explanation of that concept in more detail.
Beginning a Project
In order to start working on your project, initialize a ZenML repository within your current directory with ZenML's own config and resource management tools:
zenml init
This is all you need to begin using all the MLOps goodness that ZenML provides!
By default, zenml init
will install its own hidden .zen
folder
inside the current directory from which you are running the command.
You can also pass in a directory path manually using the
--path
option:
zenml init --path /path/to/dir
If you wish to use one of the available ZenML project templates
to generate a ready-to-use project scaffold in your repository, you can do so by
passing the --template
option:
zenml init --template <name_of_template>
Running the above command 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 <name_of_template> --template-with-defaults
In a similar fashion, if you would like to quickly explore the capabilities of ZenML through a notebook, you can also use:
zenml go
Cleaning up
If you wish to delete all data relating to your workspace from the
directory, use the zenml clean
command. This will:
- delete all pipelines, pipeline runs and associated metadata
- delete all artifacts
Using Integrations
Integrations are the different pieces of a project stack that enable custom
functionality. This ranges from bigger libraries like
kubeflow
for orchestration down to smaller
visualization tools like facets
. Our
CLI is an easy way to get started with these integrations.
To list all the integrations available to you, type:
zenml integration list
To see the requirements for a specific integration, use the requirements
command:
zenml integration requirements INTEGRATION_NAME
If you wish to install the integration, using the requirements listed in the
previous command, install
allows you to do this for your local environment:
zenml integration install INTEGRATION_NAME
Note that if you don't specify a specific integration to be installed, the ZenML CLI will install all available integrations.
If you want to install all integrations apart from one or multiple integrations,
use the following syntax, for example, which will install all integrations
except feast
and aws
:
zenml integration install -i feast -i aws
Uninstalling a specific integration is as simple as typing:
zenml integration uninstall INTEGRATION_NAME
For all these zenml integration
commands, you can pass the --uv
flag and we
will use uv
as the package manager instead of pip
. This will resolve and
install much faster than with pip
, but note that it requires uv
to be
installed on your machine. This is an experimental feature and may not work on
all systems. In particular, note that installing onto machines with GPU
acceleration may not work as expected.
If you would like to export the requirements of all ZenML integrations, you can use the command:
zenml integration export-requirements
Here, you can also select a list of integrations and write the result into and output file:
zenml integration export-requirements gcp kubeflow -o OUTPUT_FILE
Filtering when listing
Certain CLI list
commands allow you to filter their output. For example, all
stack components allow you to pass custom parameters to the list
command that
will filter the output. To learn more about the available filters, a good quick
reference is to use the --help
command, as in the following example:
zenml orchestrator list --help
You will see a list of all the available filters for the list
command along
with examples of how to use them.
The --sort_by
option allows you to sort the output by a specific field and
takes an asc
or desc
argument to specify the order. For example, to sort the
output of the list
command by the name
field in ascending order, you would
type:
zenml orchestrator list --sort_by "asc:name"
For fields marked as being of type TEXT
or UUID
, you can use the contains
,
startswith
and endswith
keywords along with their particular identifier. For
example, for the orchestrator list
command, you can use the following filter
to find all orchestrators that contain the string sagemaker
in their name:
zenml orchestrator list --name "contains:sagemaker"
For fields marked as being of type BOOL
, you can use the 'True' or 'False'
values to filter the output.
Finally, for fields marked as being of type DATETIME
, you can pass in datetime
values in the %Y-%m-%d %H:%M:%S
format. These can be combined with the gte
,
lte
, gt
and lt
keywords (greater than or equal, less than or equal,
greater than and less than respectively) to specify the range of the filter. For
example, if I wanted to find all orchestrators that were created after the 1st
of January 2021, I would type:
zenml orchestrator list --created "gt:2021-01-01 00:00:00"
This syntax can also be combined to create more complex filters using the or
and and
keywords.
Artifact Stores
In ZenML, the artifact store is where all the inputs and outputs of your pipeline steps are stored. By default, ZenML initializes your repository with an artifact store with everything kept on your local machine. You can get a better understanding about the concept of artifact stores by executing:
zenml artifact-store explain
If you wish to register a new artifact store, do so with the register
command:
zenml artifact-store register ARTIFACT_STORE_NAME --flavor=ARTIFACT_STORE_FLAVOR [--OPTIONS]
You can also add any labels to your stack component using the --label
or -l
flag:
zenml artifact-store register ARTIFACT_STORE_NAME --flavor=ARTIFACT_STORE_FLAVOR -l key1=value1 -l key2=value2
As you can see from the command above, when you register a new artifact store, you have to choose a flavor. To see the full list of available artifact store flavors, you can use the command:
zenml artifact-store flavor list
This list will show you which integration these flavors belong to and which service connectors they are adaptable with. If you would like to get additional information regarding a specific flavor, you can utilize the command:
zenml artifact-store flavor describe FLAVOR_NAME
If you wish to list the artifact stores that have already been registered within your ZenML:
zenml artifact-store list
If you want the name of the artifact store in the active stack, you can
also use the get
command:
zenml artifact-store get
For details about a particular artifact store, use the describe
command.
By default, (without a specific artifact store name passed in) it will describe
the active or currently used artifact store:
zenml artifact-store describe ARTIFACT_STORE_NAME
If you wish to update/rename an artifact store, you can use the following commands respectively:
zenml artifact-store update ARTIFACT_STORE_NAME --property_to_update=new_value
zenml artifact-store rename ARTIFACT_STORE_OLD_NAME ARTIFACT_STORE_NEW_NAME
If you wish to delete a particular artifact store, pass the name of the artifact store into the CLI with the following command:
zenml artifact-store delete ARTIFACT_STORE_NAME
If you would like to connect/disconnect your artifact store to/from a service connector, you can use the following commands:
zenml artifact-store connect ARTIFACT_STORE_NAME -c CONNECTOR_NAME
zenml artifact-store disconnect
The ZenML CLI provides a few more utility functions for you to manage your artifact stores. In order to get a full list of available functions, use the command:
zenml artifact-store --help
Orchestrators
An orchestrator is a special kind of backend that manages the running of each step of the pipeline. Orchestrators administer the actual pipeline runs. By default, ZenML initializes your repository with an orchestrator that runs everything on your local machine. In order to get a more detailed explanation, you can use the command:
zenml orchestrator explain
If you wish to register a new orchestrator, do so with the register
command:
zenml orchestrator register ORCHESTRATOR_NAME --flavor=ORCHESTRATOR_FLAVOR [--ORCHESTRATOR_OPTIONS]
You can also add any label to your stack component using the --label
or -l
flag:
zenml orchestrator register ORCHESTRATOR_NAME --flavor=ORCHESTRATOR_FLAVOR -l key1=value1 -l key2=value2
As you can see from the command above, when you register a new orchestrator, you have to choose a flavor. To see the full list of available orchestrator flavors, you can use the command:
zenml orchestrator flavor list
This list will show you which integration these flavors belong to and which service connectors they are adaptable with. If you would like to get additional information regarding a specific flavor, you can utilize the command:
zenml orchestrator flavor describe FLAVOR_NAME
If you wish to list the orchestrators that have already been registered within your ZenML workspace / repository, type:
zenml orchestrator list
If you want the name of the orchestrator in the active stack, you can
also use the get
command:
zenml orchestrator get
For details about a particular orchestrator, use the describe
command.
By default, (without a specific orchestrator name passed in) it will describe
the active or currently used orchestrator:
zenml orchestrator describe [ORCHESTRATOR_NAME]
If you wish to update/rename an orchestrator, you can use the following commands respectively:
zenml orchestrator update ORCHESTRATOR_NAME --property_to_update=new_value
zenml orchestrator rename ORCHESTRATOR_OLD_NAME ORCHESTRATOR_NEW_NAME
If you wish to delete a particular orchestrator, pass the name of the orchestrator into the CLI with the following command:
zenml orchestrator delete ORCHESTRATOR_NAME
If you would like to connect/disconnect your orchestrator to/from a service connector, you can use the following commands:
zenml orchestrator connect ORCHESTRATOR_NAME -c CONNECTOR_NAME
zenml orchestrator disconnect
The ZenML CLI provides a few more utility functions for you to manage your orchestrators. In order to get a full list of available functions, use the command:
zenml orchestrators --help
Container Registries
The container registry is where all the images that are used by a container-based orchestrator are stored. To get a better understanding regarding container registries, use the command:
zenml container-registry explain
By default, a default ZenML local stack will not register a container registry.
If you wish to register a new container registry, do so with the register
command:
zenml container-registry register REGISTRY_NAME --flavor=REGISTRY_FLAVOR [--REGISTRY_OPTIONS]
You can also add any label to your stack component using the --label
or -l
flag:
zenml container-registry register REGISTRY_NAME --flavor=REGISTRY_FLAVOR -l key1=value1 -l key2=value2
As you can see from the command above, when you register a new container registry, you have to choose a flavor. To see the full list of available container registry flavors, you can use the command:
zenml container-registry flavor list
This list will show you which integration these flavors belong to and which service connectors they are adaptable with. If you would like to get additional information regarding a specific flavor, you can utilize the command:
zenml container-registry flavor describe FLAVOR_NAME
To list all container registries available and registered for use, use the
list
command:
zenml container-registry list
If you want the name of the container registry in the active stack, you can
also use the get
command:
zenml container-registry get
For details about a particular container registry, use the describe
command.
By default, (without a specific registry name passed in) it will describe the
active or currently used container registry:
zenml container-registry describe [CONTAINER_REGISTRY_NAME]
If you wish to update/rename a container registry, you can use the following commands respectively:
zenml container-registry update CONTAINER_REGISTRY_NAME --property_to_update=new_value
zenml container-registry rename CONTAINER_REGISTRY_OLD_NAME CONTAINER_REGISTRY_NEW_NAME
To delete a container registry (and all of its contents), use the delete
command:
zenml container-registry delete REGISTRY_NAME
If you would like to connect/disconnect your container registry to/from a service connector, you can use the following commands:
zenml container-registry connect CONTAINER_REGISTRY_NAME -c CONNECTOR_NAME
zenml container-registry disconnect
The ZenML CLI provides a few more utility functions for you to manage your container registries. In order to get a full list of available functions, use the command:
zenml container-registry --help
Data Validators
In ZenML, data validators help you profile and validate your data.
By default, a default ZenML local stack will not register a data validator. If
you wish to register a new data validator, do so with the register
command:
zenml data-validator register DATA_VALIDATOR_NAME --flavor DATA_VALIDATOR_FLAVOR [--DATA_VALIDATOR_OPTIONS]
You can also add any label to your stack component using the --label
or -l
flag:
zenml data-validator register DATA_VALIDATOR_NAME --flavor DATA_VALIDATOR_FLAVOR -l key1=value1 -l key2=value2
As you can see from the command above, when you register a new data validator, you have to choose a flavor. To see the full list of available data validator flavors, you can use the command:
zenml data-validator flavor list
This list will show you which integration these flavors belong to and which service connectors they are adaptable with. If you would like to get additional information regarding a specific flavor, you can utilize the command:
zenml data-validator flavor describe FLAVOR_NAME
To list all data validators available and registered for use, use the list
command:
zenml data-validator list
If you want the name of the data validator in the active stack, use the get
command:
zenml data-validator get
For details about a particular data validator, use the describe
command.
By default, (without a specific data validator name passed in) it will describe
the active or currently-used data validator:
zenml data-validator describe [DATA_VALIDATOR_NAME]
If you wish to update/rename a data validator, you can use the following commands respectively:
zenml data-validator update DATA_VALIDATOR_NAME --property_to_update=new_value
zenml data-validator rename DATA_VALIDATOR_OLD_NAME DATA_VALIDATOR_NEW_NAME
To delete a data validator (and all of its contents), use the delete
command:
zenml data-validator delete DATA_VALIDATOR_NAME
If you would like to connect/disconnect your data validator to/from a service connector, you can use the following commands:
zenml data-validator connect DATA_VALIDATOR_NAME -c CONNECTOR_NAME
zenml data-validator disconnect
The ZenML CLI provides a few more utility functions for you to manage your data validators. In order to get a full list of available functions, use the command:
zenml data-validator --help
Experiment Trackers
Experiment trackers let you track your ML experiments by logging the parameters and allow you to compare between different runs. To get a better understanding regarding experiment trackers, use the command:
zenml experiment-tracker explain
By default, a default ZenML local stack will not register an experiment tracker. If you want to use an experiment tracker in one of your stacks, you need to first register it:
zenml experiment-tracker register EXPERIMENT_TRACKER_NAME --flavor=EXPERIMENT_TRACKER_FLAVOR [--EXPERIMENT_TRACKER_OPTIONS]
You can also add any label to your stack component using the --label
or -l
flag:
zenml experiment-tracker register EXPERIMENT_TRACKER_NAME --flavor=EXPERIMENT_TRACKER_FLAVOR -l key1=value1 -l key2=value2
As you can see from the command above, when you register a new experiment tracker, you have to choose a flavor. To see the full list of available experiment tracker flavors, you can use the command:
zenml experiment-tracker flavor list
This list will show you which integration these flavors belong to and which service connectors they are adaptable with. If you would like to get additional information regarding a specific flavor, you can utilize the command:
zenml experiment-tracker flavor describe FLAVOR_NAME
To list all experiment trackers available and registered for use, use the
list
command:
zenml experiment-tracker list
If you want the name of the experiment tracker in the active stack, use the
get
command:
zenml experiment-tracker get
For details about a particular experiment tracker, use the describe
command.
By default, (without a specific experiment tracker name passed in) it will
describe the active or currently-used experiment tracker:
zenml experiment-tracker describe [EXPERIMENT_TRACKER_NAME]
If you wish to update/rename an experiment tracker, you can use the following commands respectively:
zenml experiment-tracker update EXPERIMENT_TRACKER_NAME --property_to_update=new_value
zenml experiment-tracker rename EXPERIMENT_TRACKER_OLD_NAME EXPERIMENT_TRACKER_NEW_NAME
To delete an experiment tracker, use the delete
command:
zenml experiment-tracker delete EXPERIMENT_TRACKER_NAME
If you would like to connect/disconnect your experiment tracker to/from a service connector, you can use the following commands:
zenml experiment-tracker connect EXPERIMENT_TRACKER_NAME -c CONNECTOR_NAME
zenml experiment-tracker disconnect
The ZenML CLI provides a few more utility functions for you to manage your experiment trackers. In order to get a full list of available functions, use the command:
zenml experiment-tracker --help
Model Deployers
Model deployers are stack components responsible for online model serving. They are responsible for deploying models to a remote server. Model deployers also act as a registry for models that are served with ZenML. To get a better understanding regarding model deployers, use the command:
zenml model-deployer explain
By default, a default ZenML local stack will not register a model deployer. If
you wish to register a new model deployer, do so with the register
command:
zenml model-deployer register MODEL_DEPLOYER_NAME --flavor MODEL_DEPLOYER_FLAVOR [--MODEL_DEPLOYER_OPTIONS]
You can also add any label to your stack component using the --label
or -l
flag:
zenml model-deployer register MODEL_DEPLOYER_NAME --flavor MODEL_DEPLOYER_FLAVOR -l key1=value1 -l key2=value2
As you can see from the command above, when you register a new model deployer, you have to choose a flavor. To see the full list of available model deployer flavors, you can use the command:
zenml model-deployer flavor list
This list will show you which integration these flavors belong to and which service connectors they are adaptable with. If you would like to get additional information regarding a specific flavor, you can utilize the command:
zenml model-deployer flavor describe FLAVOR_NAME
To list all model deployers available and registered for use, use the
list
command:
zenml model-deployer list
If you want the name of the model deployer in the active stack, use the get
command:
zenml model-deployer get
For details about a particular model deployer, use the describe
command.
By default, (without a specific operator name passed in) it will describe the
active or currently used model deployer:
zenml model-deployer describe [MODEL_DEPLOYER_NAME]
If you wish to update/rename a model deployer, you can use the following commands respectively:
zenml model-deployer update MODEL_DEPLOYER_NAME --property_to_update=new_value
zenml model-deployer rename MODEL_DEPLOYER_OLD_NAME MODEL_DEPLOYER_NEW_NAME
To delete a model deployer (and all of its contents), use the delete
command:
zenml model-deployer delete MODEL_DEPLOYER_NAME
If you would like to connect/disconnect your model deployer to/from a service connector, you can use the following commands:
zenml model-deployer connect MODEL_DEPLOYER_NAME -c CONNECTOR_NAME
zenml model-deployer disconnect
Moreover, ZenML features a set of CLI commands specific to the model deployer interface. If you want to simply see what models have been deployed within your stack, run the following command:
zenml model-deployer models list
This should give you a list of served models containing their uuid
, the name
of the pipeline that produced them including the run id and the step name as
well as the status. This information should help you identify the different
models.
If you want further information about a specific model, simply copy the UUID and the following command.
zenml model-deployer models describe <UUID>
If you are only interested in the prediction url of the specific model you can also run:
zenml model-deployer models get-url <UUID>
Finally, you will also be able to start/stop the services using the following two commands:
zenml model-deployer models start <UUID>
zenml model-deployer models stop <UUID>
If you want to completely remove a served model you can also irreversibly delete it using:
zenml model-deployer models delete <UUID>
The ZenML CLI provides a few more utility functions for you to manage your model deployers. In order to get a full list of available functions, use the command:
zenml model-deployer --help
Step Operators
Step operators allow you to run individual steps in a custom environment different from the default one used by your active orchestrator. One example use-case is to run a training step of your pipeline in an environment with GPUs available. To get a better understanding regarding step operators, use the command:
zenml step-operator explain
By default, a default ZenML local stack will not register a step operator. If
you wish to register a new step operator, do so with the register
command:
zenml step-operator register STEP_OPERATOR_NAME --flavor STEP_OPERATOR_FLAVOR [--STEP_OPERATOR_OPTIONS]
You can also add any label to your stack component using the --label
or -l
flag:
zenml step-operator register STEP_OPERATOR_NAME --flavor STEP_OPERATOR_FLAVOR -l key1=value1 -l key2=value2
As you can see from the command above, when you register a new step operator, you have to choose a flavor. To see the full list of available step operator flavors, you can use the command:
zenml step-operator flavor list
This list will show you which integration these flavors belong to and which service connectors they are adaptable with. If you would like to get additional information regarding a specific flavor, you can utilize the command:
zenml step-operator flavor describe FLAVOR_NAME
To list all step operators available and registered for use, use the
list
command:
zenml step-operator list
If you want the name of the step operator in the active stack, use the get
command:
zenml step-operator get
For details about a particular step operator, use the describe
command.
By default, (without a specific operator name passed in) it will describe the
active or currently used step operator:
zenml step-operator describe [STEP_OPERATOR_NAME]
If you wish to update/rename a step operator, you can use the following commands respectively:
zenml step-operator update STEP_OPERATOR_NAME --property_to_update=new_value
zenml step-operator rename STEP_OPERATOR_OLD_NAME STEP_OPERATOR_NEW_NAME
To delete a step operator (and all of its contents), use the delete
command:
zenml step-operator delete STEP_OPERATOR_NAME
If you would like to connect/disconnect your step operator to/from a service connector, you can use the following commands:
zenml step-operator connect STEP_OPERATOR_NAME -c CONNECTOR_NAME
zenml step-operator disconnect
The ZenML CLI provides a few more utility functions for you to manage your step operators. In order to get a full list of available functions, use the command:
zenml step-operator --help
Alerters
In ZenML, alerters allow you to send alerts from within your pipeline.
By default, a default ZenML local stack will not register an alerter. If
you wish to register a new alerter, do so with the register
command:
zenml alerter register ALERTER_NAME --flavor ALERTER_FLAVOR [--ALERTER_OPTIONS]
You can also add any label to your stack component using the --label
or -l
flag:
zenml alerter register ALERTER_NAME --flavor ALERTER_FLAVOR -l key1=value1 -l key2=value2
As you can see from the command above, when you register a new alerter, you have to choose a flavor. To see the full list of available alerter flavors, you can use the command:
zenml alerter flavor list
This list will show you which integration these flavors belong to and which service connectors they are adaptable with. If you would like to get additional information regarding a specific flavor, you can utilize the command:
zenml alerter flavor describe FLAVOR_NAME
To list all alerters available and registered for use, use the list
command:
zenml alerter list
If you want the name of the alerter in the active stack, use the get
command:
zenml alerter get
For details about a particular alerter, use the describe
command.
By default, (without a specific alerter name passed in) it will describe
the active or currently used alerter:
zenml alerter describe [ALERTER_NAME]
If you wish to update/rename an alerter, you can use the following commands respectively:
zenml alerter update ALERTER_NAME --property_to_update=new_value
zenml alerter rename ALERTER_OLD_NAME ALERTER_NEW_NAME
To delete an alerter (and all of its contents), use the delete
command:
zenml alerter delete ALERTER_NAME
If you would like to connect/disconnect your alerter to/from a service connector, you can use the following commands:
zenml alerter connect ALERTER_NAME -c CONNECTOR_NAME
zenml alerter disconnect
The ZenML CLI provides a few more utility functions for you to manage your alerters. In order to get a full list of available functions, use the command:
zenml alerter --help
Feature Stores
Feature stores allow data teams to serve data via an offline store and an online low-latency store where data is kept in sync between the two. To get a better understanding regarding feature stores, use the command:
zenml feature-store explain
By default, a default ZenML local stack will not register a feature store. If
you wish to register a new feature store, do so with the register
command:
zenml feature-store register FEATURE_STORE_NAME --flavor FEATURE_STORE_FLAVOR [--FEATURE_STORE_OPTIONS]
You can also add any label to your stack component using the --label
or -l
flag:
zenml feature-store register FEATURE_STORE_NAME --flavor FEATURE_STORE_FLAVOR -l key1=value1 -l key2=value2
As you can see from the command above, when you register a new feature store, you have to choose a flavor. To see the full list of available feature store flavors, you can use the command:
zenml feature-store flavor list
This list will show you which integration these flavors belong to and which service connectors they are adaptable with. If you would like to get additional information regarding a specific flavor, you can utilize the command:
Note: Currently, ZenML only supports connecting to a Redis-backed Feast feature store as a stack component integration.
zenml feature-store flavor describe FLAVOR_NAME
To list all feature stores available and registered for use, use the
list
command:
zenml feature-store list
If you want the name of the feature store in the active stack, use the get
command:
zenml feature-store get
For details about a particular feature store, use the describe
command.
By default, (without a specific feature store name passed in) it will describe
the active or currently-used feature store:
zenml feature-store describe [FEATURE_STORE_NAME]
If you wish to update/rename a feature store, you can use the following commands respectively:
zenml feature-store update FEATURE_STORE_NAME --property_to_update=new_value
zenml feature-store rename FEATURE_STORE_OLD_NAME FEATURE_STORE_NEW_NAME
To delete a feature store (and all of its contents), use the delete
command:
zenml feature-store delete FEATURE_STORE_NAME
If you would like to connect/disconnect your feature store to/from a service connector, you can use the following commands:
zenml feature-store connect FEATURE_STORE_NAME -c CONNECTOR_NAME
zenml feature-store disconnect
The ZenML CLI provides a few more utility functions for you to manage your feature stores. In order to get a full list of available functions, use the command:
zenml feature-store --help
Annotators
Annotators enable the use of data annotation as part of your ZenML stack and pipelines.
By default, a default ZenML local stack will not register an annotator. If
you wish to register a new annotator, do so with the register
command:
zenml annotator register ANNOTATOR_NAME --flavor ANNOTATOR_FLAVOR [--ANNOTATOR_OPTIONS]
You can also add any label to your stack component using the --label
or -l
flag:
zenml annotator register ANNOTATOR_NAME --flavor ANNOTATOR_FLAVOR -l key1=value1 -l key2=value2
As you can see from the command above, when you register a new annotator, you have to choose a flavor. To see the full list of available annotator flavors, you can use the command:
zenml annotator flavor list
This list will show you which integration these flavors belong to and which service connectors they are adaptable with. If you would like to get additional information regarding a specific flavor, you can utilize the command:
zenml annotator flavor describe FLAVOR_NAME
To list all annotator available and registered for use, use the list
command:
zenml annotator list
If you want the name of the annotator in the active stack, use the get
command:
zenml annotator get
For details about a particular annotator, use the describe
command.
By default, (without a specific annotator name passed in) it will describe
the active or currently used annotator:
zenml annotator describe [ANNOTATOR_NAME]
If you wish to update/rename an annotator, you can use the following commands respectively:
zenml annotator update ANNOTATOR_NAME --property_to_update=new_value
zenml annotator rename ANNOTATOR_OLD_NAME ANNOTATOR_NEW_NAME
To delete an annotator (and all of its contents), use the delete
command:
zenml annotator delete ANNOTATOR_NAME
If you would like to connect/disconnect your annotator to/from a service connector, you can use the following commands:
zenml annotator connect ANNOTATOR_NAME -c CONNECTOR_NAME
zenml annotator disconnect
Finally, you can use the dataset
command to interact with your annotation
datasets:
zenml annotator dataset --help
The ZenML CLI provides a few more utility functions for you to manage your annotator. In order to get a full list of available functions, use the command:
zenml annotator --help
Image Builders
In ZenML, image builders allow you to build container images such that your machine-learning pipelines and steps can be executed in remote environments.
By default, a default ZenML local stack will not register an image builder. If
you wish to register a new image builder, do so with the register
command:
zenml image-builder register IMAGE_BUILDER_NAME --flavor IMAGE_BUILDER_FLAVOR [--IMAGE_BUILDER_OPTIONS]
You can also add any label to your stack component using the --label
or -l
flag:
zenml image-builder register IMAGE_BUILDER_NAME --flavor IMAGE_BUILDER_FLAVOR -l key1=value1 -l key2=value2
As you can see from the command above, when you register a new image builder, you have to choose a flavor. To see the full list of available image builder flavors, you can use the command:
zenml image-builder flavor list
This list will show you which integration these flavors belong to and which service connectors they are adaptable with. If you would like to get additional information regarding a specific flavor, you can utilize the command:
zenml image-builder flavor describe FLAVOR_NAME
To list all image builders available and registered for use, use the list
command:
zenml image-builder list
If you want the name of the image builder in the active stack, use the get
command:
zenml image-builder get
For details about a particular image builder, use the describe
command.
By default, (without a specific image builder name passed in) it will describe
the active or currently used image builder:
zenml image-builder describe [IMAGE_BUILDER_NAME]
If you wish to update/rename an image builder, you can use the following commands respectively:
zenml image-builder update IMAGE_BUILDER_NAME --property_to_update=new_value
zenml image-builder rename IMAGE_BUILDER_OLD_NAME IMAGE_BUILDER_NEW_NAME
To delete a image builder (and all of its contents), use the delete
command:
zenml image-builder delete IMAGE_BUILDER_NAME
If you would like to connect/disconnect your image builder to/from a service connector, you can use the following commands:
zenml image-builder connect IMAGE_BUILDER_NAME -c CONNECTOR_NAME
zenml image-builder disconnect
The ZenML CLI provides a few more utility functions for you to manage your image builders. In order to get a full list of available functions, use the command:
zenml image-builder --help
Model Registries
Model registries are centralized repositories that facilitate the collaboration and management of machine learning models. To get a better understanding regarding model registries as a concept, use the command:
zenml model-registry explain
By default, a default ZenML local stack will not register a model registry. If
you wish to register a new model registry, do so with the register
command:
zenml model-registry register MODEL_REGISTRY_NAME --flavor MODEL_REGISTRY_FLAVOR [--MODEL_REGISTRY_OPTIONS]
You can also add any label to your stack component using the --label
or -l
flag:
zenml model-registry register MODEL_REGISTRY_NAME --flavor MODEL_REGISTRY_FLAVOR -l key1=value1 -l key2=value2
As you can see from the command above, when you register a new model registry, you have to choose a flavor. To see the full list of available model registry flavors, you can use the command:
zenml model-registry flavor list
This list will show you which integration these flavors belong to and which service connectors they are adaptable with. If you would like to get additional information regarding a specific flavor, you can utilize the command:
zenml model-registry flavor describe FLAVOR_NAME
To list all model registries available and registered for use, use the
list
command:
zenml model-registry list
If you want the name of the model registry in the active stack, use the get
command:
zenml model-registry get
For details about a particular model registry, use the describe
command.
By default, (without a specific operator name passed in) it will describe the
active or currently used model registry:
zenml model-registry describe [MODEL_REGISTRY_NAME]
If you wish to update/rename a model registry, you can use the following commands respectively:
zenml model-registry update MODEL_REGISTRY_NAME --property_to_update=new_value
zenml model-registry rename MODEL_REGISTRY_OLD_NAME MODEL_REGISTRY_NEW_NAME
To delete a model registry (and all of its contents), use the delete
command:
zenml model-registry delete MODEL_REGISTRY_NAME
If you would like to connect/disconnect your model registry to/from a service connector, you can use the following commands:
zenml model-registry connect MODEL_REGISTRY_NAME -c CONNECTOR_NAME
zenml model-registry disconnect
The ZenML CLI provides a few more utility functions for you to manage your model registries. In order to get a full list of available functions, use the command:
zenml model-registry --help
Managing your Stacks
The stack is a grouping of your artifact store, your orchestrator, and other optional MLOps tools like experiment trackers or model deployers. With the ZenML tool, switching from a local stack to a distributed cloud environment can be accomplished with just a few CLI commands.
To register a new stack, you must already have registered the individual components of the stack using the commands listed above.
Use the zenml stack register
command to register your stack. It
takes four arguments as in the following example:
zenml stack register STACK_NAME -a ARTIFACT_STORE_NAME -o ORCHESTRATOR_NAME
Each corresponding argument should be the name, id or even the first few letters of the id that uniquely identify the artifact store or orchestrator.
To create a new stack using the new service connector with a set of minimal components, use the following command:
zenml stack register STACK_NAME -p CLOUD_PROVIDER
To create a new stack using the existing service connector with a set of minimal components, use the following command:
zenml stack register STACK_NAME -sc SERVICE_CONNECTOR_NAME
To create a new stack using the existing service connector with existing components ( important, that the components are already registered in the service connector), use the following command:
zenml stack register STACK_NAME -sc SERVICE_CONNECTOR_NAME -a ARTIFACT_STORE_NAME -o ORCHESTRATOR_NAME ...
If you want to immediately set this newly created stack as your active stack,
simply pass along the --set
flag.
zenml stack register STACK_NAME ... --set
To list the stacks that you have registered within your current ZenML workspace, type:
zenml stack list
To delete a stack that you have previously registered, type:
zenml stack delete STACK_NAME
By default, ZenML uses a local stack whereby all pipelines run on your local computer. If you wish to set a different stack as the current active stack to be used when running your pipeline, type:
zenml stack set STACK_NAME
This changes a configuration property within your local environment.
To see which stack is currently set as the default active stack, type:
zenml stack get
If you want to copy a stack, run the following command:
zenml stack copy SOURCE_STACK_NAME TARGET_STACK_NAME
If you wish to transfer one of your stacks to another machine, you can do so by exporting the stack configuration and then importing it again.
To export a stack to YAML, run the following command:
zenml stack export STACK_NAME FILENAME.yaml
This will create a FILENAME.yaml containing the config of your stack and all of its components, which you can then import again like this:
zenml stack import STACK_NAME -f FILENAME.yaml
If you wish to update a stack that you have already registered, first make sure you have registered whatever components you want to use, then use the following command:
# assuming that you have already registered a new orchestrator
# with NEW_ORCHESTRATOR_NAME
zenml stack update STACK_NAME -o NEW_ORCHESTRATOR_NAME
You can update one or many stack components at the same time out of the ones that ZenML supports. To see the full list of options for updating a stack, use the following command:
zenml stack update --help
To remove a stack component from a stack, use the following command:
# assuming you want to remove the image builder and the feature-store
# from your stack
zenml stack remove-component -i -f
If you wish to rename your stack, use the following command:
zenml stack rename STACK_NAME NEW_STACK_NAME
If you would like to export the requirements of your stack, you can use the command:
zenml stack export-requirements <STACK_NAME>
If you want to copy a stack component, run the following command:
zenml STACK_COMPONENT copy SOURCE_COMPONENT_NAME TARGET_COMPONENT_NAME
If you wish to update a specific stack component, use the following command, switching out "STACK_COMPONENT" for the component you wish to update (i.e. 'orchestrator' or 'artifact-store' etc.):
zenml STACK_COMPONENT update --some_property=NEW_VALUE
Note that you are not permitted to update the stack name or UUID in this way. To change the name of your stack component, use the following command:
zenml STACK_COMPONENT rename STACK_COMPONENT_NAME NEW_STACK_COMPONENT_NAME
If you wish to remove an attribute (or multiple attributes) from a stack component, use the following command:
zenml STACK_COMPONENT remove-attribute STACK_COMPONENT_NAME ATTRIBUTE_NAME [OTHER_ATTRIBUTE_NAME]
Note that you can only remove optional attributes.
If you want to register secrets for all secret references in a stack, use the following command:
zenml stack register-secrets [<STACK_NAME>]
If you want to connect a service connector to a stack's components, you can use
the connect
command:
zenml stack connect STACK_NAME -c CONNECTOR_NAME
Note that this only connects the service connector to the current components of the stack and not to the stack itself, which means that you need to rerun the command after adding new components to the stack.
The ZenML CLI provides a few more utility functions for you to manage your stacks. In order to get a full list of available functions, use the command:
zenml stack --help
Managing your Models
ZenML provides several CLI commands to help you administer your models and their versions as part of the Model Control Plane.
To register a new model, you can use the following CLI command:
zenml model register --name <NAME> [--MODEL_OPTIONS]
To list all registered models, use:
zenml model list [MODEL_FILTER_OPTIONS]
To update a model, use:
zenml model update <MODEL_NAME_OR_ID> [--MODEL_OPTIONS]
If you would like to add or remove tags from the model, use:
zenml model update <MODEL_NAME_OR_ID> --tag <TAG> --tag <TAG> ..
--remove-tag <TAG> --remove-tag <TAG> ..
To delete a model, use:
zenml model delete <MODEL_NAME_OR_ID>
The CLI interface for models also helps to navigate through artifacts linked to a specific model versions.
zenml model data_artifacts <MODEL_NAME_OR_ID> [-v <VERSION>]
zenml model deployment_artifacts <MODEL_NAME_OR_ID> [-v <VERSION>]
zenml model model_artifacts <MODEL_NAME_OR_ID> [-v <VERSION>]
You can also navigate the pipeline runs linked to a specific model versions:
zenml model runs <MODEL_NAME_OR_ID> [-v <VERSION>]
To list the model versions of a specific model, use:
zenml model version list [--model-name <MODEL_NAME> --name <MODEL_VERSION_NAME> OTHER_OPTIONS]
To delete a model version, use:
zenml model version delete <MODEL_NAME_OR_ID> <VERSION>
To update a model version, use:
zenml model version update <MODEL_NAME_OR_ID> <VERSION> [--MODEL_VERSION_OPTIONS]
These are some of the more common uses of model version updates:
- stage (i.e. promotion)
zenml model version update <MODEL_NAME_OR_ID> <VERSION> --stage <STAGE>
- tags
zenml model version update <MODEL_NAME_OR_ID> <VERSION> --tag <TAG> --tag <TAG> ..
--remove-tag <TAG> --remove-tag <TAG> ..
Managing your Pipelines & Artifacts
ZenML provides several CLI commands to help you administer your pipelines and pipeline runs.
To explicitly register a pipeline you need to point to a pipeline instance
in your Python code. Let's say you have a Python file called run.py
and
it contains the following code:
from zenml import pipeline
@pipeline
def my_pipeline(...):
# Connect your pipeline steps here
pass
You can register your pipeline like this:
zenml pipeline register run.my_pipeline
To list all registered pipelines, use:
zenml pipeline list
To delete a pipeline, run:
zenml pipeline delete <PIPELINE_NAME>
This will delete the pipeline and change all corresponding pipeline runs to become unlisted (not linked to any pipeline).
To list all pipeline runs that you have executed, use:
zenml pipeline runs list
To delete a pipeline run, use:
zenml pipeline runs delete <PIPELINE_RUN_NAME_OR_ID>
To refresh the status of a pipeline run, you can use the refresh
command (
only supported for pipelines executed on Vertex, Sagemaker or AzureML).
zenml pipeline runs refresh <PIPELINE_RUN_NAME_OR_ID>
If you run any of your pipelines with pipeline.run(schedule=...)
, ZenML keeps
track of the schedule and you can list all schedules via:
zenml pipeline schedule list
To delete a schedule, use:
zenml pipeline schedule delete <SCHEDULE_NAME_OR_ID>
Note, however, that this will only delete the reference saved in ZenML and does NOT stop/delete the schedule in the respective orchestrator. This still needs to be done manually. For example, using the Airflow orchestrator you would have to open the web UI to manually click to stop the schedule from executing.
Each pipeline run automatically saves its artifacts in the artifact store. To list all artifacts that have been saved, use:
zenml artifact list
Each artifact has one or several versions. To list artifact versions, use:
zenml artifact versions list
If you would like to rename an artifact or adjust the tags of an artifact or
artifact version, use the corresponding update
command:
zenml artifact update <NAME> -n <NEW_NAME>
zenml artifact update <NAME> -t <TAG1> -t <TAG2> -r <TAG_TO_REMOVE>
zenml artifact version update <NAME> -v <VERSION> -t <TAG1> -t <TAG2> -r <TAG_TO_REMOVE>
The metadata of artifacts or artifact versions stored by ZenML can only be deleted once they are no longer used by any pipeline runs. I.e., an artifact version can only be deleted if the run that produced it and all runs that used it as an input have been deleted. Similarly, an artifact can only be deleted if all its versions can be deleted.
To delete all artifacts and artifact versions that are no longer linked to any pipeline runs, use:
zenml artifact prune
You might find that some artifacts throw errors when you try to prune them,
likely because they were stored locally and no longer exist. If you wish to
continue pruning and to ignore these errors, please add the --ignore-errors
flag. Warning messages will still be output to the terminal during this
process.
Each pipeline run that requires Docker images also stores a build which contains the image names used for this run. To list all builds, use:
zenml pipeline builds list
To delete a specific build, use:
zenml pipeline builds delete <BUILD_ID>
Managing the local ZenML Dashboard
The ZenML dashboard is a web-based UI that allows you to visualize and navigate the stack configurations, pipelines and pipeline runs tracked by ZenML among other things. You can start the ZenML dashboard locally by running the following command:
zenml login --local
This will start the dashboard on your local machine where you can access it at the URL printed to the console.
If you have closed the dashboard in your browser and want to open it again, you can run:
zenml show
If you want to stop the dashboard, simply run:
zenml logout --local
The zenml login --local
command has a few additional options that you can use
to customize how the ZenML dashboard is running.
By default, the dashboard is started as a background process. On some operating
systems, this capability is not available. In this case, you can use the
--blocking
flag to start the dashboard in the foreground:
zenml login --local --blocking
This will block the terminal until you stop the dashboard with CTRL-C.
Another option you can use, if you have Docker installed on your machine, is to run the dashboard in a Docker container. This is useful if you don't want to install all the Zenml server dependencies on your machine. To do so, simply run:
zenml login --local --docker
The TCP port and the host address that the dashboard uses to listen for
connections can also be customized. Using an IP address that is not the default
localhost
or 127.0.0.1 is especially useful if you're running some type of
local ZenML orchestrator, such as the k3d Kubeflow orchestrator or Docker
orchestrator, that cannot directly connect to the local ZenML server.
For example, to start the dashboard on port 9000 and have it listen on all locally available interfaces on your machine, run:
zenml login --local --port 9000 --ip-address 0.0.0.0
Note that the above 0.0.0.0 IP address also exposes your ZenML dashboard
externally through your public interface. Alternatively, you can choose an
explicit IP address that is configured on one of your local interfaces, such as
the Docker bridge interface, which usually has the IP address 172.17.0.1
:
zenml login --local --port 9000 --ip-address 172.17.0.1
If you would like to take a look at the logs for the local ZenML server:
zenml logs
Connecting to a ZenML Server
The ZenML client can be configured to connect to a local ZenML server, a remote
database or a remote ZenML server
with the zenml login
command.
To connect or re-connect to any ZenML server, if you know its URL, you can simply run:
zenml login https://zenml.example.com:8080
Running zenml login
without any arguments will check if your current ZenML
server session is still valid. If it is not, you will be prompted to log in
again. This is useful if you quickly want to refresh your CLI session when
the current session expires.
You can open the ZenML dashboard of your currently connected ZenML server using the following command:
zenml server show
Note that if you have set your AUTO_OPEN_DASHBOARD
environment variable to
false
then this will not open the dashboard until you set it back to true
.
The CLI can be authenticated to multiple ZenML servers at the same time, even though it can only be connected to one server at a time. You can list all the ZenML servers that the client is currently authenticated to by running:
zenml server list
To disconnect from the current ZenML server and revert to using the local default database, use the following command:
zenml logout
You can inspect the current ZenML configuration at any given time using the following command:
zenml status
Example output:
$ zenml status
-----ZenML Client Status-----
Connected to a ZenML Pro server: `test-zenml-login` [16f8a35d-5c2f-44aa-a564-b34186fbf6d6]
ZenML Pro Organization: My Organization
ZenML Pro authentication: valid until 2024-10-26 10:18:51 CEST (in 20h37m9s)
Dashboard: https://cloud.zenml.io/organizations/bf873af9-aaf9-4ad1-a08e-3dc6d920d590/tenants/16f8336d-5c2f-44aa-a534-b34186fbf6d6
API: https://6784e58f-zenml.staging.cloudinfra.zenml.io
Server status: 'available'
Server authentication: never expires
The active user is: 'user'
The active stack is: 'default' (global)
Using configuration from: '/home/user/.config/zenml'
Local store files are located at: '/home/user/.config/zenml/local_stores'
-----Local ZenML Server Status-----
The local daemon server is running at: http://127.0.0.1:8237
When connecting to a ZenML server using the web login flow, you will be provided
with the option to Trust this device
. If you opt out of it a 24-hour token
will be issued for the authentication service. If you opt-in, you will be
issued a 30-day token instead.
If you would like to see a list of all trusted devices, you can use:
zenml authorized-device list
or if you would like to get the details regarding a specific device, you can use:
zenml authorized-device describe DEVICE_ID_OR_PREFIX
Alternatively, you can lock and unlock an authorized device by using the following commands:
zenml authorized-device lock DEVICE_ID_OR_PREFIX
zenml authorized-device unlock DEVICE_ID_OR_PREFIX
Finally, you can remove an authorized device by using the delete
command:
zenml authorized-device delete DEVICE_ID_OR_PREFIX
Secrets management
ZenML offers a way to securely store secrets associated with your other stack components and infrastructure. A ZenML Secret is a collection or grouping of key-value pairs stored by the ZenML secrets store. ZenML Secrets are identified by a unique name which allows you to fetch or reference them in your pipelines and stacks.
Depending on how you set up and deployed ZenML, the secrets store keeps secrets in the local database or uses the ZenML server your client is connected to:
- if you are using the default ZenML client settings, or if you connect your
ZenML client to a local ZenML server started with
zenml login --local
, the secrets store is using the same local SQLite database as the rest of ZenML - if you connect your ZenML client to a remote ZenML server, the secrets are no longer managed on your local machine, but through the remote server instead. Secrets are stored in whatever secrets store back-end the remote server is configured to use. This can be a SQL database, one of the managed cloud secrets management services, or even a custom back-end.
To create a secret, use the create
command and pass the key-value pairs
as command-line arguments:
zenml secret create SECRET_NAME --key1=value1 --key2=value2 --key3=value3 ...
# Another option is to use the '--values' option and provide key-value pairs in either JSON or YAML format.
zenml secret create SECRET_NAME --values='{"key1":"value2","key2":"value2","key3":"value3"}'
Note that when using the previous command the keys and values will be preserved in your bash_history
file, so
you may prefer to use the interactive create
command instead:
zenml secret create SECRET_NAME -i
As an alternative to the interactive mode, also useful for values that
are long or contain newline or special characters, you can also use the special
@
syntax to indicate to ZenML that the value needs to be read from a file:
zenml secret create SECRET_NAME --aws_access_key_id=1234567890 --aws_secret_access_key=abcdefghij --aws_session_token=@/path/to/token.txt
# Alternatively for providing key-value pairs, you can utilize the '--values' option by specifying a file path containing
# key-value pairs in either JSON or YAML format.
zenml secret create SECRET_NAME --values=@/path/to/token.txt
To list all the secrets available, use the list
command:
zenml secret list
To get the key-value pairs for a particular secret, use the get
command:
zenml secret get SECRET_NAME
To update a secret, use the update
command:
zenml secret update SECRET_NAME --key1=value1 --key2=value2 --key3=value3 ...
# Another option is to use the '--values' option and provide key-value pairs in either JSON or YAML format.
zenml secret update SECRET_NAME --values='{"key1":"value2","key2":"value2","key3":"value3"}'
Note that when using the previous command the keys and values will be preserved in your bash_history
file, so
you may prefer to use the interactive update
command instead:
zenml secret update SECRET_NAME -i
Finally, to delete a secret, use the delete
command:
zenml secret delete SECRET_NAME
Secrets can be scoped to a workspace or a user. By default, secrets
are scoped to the current workspace. To scope a secret to a user, use the
--scope user
argument in the register
command.
Auth management
Building and maintaining an MLOps workflow can involve numerous third-party libraries and external services. In most cases, this ultimately presents a challenge in configuring uninterrupted, secure access to infrastructure resources. In ZenML, Service Connectors streamline this process by abstracting away the complexity of authentication and help you connect your stack to your resources. You can find the full docs on the ZenML service connectors here.
The ZenML CLI features a variety of commands to help you manage your service connectors. First of all, to explore all the types of service connectors available in ZenML, you can use the following commands:
# To get the complete list
zenml service-connector list-types
# To get the details regarding a single type
zenml service-connector describe-type
For each type of service connector, you will also see a list of supported resource types. These types provide a way for organizing different resources into logical classes based on the standard and/or protocol used to access them. In addition to the resource types, each type will feature a different set of authentication methods.
Once you decided which service connector to use, you can create it with the
register
command as follows:
zenml service-connector register SERVICE_CONNECTOR_NAME --type TYPE [--description DESCRIPTION] [--resource-type RESOURCE_TYPE] [--auth-method AUTH_METHOD] ...
For more details on how to create a service connector, please refer to our docs.
To check if your service connector is registered properly, you can verify
it.
By doing this, you can both check if it is configured correctly and also, you
can fetch the list of resources it has access to:
zenml service-connector verify SERVICE_CONNECTOR_NAME_ID_OR_PREFIX
Some service connectors come equipped with the capability of configuring
the clients and SDKs on your local machine with the credentials inferred from
your service connector. To use this functionality, simply use the login
command:
zenml service-connector login SERVICE_CONNECTOR_NAME_ID_OR_PREFIX
To list all the service connectors that you have registered, you can use:
zenml service-connector list
Moreover, if you would like to list all the resources accessible by your service connectors, you can use the following command:
zenml service-connector list-resources [--resource-type RESOURCE_TYPE] /
[--connector-type CONNECTOR_TYPE] ...
This command can possibly take a long time depending on the number of service connectors you have registered. Consider using the right filters when you are listing resources.
If you want to see the details about a specific service connector that you have
registered, you can use the describe
command:
zenml service-connector describe SERVICE_CONNECTOR_NAME_ID_OR_PREFIX
You can update a registered service connector by using the update
command.
Keep in mind that all service connector updates are validated before being
applied. If you want to disable this behavior please use the --no-verify
flag.
zenml service-connector update SERVICE_CONNECTOR_NAME_ID_OR_PREFIX ...
Finally, if you wish to remove a service connector, you can use the delete
command:
zenml service-connector delete SERVICE_CONNECTOR_NAME_ID_OR_PREFIX
Managing users
When using the ZenML service, you can manage permissions by managing users using the CLI. If you want to create a new user or delete an existing one, run either
zenml user create USER_NAME
zenml user delete USER_NAME
To see a list of all users, run:
zenml user list
For detail about the particular user, use the describe
command. By default,
(without a specific user name passed in) it will describe the active user:
zenml user describe [USER_NAME]
If you want to update any properties of a specific user, you can use the
update
command. Use the --help
flag to get a full list of available
properties to update:
zenml user update --help
If you want to change the password of the current user account:
zenml user change-password --help
Service Accounts
ZenML supports the use of service accounts to authenticate clients to the ZenML server using API keys. This is useful for automating tasks such as running pipelines or deploying models.
To create a new service account, run:
zenml service-account create SERVICE_ACCOUNT_NAME
This command creates a service account and an API key for it. The API key is displayed as part of the command output and cannot be retrieved later. You can then use the issued API key to connect your ZenML client to the server with the CLI:
zenml login https://... --api-key
or by setting the ZENML_STORE_URL
and ZENML_STORE_API_KEY
environment
variables when you set up your ZenML client for the first time:
export ZENML_STORE_URL=https://...
export ZENML_STORE_API_KEY=<API_KEY>
You don't need to run zenml login
after setting these two environment
variables and can start interacting with your server right away.
To see all the service accounts you've created and their API keys, use the following commands:
zenml service-account list
zenml service-account api-key <SERVICE_ACCOUNT_NAME> list
Additionally, the following command allows you to more precisely inspect one of these service accounts and an API key:
zenml service-account describe <SERVICE_ACCOUNT_NAME>
zenml service-account api-key <SERVICE_ACCOUNT_NAME> describe <API_KEY_NAME>
API keys don't have an expiration date. For increased security, we recommend that you regularly rotate the API keys to prevent unauthorized access to your ZenML server. You can do this with the ZenML CLI:
zenml service-account api-key <SERVICE_ACCOUNT_NAME> rotate <API_KEY_NAME>
Running this command will create a new API key and invalidate the old one. The new API key is displayed as part of the command output and cannot be retrieved later. You can then use the new API key to connect your ZenML client to the server just as described above.
When rotating an API key, you can also configure a retention period for the old
API key. This is useful if you need to keep the old API key for a while to
ensure that all your workloads have been updated to use the new API key. You can
do this with the --retain
flag. For example, to rotate an API key and keep the
old one for 60 minutes, you can run the following command:
zenml service-account api-key <SERVICE_ACCOUNT_NAME> rotate <API_KEY_NAME> --retain 60
For increased security, you can deactivate a service account or an API key using one of the following commands:
zenml service-account update <SERVICE_ACCOUNT_NAME> --active false
zenml service-account api-key <SERVICE_ACCOUNT_NAME> update <API_KEY_NAME> --active false
Deactivating a service account or an API key will prevent it from being used to authenticate and has immediate effect on all workloads that use it.
To permanently delete an API key for a service account, use the following command:
zenml service-account api-key <SERVICE_ACCOUNT_NAME> delete <API_KEY_NAME>
Managing Code Repositories
Code repositories enable ZenML to keep track of the code version that you use for your pipeline runs. Additionally, running a pipeline which is tracked in a registered code repository can decrease the time it takes Docker to build images for containerized stack components.
To register a code repository, use the following CLI command:
zenml code-repository register <NAME> --type=<CODE_REPOSITORY_TYPE] [--CODE_REPOSITORY_OPTIONS]
ZenML currently supports code repositories of type github
and gitlab
, but
you can also use your custom code repository implementation by passing the
type custom
and a source of your repository class.
zenml code-repository register <NAME> --type=custom --source=<CODE_REPOSITORY_SOURCE> [--CODE_REPOSITORY_OPTIONS]
The CODE_REPOSITORY_OPTIONS
depend on the configuration necessary for the
type of code repository that you're using.
If you want to list your registered code repositories, run:
zenml code-repository list
You can delete one of your registered code repositories like this:
zenml code-repository delete <REPOSITORY_NAME_OR_ID>
Building an image without Runs
To build or run a pipeline from the CLI, you need to know the source path of
your pipeline. Let's imagine you have defined your pipeline in a python file
called run.py
like this:
from zenml import pipeline
@pipeline
def my_pipeline(...):
# Connect your pipeline steps here
pass
The source path of your pipeline will be run.my_pipeline
. In a generalized
way, this will be <MODULE_PATH>.<PIPELINE_FUNCTION_NAME>
. If the python file
defining the pipeline is not in your current directory, the module path consists
of the full path to the file, separated by dots, e.g.
some_directory.some_file.my_pipeline
.
To build Docker images for your pipeline without actually running the pipeline, use:
zenml pipeline build <PIPELINE_SOURCE_PATH>
To specify settings for the Docker builds, use the --config/-c
option of the
command. For more information about the structure of this configuration file,
check out the zenml.pipelines.base_pipeline.BasePipeline.build(...)
method.
zenml pipeline build <PIPELINE_SOURCE_PATH> --config=<PATH_TO_CONFIG_YAML>
If you want to build the pipeline for a stack other than your current active
stack, use the --stack
option.
zenml pipeline build <PIPELINE_SOURCE_PATH> --stack=<STACK_ID_OR_NAME>
To run a pipeline that was previously registered, use:
zenml pipeline run <PIPELINE_SOURCE_PATH>
To specify settings for the pipeline, use the --config/-c
option of the
command. For more information about the structure of this configuration file,
check out the zenml.pipelines.base_pipeline.BasePipeline.run(...)
method.
zenml pipeline run <PIPELINE_SOURCE_PATH> --config=<PATH_TO_CONFIG_YAML>
If you want to run the pipeline on a stack different than your current active
stack, use the --stack
option.
zenml pipeline run <PIPELINE_SOURCE_PATH> --stack=<STACK_ID_OR_NAME>
If you want to create a run template based on your pipeline that can later be used to trigger a run either from the dashboard or through an HTTP request:
zenml pipeline create-run-template <PIPELINE_SOURCE_PATH> --name=<TEMPLATE_NAME>
To specify a config file, use the `--config/-c` option. If you would like to use a different stack than the active one, use the `--stack` option.
```bash
zenml pipeline create-run-template <PIPELINE_SOURCE_PATH> --name=<TEMPLATE_NAME> --config=<PATH_TO_CONFIG_YAML> --stack=<STACK_ID_OR_NAME>
Tagging your resources with ZenML
When you are using ZenML, you can use tags to organize and categorize your assets. This way, you can streamline your workflows and enhance the discoverability of your resources more easily.
Currently, you can use tags with artifacts, models and their versions:
# Tag the artifact
zenml artifact update ARTIFACT_NAME -t TAG_NAME
# Tag the artifact version
zenml artifact version update ARTIFACT_NAME ARTIFACT_VERSION -t TAG_NAME
# Tag an existing model
zenml model update MODEL_NAME --tag TAG_NAME
# Tag a specific model version
zenml model version update MODEL_NAME VERSION_NAME --tag TAG_NAME
Besides these interactions, you can also create a new tag by using the
register
command:
zenml tag register -n TAG_NAME [-c COLOR]
If you would like to list all the tags that you have, you can use the command:
zenml tag list
To update the properties of a specific tag, you can use the update
subcommand:
zenml tag update TAG_NAME_OR_ID [-n NEW_NAME] [-c NEW_COLOR]
Finally, in order to delete a tag, you can execute:
zenml tag delete TAG_NAME_OR_ID
Managing the Global Configuration
The ZenML global configuration CLI commands cover options such as enabling or disabling the collection of anonymous usage statistics, changing the logging verbosity.
In order to help us better understand how the community uses ZenML, the library reports anonymized usage statistics. You can always opt out by using the CLI command:
zenml analytics opt-out
If you want to opt back in, use the following command:
zenml analytics opt-in
The verbosity of the ZenML client output can be configured using the
zenml logging
command. For example, to set the verbosity to DEBUG, run:
zenml logging set-verbosity DEBUG
APIKeyFilter
Bases: BaseFilter
Filter model for API keys.
Source code in src/zenml/models/v2/core/api_key.py
337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 |
|
apply_filter(query, table)
Override to apply the service account scope as an additional filter.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
query
|
AnyQuery
|
The query to which to apply the filter. |
required |
table
|
Type[AnySchema]
|
The query table. |
required |
Returns:
Type | Description |
---|---|
AnyQuery
|
The query with filter applied. |
Source code in src/zenml/models/v2/core/api_key.py
385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 |
|
set_service_account(service_account_id)
Set the service account by which to scope this query.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
service_account_id
|
UUID
|
The service account ID. |
required |
Source code in src/zenml/models/v2/core/api_key.py
377 378 379 380 381 382 383 |
|
AnalyticsEvent
Bases: str
, Enum
Enum of events to track in segment.
Source code in src/zenml/analytics/enums.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
|
AnalyticsEventSource
Bases: StrEnum
Enum to identify analytics events source.
Source code in src/zenml/enums.py
214 215 216 217 218 219 |
|
ArtifactFilter
Bases: TaggableFilter
Model to enable advanced filtering of artifacts.
Source code in src/zenml/models/v2/core/artifact.py
186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 |
|
apply_sorting(query, table)
Apply sorting to the query for Artifacts.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
query
|
AnyQuery
|
The query to which to apply the sorting. |
required |
table
|
Type[AnySchema]
|
The query table. |
required |
Returns:
Type | Description |
---|---|
AnyQuery
|
The query with sorting applied. |
Source code in src/zenml/models/v2/core/artifact.py
197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 |
|
ArtifactResponse
Bases: BaseIdentifiedResponse[ArtifactResponseBody, ArtifactResponseMetadata, ArtifactResponseResources]
Artifact response model.
Source code in src/zenml/models/v2/core/artifact.py
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 |
|
has_custom_name
property
The has_custom_name
property.
Returns:
Type | Description |
---|---|
bool
|
the value of the property. |
latest_version_id
property
The latest_version_id
property.
Returns:
Type | Description |
---|---|
Optional[UUID]
|
the value of the property. |
latest_version_name
property
The latest_version_name
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
tags
property
versions
property
Get a list of all versions of this artifact.
Returns:
Type | Description |
---|---|
Dict[str, ArtifactVersionResponse]
|
A list of all versions of this artifact. |
get_hydrated_version()
Get the hydrated version of this artifact.
Returns:
Type | Description |
---|---|
ArtifactResponse
|
an instance of the same entity with the metadata field attached. |
Source code in src/zenml/models/v2/core/artifact.py
117 118 119 120 121 122 123 124 125 |
|
ArtifactVersionFilter
Bases: WorkspaceScopedFilter
, TaggableFilter
Model to enable advanced filtering of artifact versions.
Source code in src/zenml/models/v2/core/artifact_version.py
473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 |
|
get_custom_filters(table)
Get custom filters.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
table
|
Type[AnySchema]
|
The query table. |
required |
Returns:
Type | Description |
---|---|
List[Union[ColumnElement[bool]]]
|
A list of custom filters. |
Source code in src/zenml/models/v2/core/artifact_version.py
569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 |
|
ArtifactVersionResponse
Bases: WorkspaceScopedResponse[ArtifactVersionResponseBody, ArtifactVersionResponseMetadata, ArtifactVersionResponseResources]
Response model for artifact versions.
Source code in src/zenml/models/v2/core/artifact_version.py
252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 |
|
artifact
property
artifact_store_id
property
The artifact_store_id
property.
Returns:
Type | Description |
---|---|
Optional[UUID]
|
the value of the property. |
data_type
property
materializer
property
name
property
The name
property.
Returns:
Type | Description |
---|---|
str
|
the value of the property. |
producer_pipeline_run_id
property
The producer_pipeline_run_id
property.
Returns:
Type | Description |
---|---|
Optional[UUID]
|
the value of the property. |
producer_step_run_id
property
The producer_step_run_id
property.
Returns:
Type | Description |
---|---|
Optional[UUID]
|
the value of the property. |
run
property
Get the pipeline run that produced this artifact.
Returns:
Type | Description |
---|---|
PipelineRunResponse
|
The pipeline run that produced this artifact. |
run_metadata
property
The metadata
property.
Returns:
Type | Description |
---|---|
Dict[str, MetadataType]
|
the value of the property. |
save_type
property
step
property
Get the step that produced this artifact.
Returns:
Type | Description |
---|---|
StepRunResponse
|
The step that produced this artifact. |
tags
property
type
property
uri
property
The uri
property.
Returns:
Type | Description |
---|---|
str
|
the value of the property. |
version
property
The version
property.
Returns:
Type | Description |
---|---|
Union[str, int]
|
the value of the property. |
visualizations
property
The visualizations
property.
Returns:
Type | Description |
---|---|
Optional[List[ArtifactVisualizationResponse]]
|
the value of the property. |
download_files(path, overwrite=False)
Downloads data for an artifact with no materializing.
Any artifacts will be saved as a zip file to the given path.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path
|
str
|
The path to save the binary data to. |
required |
overwrite
|
bool
|
Whether to overwrite the file if it already exists. |
False
|
Raises:
Type | Description |
---|---|
ValueError
|
If the path does not end with '.zip'. |
Source code in src/zenml/models/v2/core/artifact_version.py
433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 |
|
get_hydrated_version()
Get the hydrated version of this artifact version.
Returns:
Type | Description |
---|---|
ArtifactVersionResponse
|
an instance of the same entity with the metadata field attached. |
Source code in src/zenml/models/v2/core/artifact_version.py
261 262 263 264 265 266 267 268 269 |
|
load()
Materializes (loads) the data stored in this artifact.
Returns:
Type | Description |
---|---|
Any
|
The materialized data. |
Source code in src/zenml/models/v2/core/artifact_version.py
423 424 425 426 427 428 429 430 431 |
|
visualize(title=None)
Visualize the artifact in notebook environments.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
title
|
Optional[str]
|
Optional title to show before the visualizations. |
None
|
Source code in src/zenml/models/v2/core/artifact_version.py
459 460 461 462 463 464 465 466 467 |
|
AuthorizationException
Bases: ZenMLBaseException
Raised when an authorization error occurred while trying to access a ZenML resource .
Source code in src/zenml/exceptions.py
46 47 |
|
BaseCodeRepository
Bases: ABC
Base class for code repositories.
Code repositories are used to connect to a remote code repository and store information about the repository, such as the URL, the owner, the repository name, and the host. They also provide methods to download files from the repository when a pipeline is run remotely.
Source code in src/zenml/code_repositories/base_code_repository.py
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 |
|
config
property
Config class for Code Repository.
Returns:
Type | Description |
---|---|
BaseCodeRepositoryConfig
|
The config class. |
id
property
ID of the code repository.
Returns:
Type | Description |
---|---|
UUID
|
The ID of the code repository. |
name
property
Name of the code repository.
Returns:
Type | Description |
---|---|
str
|
The name of the code repository. |
requirements
property
Set of PyPI requirements for the repository.
Returns:
Type | Description |
---|---|
Set[str]
|
A set of PyPI requirements for the repository. |
__init__(id, name, config)
Initializes a code repository.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id
|
UUID
|
The ID of the code repository. |
required |
name
|
str
|
The name of the code repository. |
required |
config
|
Dict[str, Any]
|
The config of the code repository. |
required |
Source code in src/zenml/code_repositories/base_code_repository.py
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
|
download_files(commit, directory, repo_sub_directory)
abstractmethod
Downloads files from the code repository to a local directory.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
commit
|
str
|
The commit hash to download files from. |
required |
directory
|
str
|
The directory to download files to. |
required |
repo_sub_directory
|
Optional[str]
|
The subdirectory in the repository to download files from. |
required |
Raises:
Type | Description |
---|---|
RuntimeError
|
If the download fails. |
Source code in src/zenml/code_repositories/base_code_repository.py
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 |
|
from_model(model)
classmethod
Loads a code repository from a model.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model
|
CodeRepositoryResponse
|
The CodeRepositoryResponseModel to load from. |
required |
Returns:
Type | Description |
---|---|
BaseCodeRepository
|
The loaded code repository object. |
Source code in src/zenml/code_repositories/base_code_repository.py
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
|
get_local_context(path)
abstractmethod
Gets a local repository context from a path.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path
|
str
|
The path to the local repository. |
required |
Returns:
Type | Description |
---|---|
Optional[LocalRepositoryContext]
|
The local repository context object. |
Source code in src/zenml/code_repositories/base_code_repository.py
162 163 164 165 166 167 168 169 170 171 172 173 174 |
|
login()
abstractmethod
Logs into the code repository.
This method is called when the code repository is initialized. It should be used to authenticate with the code repository.
Raises:
Type | Description |
---|---|
RuntimeError
|
If the login fails. |
Source code in src/zenml/code_repositories/base_code_repository.py
133 134 135 136 137 138 139 140 141 142 143 |
|
validate_config(config)
classmethod
Validate the code repository config.
This method should check that the config/credentials are valid and the configured repository exists.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
config
|
Dict[str, Any]
|
The configuration. |
required |
Source code in src/zenml/code_repositories/base_code_repository.py
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
|
CliCategories
Bases: StrEnum
All possible categories for CLI commands.
Note: The order of the categories is important. The same order is used to sort the commands in the CLI help output.
Source code in src/zenml/enums.py
174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
Client
ZenML client class.
The ZenML client manages configuration options for ZenML stacks as well as their components.
Source code in src/zenml/client.py
338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 6384 6385 6386 6387 6388 6389 6390 6391 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 6571 6572 6573 6574 6575 6576 6577 6578 6579 6580 6581 6582 6583 6584 6585 6586 6587 6588 6589 6590 6591 6592 6593 6594 6595 6596 6597 6598 6599 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6618 6619 6620 6621 6622 6623 6624 6625 6626 6627 6628 6629 6630 6631 6632 6633 6634 6635 6636 6637 6638 6639 6640 6641 6642 6643 6644 6645 6646 6647 6648 6649 6650 6651 6652 6653 6654 6655 6656 6657 6658 6659 6660 6661 6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 6672 6673 6674 6675 6676 6677 6678 6679 6680 6681 6682 6683 6684 6685 6686 6687 6688 6689 6690 6691 6692 6693 6694 6695 6696 6697 6698 6699 6700 6701 6702 6703 6704 6705 6706 6707 6708 6709 6710 6711 6712 6713 6714 6715 6716 6717 6718 6719 6720 6721 6722 6723 6724 6725 6726 6727 6728 6729 6730 6731 6732 6733 6734 6735 6736 6737 6738 6739 6740 6741 6742 6743 6744 6745 6746 6747 6748 6749 6750 6751 6752 6753 6754 6755 6756 6757 6758 6759 6760 6761 6762 6763 6764 6765 6766 6767 6768 6769 6770 6771 6772 6773 6774 6775 6776 6777 6778 6779 6780 6781 6782 6783 6784 6785 6786 6787 6788 6789 6790 6791 6792 6793 6794 6795 6796 6797 6798 6799 6800 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810 6811 6812 6813 6814 6815 6816 6817 6818 6819 6820 6821 6822 6823 6824 6825 6826 6827 6828 6829 6830 6831 6832 6833 6834 6835 6836 6837 6838 6839 6840 6841 6842 6843 6844 6845 6846 6847 6848 6849 6850 6851 6852 6853 6854 6855 6856 6857 6858 6859 6860 6861 6862 6863 6864 6865 6866 6867 6868 6869 6870 6871 6872 6873 6874 6875 6876 6877 6878 6879 6880 6881 6882 6883 6884 6885 6886 6887 6888 6889 6890 6891 6892 6893 6894 6895 6896 6897 6898 6899 6900 6901 6902 6903 6904 6905 6906 6907 6908 6909 6910 6911 6912 6913 6914 6915 6916 6917 6918 6919 6920 6921 6922 6923 6924 6925 6926 6927 6928 6929 6930 6931 6932 6933 6934 6935 6936 6937 6938 6939 6940 6941 6942 6943 6944 6945 6946 6947 6948 6949 6950 6951 6952 6953 6954 6955 6956 6957 6958 6959 6960 6961 6962 6963 6964 6965 6966 6967 6968 6969 6970 6971 6972 6973 6974 6975 6976 6977 6978 6979 6980 6981 6982 6983 6984 6985 6986 6987 6988 6989 6990 6991 6992 6993 6994 6995 6996 6997 6998 6999 7000 7001 7002 7003 7004 7005 7006 7007 7008 7009 7010 7011 7012 7013 7014 7015 7016 7017 7018 7019 7020 7021 7022 7023 7024 7025 7026 7027 7028 7029 7030 7031 7032 7033 7034 7035 7036 7037 7038 7039 7040 7041 7042 7043 7044 7045 7046 7047 7048 7049 7050 7051 7052 7053 7054 7055 7056 7057 7058 7059 7060 7061 7062 7063 7064 7065 7066 7067 7068 7069 7070 7071 7072 7073 7074 7075 7076 7077 7078 7079 7080 7081 7082 7083 7084 7085 7086 7087 7088 7089 7090 7091 7092 7093 7094 7095 7096 7097 7098 7099 7100 7101 7102 7103 7104 7105 7106 7107 7108 7109 7110 7111 7112 7113 7114 7115 7116 7117 7118 7119 7120 7121 7122 7123 7124 7125 7126 7127 7128 7129 7130 7131 7132 7133 7134 7135 7136 7137 7138 7139 7140 7141 7142 7143 7144 7145 7146 7147 7148 7149 7150 7151 7152 7153 7154 7155 7156 7157 7158 7159 7160 7161 7162 7163 7164 7165 7166 7167 7168 7169 7170 7171 7172 7173 7174 7175 7176 7177 7178 7179 7180 7181 7182 7183 7184 7185 7186 7187 7188 7189 7190 7191 7192 7193 7194 7195 7196 7197 7198 7199 7200 7201 7202 7203 7204 7205 7206 7207 7208 7209 7210 7211 7212 7213 7214 7215 7216 7217 7218 7219 7220 7221 7222 7223 7224 7225 7226 7227 7228 7229 7230 7231 7232 7233 7234 7235 7236 7237 7238 7239 7240 7241 7242 7243 7244 7245 7246 7247 7248 7249 7250 7251 7252 7253 7254 7255 7256 7257 7258 7259 7260 7261 7262 7263 7264 7265 7266 7267 7268 7269 7270 7271 7272 7273 7274 7275 7276 7277 7278 7279 7280 7281 7282 7283 7284 7285 7286 7287 7288 7289 7290 7291 7292 7293 7294 7295 7296 7297 7298 7299 7300 7301 7302 7303 7304 7305 7306 7307 7308 7309 7310 7311 7312 7313 7314 7315 7316 7317 7318 7319 7320 7321 7322 7323 7324 7325 7326 7327 7328 7329 7330 7331 7332 7333 7334 7335 7336 7337 7338 7339 7340 7341 7342 7343 7344 7345 7346 7347 7348 7349 7350 7351 7352 7353 7354 7355 7356 7357 7358 7359 7360 7361 7362 7363 7364 7365 7366 7367 7368 7369 7370 7371 7372 7373 7374 7375 7376 7377 7378 7379 7380 7381 7382 7383 7384 7385 7386 7387 7388 7389 7390 7391 7392 7393 7394 7395 7396 7397 7398 7399 7400 7401 7402 7403 7404 7405 7406 7407 7408 7409 7410 7411 7412 7413 7414 7415 7416 7417 7418 7419 7420 7421 7422 7423 7424 7425 7426 7427 7428 7429 7430 7431 7432 7433 7434 7435 7436 7437 7438 7439 7440 7441 7442 7443 7444 7445 7446 7447 7448 7449 7450 7451 7452 7453 7454 7455 7456 7457 7458 7459 7460 7461 7462 7463 7464 7465 7466 7467 7468 7469 7470 7471 7472 7473 7474 7475 7476 7477 7478 7479 7480 7481 7482 7483 7484 7485 7486 7487 7488 7489 7490 7491 7492 7493 7494 7495 7496 7497 7498 7499 7500 7501 7502 7503 7504 7505 7506 7507 7508 7509 7510 7511 7512 7513 7514 7515 7516 7517 7518 7519 7520 7521 7522 7523 7524 7525 7526 7527 7528 7529 7530 7531 7532 7533 7534 7535 7536 7537 7538 7539 7540 7541 7542 7543 7544 7545 7546 7547 7548 7549 7550 7551 7552 7553 7554 7555 7556 7557 7558 7559 7560 7561 7562 7563 7564 7565 7566 7567 7568 7569 7570 7571 7572 7573 7574 7575 7576 7577 7578 7579 7580 7581 7582 7583 7584 7585 7586 7587 |
|
active_stack
property
active_stack_model
property
The model of the active stack for this client.
If no active stack is configured locally for the client, the active stack in the global configuration is used instead.
Returns:
Type | Description |
---|---|
StackResponse
|
The model of the active stack for this client. |
Raises:
Type | Description |
---|---|
RuntimeError
|
If the active stack is not set. |
active_user
property
active_workspace
property
Get the currently active workspace of the local client.
If no active workspace is configured locally for the client, the active workspace in the global configuration is used instead.
Returns:
Type | Description |
---|---|
WorkspaceResponse
|
The active workspace. |
Raises:
Type | Description |
---|---|
RuntimeError
|
If the active workspace is not set. |
config_directory
property
The configuration directory of this client.
Returns:
Type | Description |
---|---|
Optional[Path]
|
The configuration directory of this client, or None, if the |
Optional[Path]
|
client doesn't have an active root. |
root
property
The root directory of this client.
Returns:
Type | Description |
---|---|
Optional[Path]
|
The root directory of this client, or None, if the client |
Optional[Path]
|
has not been initialized. |
uses_local_configuration
property
Check if the client is using a local configuration.
Returns:
Type | Description |
---|---|
bool
|
True if the client is using a local configuration, |
bool
|
False otherwise. |
zen_store
property
Shortcut to return the global zen store.
Returns:
Type | Description |
---|---|
BaseZenStore
|
The global zen store. |
__init__(root=None)
Initializes the global client instance.
Client is a singleton class: only one instance can exist. Calling this constructor multiple times will always yield the same instance (see the exception below).
The root
argument is only meant for internal use and testing purposes.
User code must never pass them to the constructor.
When a custom root
value is passed, an anonymous Client instance
is created and returned independently of the Client singleton and
that will have no effect as far as the rest of the ZenML core code is
concerned.
Instead of creating a new Client instance to reflect a different
repository root, to change the active root in the global Client,
call Client().activate_root(<new-root>)
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
root
|
Optional[Path]
|
(internal use) custom root directory for the client. If
no path is given, the repository root is determined using the
environment variable |
None
|
Source code in src/zenml/client.py
350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 |
|
activate_root(root=None)
Set the active repository root directory.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
root
|
Optional[Path]
|
The path to set as the active repository root. If not set,
the repository root is determined using the environment
variable |
None
|
Source code in src/zenml/client.py
666 667 668 669 670 671 672 673 674 675 676 |
|
activate_stack(stack_name_id_or_prefix)
Sets the stack as active.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
stack_name_id_or_prefix
|
Union[str, UUID]
|
Model of the stack to activate. |
required |
Raises:
Type | Description |
---|---|
KeyError
|
If the stack is not registered. |
Source code in src/zenml/client.py
1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 |
|
backup_secrets(ignore_errors=True, delete_secrets=False)
Backs up all secrets to the configured backup secrets store.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ignore_errors
|
bool
|
Whether to ignore individual errors during the backup process and attempt to backup all secrets. |
True
|
delete_secrets
|
bool
|
Whether to delete the secrets that have been successfully backed up from the primary secrets store. Setting this flag effectively moves all secrets from the primary secrets store to the backup secrets store. |
False
|
Source code in src/zenml/client.py
4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 |
|
create_action(name, flavor, action_type, configuration, service_account_id, auth_window=None, description='')
Create an action.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
The name of the action. |
required |
flavor
|
str
|
The flavor of the action, |
required |
action_type
|
PluginSubType
|
The action subtype. |
required |
configuration
|
Dict[str, Any]
|
The action configuration. |
required |
service_account_id
|
UUID
|
The service account that is used to execute the action. |
required |
auth_window
|
Optional[int]
|
The time window in minutes for which the service account is authorized to execute the action. Set this to 0 to authorize the service account indefinitely (not recommended). |
None
|
description
|
str
|
The description of the action. |
''
|
Returns:
Type | Description |
---|---|
ActionResponse
|
The created action |
Source code in src/zenml/client.py
2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 |
|
create_api_key(service_account_name_id_or_prefix, name, description='', set_key=False)
Create a new API key and optionally set it as the active API key.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
service_account_name_id_or_prefix
|
Union[str, UUID]
|
The name, ID or prefix of the service account to create the API key for. |
required |
name
|
str
|
Name of the API key. |
required |
description
|
str
|
The description of the API key. |
''
|
set_key
|
bool
|
Whether to set the created API key as the active API key. |
False
|
Returns:
Type | Description |
---|---|
APIKeyResponse
|
The created API key. |
Source code in src/zenml/client.py
7230 7231 7232 7233 7234 7235 7236 7237 7238 7239 7240 7241 7242 7243 7244 7245 7246 7247 7248 7249 7250 7251 7252 7253 7254 7255 7256 7257 7258 7259 7260 7261 7262 7263 7264 7265 |
|
create_code_repository(name, config, source, description=None, logo_url=None)
Create a new code repository.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
Name of the code repository. |
required |
config
|
Dict[str, Any]
|
The configuration for the code repository. |
required |
source
|
Source
|
The code repository implementation source. |
required |
description
|
Optional[str]
|
The code repository description. |
None
|
logo_url
|
Optional[str]
|
URL of a logo (png, jpg or svg) for the code repository. |
None
|
Returns:
Type | Description |
---|---|
CodeRepositoryResponse
|
The created code repository. |
Source code in src/zenml/client.py
4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 |
|
create_event_source(name, configuration, flavor, event_source_subtype, description='')
Registers an event source.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
The name of the event source to create. |
required |
configuration
|
Dict[str, Any]
|
Configuration for this event source. |
required |
flavor
|
str
|
The flavor of event source. |
required |
event_source_subtype
|
PluginSubType
|
The event source subtype. |
required |
description
|
str
|
The description of the event source. |
''
|
Returns:
Type | Description |
---|---|
EventSourceResponse
|
The model of the registered event source. |
Source code in src/zenml/client.py
2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 |
|
create_flavor(source, component_type)
Creates a new flavor.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
source
|
str
|
The flavor to create. |
required |
component_type
|
StackComponentType
|
The type of the flavor. |
required |
Returns:
Type | Description |
---|---|
FlavorResponse
|
The created flavor (in model form). |
Raises:
Type | Description |
---|---|
ValueError
|
in case the config_schema of the flavor is too large. |
Source code in src/zenml/client.py
2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 |
|
create_model(name, license=None, description=None, audience=None, use_cases=None, limitations=None, trade_offs=None, ethics=None, tags=None, save_models_to_registry=True)
Creates a new model in Model Control Plane.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
The name of the model. |
required |
license
|
Optional[str]
|
The license under which the model is created. |
None
|
description
|
Optional[str]
|
The description of the model. |
None
|
audience
|
Optional[str]
|
The target audience of the model. |
None
|
use_cases
|
Optional[str]
|
The use cases of the model. |
None
|
limitations
|
Optional[str]
|
The known limitations of the model. |
None
|
trade_offs
|
Optional[str]
|
The tradeoffs of the model. |
None
|
ethics
|
Optional[str]
|
The ethical implications of the model. |
None
|
tags
|
Optional[List[str]]
|
Tags associated with the model. |
None
|
save_models_to_registry
|
bool
|
Whether to save the model to the registry. |
True
|
Returns:
Type | Description |
---|---|
ModelResponse
|
The newly created model. |
Source code in src/zenml/client.py
6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 |
|
create_model_version(model_name_or_id, name=None, description=None, tags=None)
Creates a new model version in Model Control Plane.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model_name_or_id
|
Union[str, UUID]
|
the name or id of the model to create model version in. |
required |
name
|
Optional[str]
|
the name of the Model Version to be created. |
None
|
description
|
Optional[str]
|
the description of the Model Version to be created. |
None
|
tags
|
Optional[List[str]]
|
Tags associated with the model. |
None
|
Returns:
Type | Description |
---|---|
ModelVersionResponse
|
The newly created model version. |
Source code in src/zenml/client.py
6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 |
|
create_run_metadata(metadata, resources, stack_component_id=None, publisher_step_id=None)
Create run metadata.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
metadata
|
Dict[str, MetadataType]
|
The metadata to create as a dictionary of key-value pairs. |
required |
resources
|
List[RunMetadataResource]
|
The list of IDs and types of the resources for that the metadata was produced. |
required |
stack_component_id
|
Optional[UUID]
|
The ID of the stack component that produced the metadata. |
None
|
publisher_step_id
|
Optional[UUID]
|
The ID of the step execution that publishes this metadata automatically. |
None
|
Source code in src/zenml/client.py
4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 |
|
create_run_template(name, deployment_id, description=None, tags=None)
Create a run template.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
The name of the run template. |
required |
deployment_id
|
UUID
|
ID of the deployment which this template should be based off of. |
required |
description
|
Optional[str]
|
The description of the run template. |
None
|
tags
|
Optional[List[str]]
|
Tags associated with the run template. |
None
|
Returns:
Type | Description |
---|---|
RunTemplateResponse
|
The created run template. |
Source code in src/zenml/client.py
3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 |
|
create_secret(name, values, scope=SecretScope.WORKSPACE)
Creates a new secret.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
The name of the secret. |
required |
values
|
Dict[str, str]
|
The values of the secret. |
required |
scope
|
SecretScope
|
The scope of the secret. |
WORKSPACE
|
Returns:
Type | Description |
---|---|
SecretResponse
|
The created secret (in model form). |
Raises:
Type | Description |
---|---|
NotImplementedError
|
If centralized secrets management is not enabled. |
Source code in src/zenml/client.py
4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 |
|
create_service(config, service_type, model_version_id=None)
Registers a service.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
config
|
ServiceConfig
|
The configuration of the service. |
required |
service_type
|
ServiceType
|
The type of the service. |
required |
model_version_id
|
Optional[UUID]
|
The ID of the model version to associate with the service. |
None
|
Returns:
Type | Description |
---|---|
ServiceResponse
|
The registered service. |
Source code in src/zenml/client.py
1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 |
|
create_service_account(name, description='')
Create a new service account.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
The name of the service account. |
required |
description
|
str
|
The description of the service account. |
''
|
Returns:
Type | Description |
---|---|
ServiceAccountResponse
|
The created service account. |
Source code in src/zenml/client.py
7083 7084 7085 7086 7087 7088 7089 7090 7091 7092 7093 7094 7095 7096 7097 7098 7099 7100 7101 7102 7103 7104 |
|
create_service_connector(name, connector_type, resource_type=None, auth_method=None, configuration=None, resource_id=None, description='', expiration_seconds=None, expires_at=None, expires_skew_tolerance=None, labels=None, auto_configure=False, verify=True, list_resources=True, register=True)
Create, validate and/or register a service connector.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
The name of the service connector. |
required |
connector_type
|
str
|
The service connector type. |
required |
auth_method
|
Optional[str]
|
The authentication method of the service connector. May be omitted if auto-configuration is used. |
None
|
resource_type
|
Optional[str]
|
The resource type for the service connector. |
None
|
configuration
|
Optional[Dict[str, str]]
|
The configuration of the service connector. |
None
|
resource_id
|
Optional[str]
|
The resource id of the service connector. |
None
|
description
|
str
|
The description of the service connector. |
''
|
expiration_seconds
|
Optional[int]
|
The expiration time of the service connector. |
None
|
expires_at
|
Optional[datetime]
|
The expiration time of the service connector. |
None
|
expires_skew_tolerance
|
Optional[int]
|
The allowed expiration skew for the service connector credentials. |
None
|
labels
|
Optional[Dict[str, str]]
|
The labels of the service connector. |
None
|
auto_configure
|
bool
|
Whether to automatically configure the service connector from the local environment. |
False
|
verify
|
bool
|
Whether to verify that the service connector configuration and credentials can be used to gain access to the resource. |
True
|
list_resources
|
bool
|
Whether to also list the resources that the service connector can give access to (if verify is True). |
True
|
register
|
bool
|
Whether to register the service connector or not. |
True
|
Returns:
Type | Description |
---|---|
Optional[Union[ServiceConnectorResponse, ServiceConnectorRequest]]
|
The model of the registered service connector and the resources |
Optional[ServiceConnectorResourcesModel]
|
that the service connector can give access to (if verify is True). |
Raises:
Type | Description |
---|---|
ValueError
|
If the arguments are invalid. |
KeyError
|
If the service connector type is not found. |
NotImplementedError
|
If auto-configuration is not supported or not implemented for the service connector type. |
AuthorizationException
|
If the connector verification failed due to authorization issues. |
Source code in src/zenml/client.py
5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 |
|
create_stack(name, components, stack_spec_file=None, labels=None)
Registers a stack and its components.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
The name of the stack to register. |
required |
components
|
Mapping[StackComponentType, Union[str, UUID]]
|
dictionary which maps component types to component names |
required |
stack_spec_file
|
Optional[str]
|
path to the stack spec file |
None
|
labels
|
Optional[Dict[str, Any]]
|
The labels of the stack. |
None
|
Returns:
Type | Description |
---|---|
StackResponse
|
The model of the registered stack. |
Source code in src/zenml/client.py
1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 |
|
create_stack_component(name, flavor, component_type, configuration, labels=None)
Registers a stack component.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
The name of the stack component. |
required |
flavor
|
str
|
The flavor of the stack component. |
required |
component_type
|
StackComponentType
|
The type of the stack component. |
required |
configuration
|
Dict[str, str]
|
The configuration of the stack component. |
required |
labels
|
Optional[Dict[str, Any]]
|
The labels of the stack component. |
None
|
Returns:
Type | Description |
---|---|
ComponentResponse
|
The model of the registered component. |
Source code in src/zenml/client.py
1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 |
|
create_tag(tag)
Creates a new tag.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
tag
|
TagRequest
|
the Tag to be created. |
required |
Returns:
Type | Description |
---|---|
TagResponse
|
The newly created tag. |
Source code in src/zenml/client.py
7515 7516 7517 7518 7519 7520 7521 7522 7523 7524 |
|
create_trigger(name, event_source_id, event_filter, action_id, description='')
Registers a trigger.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
The name of the trigger to create. |
required |
event_source_id
|
UUID
|
The id of the event source id |
required |
event_filter
|
Dict[str, Any]
|
The event filter |
required |
action_id
|
UUID
|
The ID of the action that should be triggered. |
required |
description
|
str
|
The description of the trigger |
''
|
Returns:
Type | Description |
---|---|
TriggerResponse
|
The created trigger. |
Source code in src/zenml/client.py
3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 |
|
create_user(name, password=None, is_admin=False)
Create a new user.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
The name of the user. |
required |
password
|
Optional[str]
|
The password of the user. If not provided, the user will be created with empty password. |
None
|
is_admin
|
bool
|
Whether the user should be an admin. |
False
|
Returns:
Type | Description |
---|---|
UserResponse
|
The model of the created user. |
Source code in src/zenml/client.py
754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 |
|
create_workspace(name, description)
Create a new workspace.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
Name of the workspace. |
required |
description
|
str
|
Description of the workspace. |
required |
Returns:
Type | Description |
---|---|
WorkspaceResponse
|
The created workspace. |
Source code in src/zenml/client.py
969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 |
|
deactivate_user(name_id_or_prefix)
Deactivate a user and generate an activation token.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
str
|
The name or ID of the user to reset. |
required |
Returns:
Type | Description |
---|---|
UserResponse
|
The deactivated user. |
Source code in src/zenml/client.py
931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 |
|
delete_action(name_id_or_prefix)
Delete an action.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
Union[str, UUID]
|
The name, id or prefix id of the action to delete. |
required |
Source code in src/zenml/client.py
3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 |
|
delete_all_model_version_artifact_links(model_version_id, only_links)
Delete all model version to artifact links in Model Control Plane.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model_version_id
|
UUID
|
The id of the model version holding the link. |
required |
only_links
|
bool
|
If true, only delete the link to the artifact. |
required |
Source code in src/zenml/client.py
6587 6588 6589 6590 6591 6592 6593 6594 6595 6596 6597 6598 |
|
delete_api_key(service_account_name_id_or_prefix, name_id_or_prefix)
Delete an API key.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
service_account_name_id_or_prefix
|
Union[str, UUID]
|
The name, ID or prefix of the service account to delete the API key for. |
required |
name_id_or_prefix
|
Union[str, UUID]
|
The name, ID or prefix of the API key. |
required |
Source code in src/zenml/client.py
7486 7487 7488 7489 7490 7491 7492 7493 7494 7495 7496 7497 7498 7499 7500 7501 7502 7503 7504 7505 7506 |
|
delete_artifact(name_id_or_prefix)
Delete an artifact.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
Union[str, UUID]
|
The name, ID or prefix of the artifact to delete. |
required |
Source code in src/zenml/client.py
4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 |
|
delete_artifact_version(name_id_or_prefix, version=None, delete_metadata=True, delete_from_artifact_store=False)
Delete an artifact version.
By default, this will delete only the metadata of the artifact from the database, not the actual object stored in the artifact store.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
Union[str, UUID]
|
The ID of artifact version or name or prefix of the artifact to delete. |
required |
version
|
Optional[str]
|
The version of the artifact to delete. |
None
|
delete_metadata
|
bool
|
If True, delete the metadata of the artifact version from the database. |
True
|
delete_from_artifact_store
|
bool
|
If True, delete the artifact object itself from the artifact store. |
False
|
Source code in src/zenml/client.py
4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 |
|
delete_authorized_device(id_or_prefix)
Delete an authorized device.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id_or_prefix
|
Union[str, UUID]
|
The ID or ID prefix of the authorized device. |
required |
Source code in src/zenml/client.py
6785 6786 6787 6788 6789 6790 6791 6792 6793 6794 6795 6796 6797 6798 |
|
delete_build(id_or_prefix)
Delete a build.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id_or_prefix
|
str
|
The id or id prefix of the build. |
required |
Source code in src/zenml/client.py
2735 2736 2737 2738 2739 2740 2741 2742 |
|
delete_code_repository(name_id_or_prefix)
Delete a code repository.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
Union[str, UUID]
|
The name, ID or prefix of the code repository. |
required |
Source code in src/zenml/client.py
5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 |
|
delete_deployment(id_or_prefix)
Delete a deployment.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id_or_prefix
|
str
|
The id or id prefix of the deployment. |
required |
Source code in src/zenml/client.py
3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 |
|
delete_event_source(name_id_or_prefix)
Deletes an event_source.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
Union[str, UUID]
|
The name, id or prefix id of the event_source to deregister. |
required |
Source code in src/zenml/client.py
2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 |
|
delete_flavor(name_id_or_prefix)
Deletes a flavor.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
str
|
The name, id or prefix of the id for the flavor to delete. |
required |
Source code in src/zenml/client.py
2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 |
|
delete_model(model_name_or_id)
Deletes a model from Model Control Plane.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model_name_or_id
|
Union[str, UUID]
|
name or id of the model to be deleted. |
required |
Source code in src/zenml/client.py
6091 6092 6093 6094 6095 6096 6097 |
|
delete_model_version(model_version_id)
Deletes a model version from Model Control Plane.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model_version_id
|
UUID
|
Id of the model version to be deleted. |
required |
Source code in src/zenml/client.py
6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 |
|
delete_model_version_artifact_link(model_version_id, artifact_version_id)
Delete model version to artifact link in Model Control Plane.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model_version_id
|
UUID
|
The id of the model version holding the link. |
required |
artifact_version_id
|
UUID
|
The id of the artifact version to be deleted. |
required |
Raises:
Type | Description |
---|---|
RuntimeError
|
If more than one artifact link is found for given filters. |
Source code in src/zenml/client.py
6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 6571 6572 6573 6574 6575 6576 6577 6578 6579 6580 6581 6582 6583 6584 6585 |
|
delete_pipeline(name_id_or_prefix)
Delete a pipeline.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
Union[str, UUID]
|
The name, ID or ID prefix of the pipeline. |
required |
Source code in src/zenml/client.py
2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 |
|
delete_pipeline_run(name_id_or_prefix)
Deletes a pipeline run.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
Union[str, UUID]
|
Name, ID, or prefix of the pipeline run. |
required |
Source code in src/zenml/client.py
3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 |
|
delete_run_template(name_id_or_prefix)
Delete a run template.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
Union[str, UUID]
|
Name/ID/ID prefix of the template to delete. |
required |
Source code in src/zenml/client.py
3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 |
|
delete_schedule(name_id_or_prefix)
Delete a schedule.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
Union[str, UUID]
|
The name, id or prefix id of the schedule to delete. |
required |
Source code in src/zenml/client.py
3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 |
|
delete_secret(name_id_or_prefix, scope=None)
Deletes a secret.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
str
|
The name or ID of the secret. |
required |
scope
|
Optional[SecretScope]
|
The scope of the secret to delete. |
None
|
Source code in src/zenml/client.py
4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 |
|
delete_service(name_id_or_prefix)
Delete a service.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
UUID
|
The name or ID of the service to delete. |
required |
Source code in src/zenml/client.py
1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 |
|
delete_service_account(name_id_or_prefix)
Delete a service account.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
Union[str, UUID]
|
The name or ID of the service account to delete. |
required |
Source code in src/zenml/client.py
7212 7213 7214 7215 7216 7217 7218 7219 7220 7221 7222 7223 7224 7225 7226 |
|
delete_service_connector(name_id_or_prefix)
Deletes a registered service connector.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
Union[str, UUID]
|
The ID or name of the service connector to delete. |
required |
Source code in src/zenml/client.py
5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 |
|
delete_stack(name_id_or_prefix, recursive=False)
Deregisters a stack.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
Union[str, UUID]
|
The name, id or prefix id of the stack to deregister. |
required |
recursive
|
bool
|
If |
False
|
Raises:
Type | Description |
---|---|
ValueError
|
If the stack is the currently active stack for this client. |
Source code in src/zenml/client.py
1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 |
|
delete_stack_component(name_id_or_prefix, component_type)
Deletes a registered stack component.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
Union[str, UUID]
|
The model of the component to delete. |
required |
component_type
|
StackComponentType
|
The type of the component to delete. |
required |
Source code in src/zenml/client.py
2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 |
|
delete_tag(tag_name_or_id)
Deletes a tag.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
tag_name_or_id
|
Union[str, UUID]
|
name or id of the tag to be deleted. |
required |
Source code in src/zenml/client.py
7526 7527 7528 7529 7530 7531 7532 |
|
delete_trigger(name_id_or_prefix)
Deletes an trigger.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
Union[str, UUID]
|
The name, id or prefix id of the trigger to deregister. |
required |
Source code in src/zenml/client.py
3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 |
|
delete_trigger_execution(trigger_execution_id)
Delete a trigger execution.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
trigger_execution_id
|
UUID
|
The ID of the trigger execution to delete. |
required |
Source code in src/zenml/client.py
6859 6860 6861 6862 6863 6864 6865 6866 6867 |
|
delete_user(name_id_or_prefix)
Delete a user.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
str
|
The name or ID of the user to delete. |
required |
Source code in src/zenml/client.py
947 948 949 950 951 952 953 954 |
|
delete_workspace(name_id_or_prefix)
Delete a workspace.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
str
|
The name or ID of the workspace to delete. |
required |
Raises:
Type | Description |
---|---|
IllegalOperationError
|
If the workspace to delete is the active workspace. |
Source code in src/zenml/client.py
1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 |
|
find_repository(path=None, enable_warnings=False)
staticmethod
Search for a ZenML repository directory.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path
|
Optional[Path]
|
Optional path to look for the repository. If no path is
given, this function tries to find the repository using the
environment variable |
None
|
enable_warnings
|
bool
|
If |
False
|
Returns:
Type | Description |
---|---|
Optional[Path]
|
Absolute path to a ZenML repository directory or None if no |
Optional[Path]
|
repository directory was found. |
Source code in src/zenml/client.py
547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 |
|
get_action(name_id_or_prefix, allow_name_prefix_match=True, hydrate=True)
Get an action by name, ID or prefix.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
Union[UUID, str]
|
The name, ID or prefix of the action. |
required |
allow_name_prefix_match
|
bool
|
If True, allow matching by name prefix. |
True
|
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
Type | Description |
---|---|
ActionResponse
|
The action. |
Source code in src/zenml/client.py
2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 |
|
get_api_key(service_account_name_id_or_prefix, name_id_or_prefix, allow_name_prefix_match=True, hydrate=True)
Get an API key by name, id or prefix.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
service_account_name_id_or_prefix
|
Union[str, UUID]
|
The name, ID or prefix of the service account to get the API key for. |
required |
name_id_or_prefix
|
Union[str, UUID]
|
The name, ID or ID prefix of the API key. |
required |
allow_name_prefix_match
|
bool
|
If True, allow matching by name prefix. |
True
|
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
Type | Description |
---|---|
APIKeyResponse
|
The API key. |
Source code in src/zenml/client.py
7360 7361 7362 7363 7364 7365 7366 7367 7368 7369 7370 7371 7372 7373 7374 7375 7376 7377 7378 7379 7380 7381 7382 7383 7384 7385 7386 7387 7388 7389 7390 7391 7392 7393 7394 7395 7396 7397 7398 7399 7400 7401 7402 7403 7404 7405 7406 7407 7408 7409 7410 |
|
get_artifact(name_id_or_prefix, hydrate=False)
Get an artifact by name, id or prefix.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
Union[str, UUID]
|
The name, ID or prefix of the artifact to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
Type | Description |
---|---|
ArtifactResponse
|
The artifact. |
Source code in src/zenml/client.py
4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 |
|
get_artifact_version(name_id_or_prefix, version=None, hydrate=True)
Get an artifact version by ID or artifact name.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
Union[str, UUID]
|
Either the ID of the artifact version or the name of the artifact. |
required |
version
|
Optional[str]
|
The version of the artifact to get. Only used if
|
None
|
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
Type | Description |
---|---|
ArtifactVersionResponse
|
The artifact version. |
Source code in src/zenml/client.py
4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 |
|
get_authorized_device(id_or_prefix, allow_id_prefix_match=True, hydrate=True)
Get an authorized device by id or prefix.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id_or_prefix
|
Union[UUID, str]
|
The ID or ID prefix of the authorized device. |
required |
allow_id_prefix_match
|
bool
|
If True, allow matching by ID prefix. |
True
|
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
Type | Description |
---|---|
OAuthDeviceResponse
|
The requested authorized device. |
Raises:
Type | Description |
---|---|
KeyError
|
If no authorized device is found with the given ID or prefix. |
Source code in src/zenml/client.py
6719 6720 6721 6722 6723 6724 6725 6726 6727 6728 6729 6730 6731 6732 6733 6734 6735 6736 6737 6738 6739 6740 6741 6742 6743 6744 6745 6746 6747 6748 6749 6750 6751 6752 6753 6754 6755 6756 6757 6758 6759 |
|
get_build(id_or_prefix, hydrate=True)
Get a build by id or prefix.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id_or_prefix
|
Union[str, UUID]
|
The id or id prefix of the build. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
Type | Description |
---|---|
PipelineBuildResponse
|
The build. |
Raises:
Type | Description |
---|---|
KeyError
|
If no build was found for the given id or prefix. |
ZenKeyError
|
If multiple builds were found that match the given id or prefix. |
Source code in src/zenml/client.py
2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 |
|
get_code_repository(name_id_or_prefix, allow_name_prefix_match=True, hydrate=True)
Get a code repository by name, id or prefix.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
Union[str, UUID]
|
The name, ID or ID prefix of the code repository. |
required |
allow_name_prefix_match
|
bool
|
If True, allow matching by name prefix. |
True
|
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
Type | Description |
---|---|
CodeRepositoryResponse
|
The code repository. |
Source code in src/zenml/client.py
5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 |
|
get_deployment(id_or_prefix, hydrate=True)
Get a deployment by id or prefix.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id_or_prefix
|
Union[str, UUID]
|
The id or id prefix of the deployment. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
Type | Description |
---|---|
PipelineDeploymentResponse
|
The deployment. |
Raises:
Type | Description |
---|---|
KeyError
|
If no deployment was found for the given id or prefix. |
ZenKeyError
|
If multiple deployments were found that match the given id or prefix. |
Source code in src/zenml/client.py
3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 |
|
get_event_source(name_id_or_prefix, allow_name_prefix_match=True, hydrate=True)
Get an event source by name, ID or prefix.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
Union[UUID, str]
|
The name, ID or prefix of the stack. |
required |
allow_name_prefix_match
|
bool
|
If True, allow matching by name prefix. |
True
|
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
Type | Description |
---|---|
EventSourceResponse
|
The event_source. |
Source code in src/zenml/client.py
2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 |
|
get_flavor(name_id_or_prefix, allow_name_prefix_match=True, hydrate=True)
Get a stack component flavor.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
str
|
The name, ID or prefix to the id of the flavor to get. |
required |
allow_name_prefix_match
|
bool
|
If True, allow matching by name prefix. |
True
|
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
Type | Description |
---|---|
FlavorResponse
|
The stack component flavor. |
Source code in src/zenml/client.py
2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 |
|
get_flavor_by_name_and_type(name, component_type)
Fetches a registered flavor.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
component_type
|
StackComponentType
|
The type of the component to fetch. |
required |
name
|
str
|
The name of the flavor to fetch. |
required |
Returns:
Type | Description |
---|---|
FlavorResponse
|
The registered flavor. |
Raises:
Type | Description |
---|---|
KeyError
|
If no flavor exists for the given type and name. |
Source code in src/zenml/client.py
2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 |
|
get_flavors_by_type(component_type)
Fetches the list of flavor for a stack component type.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
component_type
|
StackComponentType
|
The type of the component to fetch. |
required |
Returns:
Type | Description |
---|---|
Page[FlavorResponse]
|
The list of flavors. |
Source code in src/zenml/client.py
2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 |
|
get_instance()
classmethod
Return the Client singleton instance.
Returns:
Source code in src/zenml/client.py
384 385 386 387 388 389 390 391 392 |
|
get_model(model_name_or_id, hydrate=True)
Get an existing model from Model Control Plane.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model_name_or_id
|
Union[str, UUID]
|
name or id of the model to be retrieved. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
Type | Description |
---|---|
ModelResponse
|
The model of interest. |
Source code in src/zenml/client.py
6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 |
|
get_model_version(model_name_or_id=None, model_version_name_or_number_or_id=None, hydrate=True)
Get an existing model version from Model Control Plane.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model_name_or_id
|
Optional[Union[str, UUID]]
|
name or id of the model containing the model version. |
None
|
model_version_name_or_number_or_id
|
Optional[Union[str, int, ModelStages, UUID]]
|
name, id, stage or number of the model version to be retrieved. If skipped - latest version is retrieved. |
None
|
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
Type | Description |
---|---|
ModelVersionResponse
|
The model version of interest. |
Raises:
Type | Description |
---|---|
RuntimeError
|
In case method inputs don't adhere to restrictions. |
KeyError
|
In case no model version with the identifiers exists. |
ValueError
|
In case retrieval is attempted using non UUID model version identifier and no model identifier provided. |
Source code in src/zenml/client.py
6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 |
|
get_pipeline(name_id_or_prefix, hydrate=True)
Get a pipeline by name, id or prefix.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
Union[str, UUID]
|
The name, ID or ID prefix of the pipeline. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
Type | Description |
---|---|
PipelineResponse
|
The pipeline. |
Source code in src/zenml/client.py
2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 |
|
get_pipeline_run(name_id_or_prefix, allow_name_prefix_match=True, hydrate=True)
Gets a pipeline run by name, ID, or prefix.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
Union[str, UUID]
|
Name, ID, or prefix of the pipeline run. |
required |
allow_name_prefix_match
|
bool
|
If True, allow matching by name prefix. |
True
|
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
Type | Description |
---|---|
PipelineRunResponse
|
The pipeline run. |
Source code in src/zenml/client.py
3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 |
|
get_run_step(step_run_id, hydrate=True)
Get a step run by ID.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
step_run_id
|
UUID
|
The ID of the step run to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
Type | Description |
---|---|
StepRunResponse
|
The step run. |
Source code in src/zenml/client.py
3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 |
|
get_run_template(name_id_or_prefix, hydrate=True)
Get a run template.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
Union[str, UUID]
|
Name/ID/ID prefix of the template to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
Type | Description |
---|---|
RunTemplateResponse
|
The run template. |
Source code in src/zenml/client.py
3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 |
|
get_schedule(name_id_or_prefix, allow_name_prefix_match=True, hydrate=True)
Get a schedule by name, id or prefix.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
Union[str, UUID]
|
The name, id or prefix of the schedule. |
required |
allow_name_prefix_match
|
bool
|
If True, allow matching by name prefix. |
True
|
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
Type | Description |
---|---|
ScheduleResponse
|
The schedule. |
Source code in src/zenml/client.py
3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 |
|
get_secret(name_id_or_prefix, scope=None, allow_partial_name_match=True, allow_partial_id_match=True, hydrate=True)
Get a secret.
Get a secret identified by a name, ID or prefix of the name or ID and optionally a scope.
If a scope is not provided, the secret will be searched for in all scopes starting with the innermost scope (user) to the outermost scope (workspace). When a name or prefix is used instead of a UUID value, each scope is first searched for an exact match, then for a ID prefix or name substring match before moving on to the next scope.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
Union[str, UUID]
|
The name, ID or prefix to the id of the secret to get. |
required |
scope
|
Optional[SecretScope]
|
The scope of the secret. If not set, all scopes will be searched starting with the innermost scope (user) to the outermost scope (global) until a secret is found. |
None
|
allow_partial_name_match
|
bool
|
If True, allow partial name matches. |
True
|
allow_partial_id_match
|
bool
|
If True, allow partial ID matches. |
True
|
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
Type | Description |
---|---|
SecretResponse
|
The secret. |
Raises:
Type | Description |
---|---|
KeyError
|
If no secret is found. |
ZenKeyError
|
If multiple secrets are found. |
NotImplementedError
|
If centralized secrets management is not enabled. |
Source code in src/zenml/client.py
4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 |
|
get_secret_by_name_and_scope(name, scope=None, hydrate=True)
Fetches a registered secret with a given name and optional scope.
This is a version of get_secret that restricts the search to a given name and an optional scope, without doing any prefix or UUID matching.
If no scope is provided, the search will be done first in the user scope, then in the workspace scope.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
The name of the secret to get. |
required |
scope
|
Optional[SecretScope]
|
The scope of the secret to get. |
None
|
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
Type | Description |
---|---|
SecretResponse
|
The registered secret. |
Raises:
Type | Description |
---|---|
KeyError
|
If no secret exists for the given name in the given scope. |
Source code in src/zenml/client.py
4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 |
|
get_service(name_id_or_prefix, allow_name_prefix_match=True, hydrate=True, type=None)
Gets a service.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
Union[str, UUID]
|
The name or ID of the service. |
required |
allow_name_prefix_match
|
bool
|
If True, allow matching by name prefix. |
True
|
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
type
|
Optional[str]
|
The type of the service. |
None
|
Returns:
Type | Description |
---|---|
ServiceResponse
|
The Service |
Source code in src/zenml/client.py
1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 |
|
get_service_account(name_id_or_prefix, allow_name_prefix_match=True, hydrate=True)
Gets a service account.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
Union[str, UUID]
|
The name or ID of the service account. |
required |
allow_name_prefix_match
|
bool
|
If True, allow matching by name prefix. |
True
|
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
Type | Description |
---|---|
ServiceAccountResponse
|
The ServiceAccount |
Source code in src/zenml/client.py
7106 7107 7108 7109 7110 7111 7112 7113 7114 7115 7116 7117 7118 7119 7120 7121 7122 7123 7124 7125 7126 7127 7128 7129 |
|
get_service_connector(name_id_or_prefix, allow_name_prefix_match=True, load_secrets=False, hydrate=True)
Fetches a registered service connector.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
Union[str, UUID]
|
The id of the service connector to fetch. |
required |
allow_name_prefix_match
|
bool
|
If True, allow matching by name prefix. |
True
|
load_secrets
|
bool
|
If True, load the secrets for the service connector. |
False
|
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
Type | Description |
---|---|
ServiceConnectorResponse
|
The registered service connector. |
Source code in src/zenml/client.py
5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 |
|
get_service_connector_client(name_id_or_prefix, resource_type=None, resource_id=None, verify=False)
Get the client side of a service connector instance to use with a local client.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
Union[UUID, str]
|
The name, id or prefix of the service connector to use. |
required |
resource_type
|
Optional[str]
|
The type of the resource to connect to. If not provided, the resource type from the service connector configuration will be used. |
None
|
resource_id
|
Optional[str]
|
The ID of a particular resource instance to configure
the local client to connect to. If the connector instance is
already configured with a resource ID that is not the same or
equivalent to the one requested, a |
None
|
verify
|
bool
|
Whether to verify that the service connector configuration and credentials can be used to gain access to the resource. |
False
|
Returns:
Type | Description |
---|---|
ServiceConnector
|
The client side of the indicated service connector instance that can |
ServiceConnector
|
be used to connect to the resource locally. |
Source code in src/zenml/client.py
5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 |
|
get_service_connector_type(connector_type)
Returns the requested service connector type.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
connector_type
|
str
|
the service connector type identifier. |
required |
Returns:
Type | Description |
---|---|
ServiceConnectorTypeModel
|
The requested service connector type. |
Source code in src/zenml/client.py
6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 |
|
get_settings(hydrate=True)
Get the server settings.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
Type | Description |
---|---|
ServerSettingsResponse
|
The server settings. |
Source code in src/zenml/client.py
705 706 707 708 709 710 711 712 713 714 715 |
|
get_stack(name_id_or_prefix=None, allow_name_prefix_match=True, hydrate=True)
Get a stack by name, ID or prefix.
If no name, ID or prefix is provided, the active stack is returned.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
Optional[Union[UUID, str]]
|
The name, ID or prefix of the stack. |
None
|
allow_name_prefix_match
|
bool
|
If True, allow matching by name prefix. |
True
|
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
Type | Description |
---|---|
StackResponse
|
The stack. |
Source code in src/zenml/client.py
1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 |
|
get_stack_component(component_type, name_id_or_prefix=None, allow_name_prefix_match=True, hydrate=True)
Fetches a registered stack component.
If the name_id_or_prefix is provided, it will try to fetch the component with the corresponding identifier. If not, it will try to fetch the active component of the given type.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
component_type
|
StackComponentType
|
The type of the component to fetch |
required |
name_id_or_prefix
|
Optional[Union[str, UUID]]
|
The id of the component to fetch. |
None
|
allow_name_prefix_match
|
bool
|
If True, allow matching by name prefix. |
True
|
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
Type | Description |
---|---|
ComponentResponse
|
The registered stack component. |
Raises:
Type | Description |
---|---|
KeyError
|
If no name_id_or_prefix is provided and no such component is part of the active stack. |
Source code in src/zenml/client.py
1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 |
|
get_tag(tag_name_or_id, hydrate=True)
Get an existing tag.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
tag_name_or_id
|
Union[str, UUID]
|
name or id of the model to be retrieved. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
Type | Description |
---|---|
TagResponse
|
The tag of interest. |
Source code in src/zenml/client.py
7552 7553 7554 7555 7556 7557 7558 7559 7560 7561 7562 7563 7564 7565 7566 7567 |
|
get_trigger(name_id_or_prefix, allow_name_prefix_match=True, hydrate=True)
Get a trigger by name, ID or prefix.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
Union[UUID, str]
|
The name, ID or prefix of the trigger. |
required |
allow_name_prefix_match
|
bool
|
If True, allow matching by name prefix. |
True
|
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
Type | Description |
---|---|
TriggerResponse
|
The trigger. |
Source code in src/zenml/client.py
3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 |
|
get_trigger_execution(trigger_execution_id, hydrate=True)
Get a trigger execution by ID.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
trigger_execution_id
|
UUID
|
The ID of the trigger execution to get. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
Type | Description |
---|---|
TriggerExecutionResponse
|
The trigger execution. |
Source code in src/zenml/client.py
6802 6803 6804 6805 6806 6807 6808 6809 6810 6811 6812 6813 6814 6815 6816 6817 6818 6819 |
|
get_user(name_id_or_prefix, allow_name_prefix_match=True, hydrate=True)
Gets a user.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
Union[str, UUID]
|
The name or ID of the user. |
required |
allow_name_prefix_match
|
bool
|
If True, allow matching by name prefix. |
True
|
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
Type | Description |
---|---|
UserResponse
|
The User |
Source code in src/zenml/client.py
781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 |
|
get_workspace(name_id_or_prefix, allow_name_prefix_match=True, hydrate=True)
Gets a workspace.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
Optional[Union[UUID, str]]
|
The name or ID of the workspace. |
required |
allow_name_prefix_match
|
bool
|
If True, allow matching by name prefix. |
True
|
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
True
|
Returns:
Type | Description |
---|---|
WorkspaceResponse
|
The workspace |
Source code in src/zenml/client.py
985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 |
|
initialize(root=None)
staticmethod
Initializes a new ZenML repository at the given path.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
root
|
Optional[Path]
|
The root directory where the repository should be created. If None, the current working directory is used. |
None
|
Raises:
Type | Description |
---|---|
InitializationException
|
If the root directory already contains a ZenML repository. |
Source code in src/zenml/client.py
497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 |
|
is_inside_repository(file_path)
staticmethod
Returns whether a file is inside the active ZenML repository.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
file_path
|
str
|
A file path. |
required |
Returns:
Type | Description |
---|---|
bool
|
True if the file is inside the active ZenML repository, False |
bool
|
otherwise. |
Source code in src/zenml/client.py
622 623 624 625 626 627 628 629 630 631 632 633 634 635 |
|
is_repository_directory(path)
staticmethod
Checks whether a ZenML client exists at the given path.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path
|
Path
|
The path to check. |
required |
Returns:
Type | Description |
---|---|
bool
|
True if a ZenML client exists at the given path, |
bool
|
False otherwise. |
Source code in src/zenml/client.py
533 534 535 536 537 538 539 540 541 542 543 544 545 |
|
list_actions(sort_by='created', page=PAGINATION_STARTING_PAGE, size=PAGE_SIZE_DEFAULT, logical_operator=LogicalOperators.AND, id=None, created=None, updated=None, name=None, flavor=None, action_type=None, workspace_id=None, user_id=None, user=None, hydrate=False)
List actions.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
sort_by
|
str
|
The column to sort by |
'created'
|
page
|
int
|
The page of items |
PAGINATION_STARTING_PAGE
|
size
|
int
|
The maximum size of all pages |
PAGE_SIZE_DEFAULT
|
logical_operator
|
LogicalOperators
|
Which logical operator to use [and, or] |
AND
|
id
|
Optional[Union[UUID, str]]
|
Use the id of the action to filter by. |
None
|
created
|
Optional[datetime]
|
Use to filter by time of creation |
None
|
updated
|
Optional[datetime]
|
Use the last updated date for filtering |
None
|
workspace_id
|
Optional[Union[str, UUID]]
|
The id of the workspace to filter by. |
None
|
user_id
|
Optional[Union[str, UUID]]
|
The id of the user to filter by. |
None
|
user
|
Optional[Union[UUID, str]]
|
Filter by user name/ID. |
None
|
name
|
Optional[str]
|
The name of the action to filter by. |
None
|
flavor
|
Optional[str]
|
The flavor of the action to filter by. |
None
|
action_type
|
Optional[str]
|
The type of the action to filter by. |
None
|
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
Type | Description |
---|---|
Page[ActionResponse]
|
A page of actions. |
Source code in src/zenml/client.py
3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 |
|
list_api_keys(service_account_name_id_or_prefix, sort_by='created', page=PAGINATION_STARTING_PAGE, size=PAGE_SIZE_DEFAULT, logical_operator=LogicalOperators.AND, id=None, created=None, updated=None, name=None, description=None, active=None, last_login=None, last_rotated=None, hydrate=False)
List all API keys.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
service_account_name_id_or_prefix
|
Union[str, UUID]
|
The name, ID or prefix of the service account to list the API keys for. |
required |
sort_by
|
str
|
The column to sort by. |
'created'
|
page
|
int
|
The page of items. |
PAGINATION_STARTING_PAGE
|
size
|
int
|
The maximum size of all pages. |
PAGE_SIZE_DEFAULT
|
logical_operator
|
LogicalOperators
|
Which logical operator to use [and, or]. |
AND
|
id
|
Optional[Union[UUID, str]]
|
Use the id of the API key to filter by. |
None
|
created
|
Optional[Union[datetime, str]]
|
Use to filter by time of creation. |
None
|
updated
|
Optional[Union[datetime, str]]
|
Use the last updated date for filtering. |
None
|
name
|
Optional[str]
|
The name of the API key to filter by. |
None
|
description
|
Optional[str]
|
The description of the API key to filter by. |
None
|
active
|
Optional[bool]
|
Whether the API key is active or not. |
None
|
last_login
|
Optional[Union[datetime, str]]
|
The last time the API key was used. |
None
|
last_rotated
|
Optional[Union[datetime, str]]
|
The last time the API key was rotated. |
None
|
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
Type | Description |
---|---|
Page[APIKeyResponse]
|
A page of API keys matching the filter description. |
Source code in src/zenml/client.py
7296 7297 7298 7299 7300 7301 7302 7303 7304 7305 7306 7307 7308 7309 7310 7311 7312 7313 7314 7315 7316 7317 7318 7319 7320 7321 7322 7323 7324 7325 7326 7327 7328 7329 7330 7331 7332 7333 7334 7335 7336 7337 7338 7339 7340 7341 7342 7343 7344 7345 7346 7347 7348 7349 7350 7351 7352 7353 7354 7355 7356 7357 7358 |
|
list_artifact_versions(sort_by='created', page=PAGINATION_STARTING_PAGE, size=PAGE_SIZE_DEFAULT, logical_operator=LogicalOperators.AND, id=None, created=None, updated=None, artifact_id=None, name=None, version=None, version_number=None, artifact_store_id=None, type=None, data_type=None, uri=None, materializer=None, workspace_id=None, user_id=None, model_version_id=None, only_unused=False, has_custom_name=None, user=None, model=None, pipeline_run=None, run_metadata=None, tag=None, hydrate=False)
Get a list of artifact versions.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
sort_by
|
str
|
The column to sort by |
'created'
|
page
|
int
|
The page of items |
PAGINATION_STARTING_PAGE
|
size
|
int
|
The maximum size of all pages |
PAGE_SIZE_DEFAULT
|
logical_operator
|
LogicalOperators
|
Which logical operator to use [and, or] |
AND
|
id
|
Optional[Union[UUID, str]]
|
Use the id of artifact version to filter by. |
None
|
created
|
Optional[Union[datetime, str]]
|
Use to filter by time of creation |
None
|
updated
|
Optional[Union[datetime, str]]
|
Use the last updated date for filtering |
None
|
artifact_id
|
Optional[Union[str, UUID]]
|
The id of the artifact to filter by. |
None
|
name
|
Optional[str]
|
The name of the artifact to filter by. |
None
|
version
|
Optional[Union[str, int]]
|
The version of the artifact to filter by. |
None
|
version_number
|
Optional[int]
|
The version number of the artifact to filter by. |
None
|
artifact_store_id
|
Optional[Union[str, UUID]]
|
The id of the artifact store to filter by. |
None
|
type
|
Optional[ArtifactType]
|
The type of the artifact to filter by. |
None
|
data_type
|
Optional[str]
|
The data type of the artifact to filter by. |
None
|
uri
|
Optional[str]
|
The uri of the artifact to filter by. |
None
|
materializer
|
Optional[str]
|
The materializer of the artifact to filter by. |
None
|
workspace_id
|
Optional[Union[str, UUID]]
|
The id of the workspace to filter by. |
None
|
user_id
|
Optional[Union[str, UUID]]
|
The id of the user to filter by. |
None
|
model_version_id
|
Optional[Union[str, UUID]]
|
Filter by model version ID. |
None
|
only_unused
|
Optional[bool]
|
Only return artifact versions that are not used in any pipeline runs. |
False
|
has_custom_name
|
Optional[bool]
|
Filter artifacts with/without custom names. |
None
|
tag
|
Optional[str]
|
A tag to filter by. |
None
|
user
|
Optional[Union[UUID, str]]
|
Filter by user name or ID. |
None
|
model
|
Optional[Union[UUID, str]]
|
Filter by model name or ID. |
None
|
pipeline_run
|
Optional[Union[UUID, str]]
|
Filter by pipeline run name or ID. |
None
|
run_metadata
|
Optional[Dict[str, Any]]
|
Filter by run metadata. |
None
|
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
Type | Description |
---|---|
Page[ArtifactVersionResponse]
|
A list of artifact versions. |
Source code in src/zenml/client.py
4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 |
|
list_artifacts(sort_by='created', page=PAGINATION_STARTING_PAGE, size=PAGE_SIZE_DEFAULT, logical_operator=LogicalOperators.AND, id=None, created=None, updated=None, name=None, has_custom_name=None, hydrate=False, tag=None)
Get a list of artifacts.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
sort_by
|
str
|
The column to sort by |
'created'
|
page
|
int
|
The page of items |
PAGINATION_STARTING_PAGE
|
size
|
int
|
The maximum size of all pages |
PAGE_SIZE_DEFAULT
|
logical_operator
|
LogicalOperators
|
Which logical operator to use [and, or] |
AND
|
id
|
Optional[Union[UUID, str]]
|
Use the id of artifact to filter by. |
None
|
created
|
Optional[Union[datetime, str]]
|
Use to filter by time of creation |
None
|
updated
|
Optional[Union[datetime, str]]
|
Use the last updated date for filtering |
None
|
name
|
Optional[str]
|
The name of the artifact to filter by. |
None
|
has_custom_name
|
Optional[bool]
|
Filter artifacts with/without custom names. |
None
|
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
tag
|
Optional[str]
|
Filter artifacts by tag. |
None
|
Returns:
Type | Description |
---|---|
Page[ArtifactResponse]
|
A list of artifacts. |
Source code in src/zenml/client.py
4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 |
|
list_authorized_devices(sort_by='created', page=PAGINATION_STARTING_PAGE, size=PAGE_SIZE_DEFAULT, logical_operator=LogicalOperators.AND, id=None, created=None, updated=None, expires=None, client_id=None, status=None, trusted_device=None, user=None, failed_auth_attempts=None, last_login=None, hydrate=False)
List all authorized devices.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
sort_by
|
str
|
The column to sort by. |
'created'
|
page
|
int
|
The page of items. |
PAGINATION_STARTING_PAGE
|
size
|
int
|
The maximum size of all pages. |
PAGE_SIZE_DEFAULT
|
logical_operator
|
LogicalOperators
|
Which logical operator to use [and, or]. |
AND
|
id
|
Optional[Union[UUID, str]]
|
Use the id of the code repository to filter by. |
None
|
created
|
Optional[Union[datetime, str]]
|
Use to filter by time of creation. |
None
|
updated
|
Optional[Union[datetime, str]]
|
Use the last updated date for filtering. |
None
|
expires
|
Optional[Union[datetime, str]]
|
Use the expiration date for filtering. |
None
|
client_id
|
Union[UUID, str, None]
|
Use the client id for filtering. |
None
|
status
|
Union[OAuthDeviceStatus, str, None]
|
Use the status for filtering. |
None
|
user
|
Optional[Union[UUID, str]]
|
Filter by user name/ID. |
None
|
trusted_device
|
Union[bool, str, None]
|
Use the trusted device flag for filtering. |
None
|
failed_auth_attempts
|
Union[int, str, None]
|
Use the failed auth attempts for filtering. |
None
|
last_login
|
Optional[Union[datetime, str, None]]
|
Use the last login date for filtering. |
None
|
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
Type | Description |
---|---|
Page[OAuthDeviceResponse]
|
A page of authorized devices matching the filter. |
Source code in src/zenml/client.py
6657 6658 6659 6660 6661 6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 6672 6673 6674 6675 6676 6677 6678 6679 6680 6681 6682 6683 6684 6685 6686 6687 6688 6689 6690 6691 6692 6693 6694 6695 6696 6697 6698 6699 6700 6701 6702 6703 6704 6705 6706 6707 6708 6709 6710 6711 6712 6713 6714 6715 6716 6717 |
|
list_builds(sort_by='created', page=PAGINATION_STARTING_PAGE, size=PAGE_SIZE_DEFAULT, logical_operator=LogicalOperators.AND, id=None, created=None, updated=None, workspace_id=None, user_id=None, user=None, pipeline_id=None, stack_id=None, container_registry_id=None, is_local=None, contains_code=None, zenml_version=None, python_version=None, checksum=None, stack_checksum=None, hydrate=False)
List all builds.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
sort_by
|
str
|
The column to sort by |
'created'
|
page
|
int
|
The page of items |
PAGINATION_STARTING_PAGE
|
size
|
int
|
The maximum size of all pages |
PAGE_SIZE_DEFAULT
|
logical_operator
|
LogicalOperators
|
Which logical operator to use [and, or] |
AND
|
id
|
Optional[Union[UUID, str]]
|
Use the id of build to filter by. |
None
|
created
|
Optional[Union[datetime, str]]
|
Use to filter by time of creation |
None
|
updated
|
Optional[Union[datetime, str]]
|
Use the last updated date for filtering |
None
|
workspace_id
|
Optional[Union[str, UUID]]
|
The id of the workspace to filter by. |
None
|
user_id
|
Optional[Union[str, UUID]]
|
The id of the user to filter by. |
None
|
user
|
Optional[Union[UUID, str]]
|
Filter by user name/ID. |
None
|
pipeline_id
|
Optional[Union[str, UUID]]
|
The id of the pipeline to filter by. |
None
|
stack_id
|
Optional[Union[str, UUID]]
|
The id of the stack to filter by. |
None
|
container_registry_id
|
Optional[Union[UUID, str]]
|
The id of the container registry to filter by. |
None
|
is_local
|
Optional[bool]
|
Use to filter local builds. |
None
|
contains_code
|
Optional[bool]
|
Use to filter builds that contain code. |
None
|
zenml_version
|
Optional[str]
|
The version of ZenML to filter by. |
None
|
python_version
|
Optional[str]
|
The Python version to filter by. |
None
|
checksum
|
Optional[str]
|
The build checksum to filter by. |
None
|
stack_checksum
|
Optional[str]
|
The stack checksum to filter by. |
None
|
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
Type | Description |
---|---|
Page[PipelineBuildResponse]
|
A page with builds fitting the filter description |
Source code in src/zenml/client.py
2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 |
|
list_code_repositories(sort_by='created', page=PAGINATION_STARTING_PAGE, size=PAGE_SIZE_DEFAULT, logical_operator=LogicalOperators.AND, id=None, created=None, updated=None, name=None, workspace_id=None, user_id=None, user=None, hydrate=False)
List all code repositories.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
sort_by
|
str
|
The column to sort by. |
'created'
|
page
|
int
|
The page of items. |
PAGINATION_STARTING_PAGE
|
size
|
int
|
The maximum size of all pages. |
PAGE_SIZE_DEFAULT
|
logical_operator
|
LogicalOperators
|
Which logical operator to use [and, or]. |
AND
|
id
|
Optional[Union[UUID, str]]
|
Use the id of the code repository to filter by. |
None
|
created
|
Optional[Union[datetime, str]]
|
Use to filter by time of creation. |
None
|
updated
|
Optional[Union[datetime, str]]
|
Use the last updated date for filtering. |
None
|
name
|
Optional[str]
|
The name of the code repository to filter by. |
None
|
workspace_id
|
Optional[Union[str, UUID]]
|
The id of the workspace to filter by. |
None
|
user_id
|
Optional[Union[str, UUID]]
|
The id of the user to filter by. |
None
|
user
|
Optional[Union[UUID, str]]
|
Filter by user name/ID. |
None
|
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
Type | Description |
---|---|
Page[CodeRepositoryResponse]
|
A page of code repositories matching the filter description. |
Source code in src/zenml/client.py
5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 |
|
list_deployments(sort_by='created', page=PAGINATION_STARTING_PAGE, size=PAGE_SIZE_DEFAULT, logical_operator=LogicalOperators.AND, id=None, created=None, updated=None, workspace_id=None, user_id=None, user=None, pipeline_id=None, stack_id=None, build_id=None, template_id=None, hydrate=False)
List all deployments.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
sort_by
|
str
|
The column to sort by |
'created'
|
page
|
int
|
The page of items |
PAGINATION_STARTING_PAGE
|
size
|
int
|
The maximum size of all pages |
PAGE_SIZE_DEFAULT
|
logical_operator
|
LogicalOperators
|
Which logical operator to use [and, or] |
AND
|
id
|
Optional[Union[UUID, str]]
|
Use the id of build to filter by. |
None
|
created
|
Optional[Union[datetime, str]]
|
Use to filter by time of creation |
None
|
updated
|
Optional[Union[datetime, str]]
|
Use the last updated date for filtering |
None
|
workspace_id
|
Optional[Union[str, UUID]]
|
The id of the workspace to filter by. |
None
|
user_id
|
Optional[Union[str, UUID]]
|
The id of the user to filter by. |
None
|
user
|
Optional[Union[UUID, str]]
|
Filter by user name/ID. |
None
|
pipeline_id
|
Optional[Union[str, UUID]]
|
The id of the pipeline to filter by. |
None
|
stack_id
|
Optional[Union[str, UUID]]
|
The id of the stack to filter by. |
None
|
build_id
|
Optional[Union[str, UUID]]
|
The id of the build to filter by. |
None
|
template_id
|
Optional[Union[str, UUID]]
|
The ID of the template to filter by. |
None
|
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
Type | Description |
---|---|
Page[PipelineDeploymentResponse]
|
A page with deployments fitting the filter description |
Source code in src/zenml/client.py
3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 |
|
list_event_sources(sort_by='created', page=PAGINATION_STARTING_PAGE, size=PAGE_SIZE_DEFAULT, logical_operator=LogicalOperators.AND, id=None, created=None, updated=None, name=None, flavor=None, event_source_type=None, workspace_id=None, user_id=None, user=None, hydrate=False)
Lists all event_sources.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
sort_by
|
str
|
The column to sort by |
'created'
|
page
|
int
|
The page of items |
PAGINATION_STARTING_PAGE
|
size
|
int
|
The maximum size of all pages |
PAGE_SIZE_DEFAULT
|
logical_operator
|
LogicalOperators
|
Which logical operator to use [and, or] |
AND
|
id
|
Optional[Union[UUID, str]]
|
Use the id of event_sources to filter by. |
None
|
created
|
Optional[datetime]
|
Use to filter by time of creation |
None
|
updated
|
Optional[datetime]
|
Use the last updated date for filtering |
None
|
workspace_id
|
Optional[Union[str, UUID]]
|
The id of the workspace to filter by. |
None
|
user_id
|
Optional[Union[str, UUID]]
|
The id of the user to filter by. |
None
|
user
|
Optional[Union[UUID, str]]
|
Filter by user name/ID. |
None
|
name
|
Optional[str]
|
The name of the event_source to filter by. |
None
|
flavor
|
Optional[str]
|
The flavor of the event_source to filter by. |
None
|
event_source_type
|
Optional[str]
|
The subtype of the event_source to filter by. |
None
|
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
Type | Description |
---|---|
Page[EventSourceResponse]
|
A page of event_sources. |
Source code in src/zenml/client.py
2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 |
|
list_flavors(sort_by='created', page=PAGINATION_STARTING_PAGE, size=PAGE_SIZE_DEFAULT, logical_operator=LogicalOperators.AND, id=None, created=None, updated=None, name=None, type=None, integration=None, user_id=None, user=None, hydrate=False)
Fetches all the flavor models.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
sort_by
|
str
|
The column to sort by |
'created'
|
page
|
int
|
The page of items |
PAGINATION_STARTING_PAGE
|
size
|
int
|
The maximum size of all pages |
PAGE_SIZE_DEFAULT
|
logical_operator
|
LogicalOperators
|
Which logical operator to use [and, or] |
AND
|
id
|
Optional[Union[UUID, str]]
|
Use the id of flavors to filter by. |
None
|
created
|
Optional[datetime]
|
Use to flavors by time of creation |
None
|
updated
|
Optional[datetime]
|
Use the last updated date for filtering |
None
|
user_id
|
Optional[Union[str, UUID]]
|
The id of the user to filter by. |
None
|
user
|
Optional[Union[UUID, str]]
|
Filter by user name/ID. |
None
|
name
|
Optional[str]
|
The name of the flavor to filter by. |
None
|
type
|
Optional[str]
|
The type of the flavor to filter by. |
None
|
integration
|
Optional[str]
|
The integration of the flavor to filter by. |
None
|
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
Type | Description |
---|---|
Page[FlavorResponse]
|
A list of all the flavor models. |
Source code in src/zenml/client.py
2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 |
|
list_model_version_artifact_links(sort_by='created', page=PAGINATION_STARTING_PAGE, size=PAGE_SIZE_DEFAULT, logical_operator=LogicalOperators.AND, created=None, updated=None, model_version_id=None, artifact_version_id=None, artifact_name=None, only_data_artifacts=None, only_model_artifacts=None, only_deployment_artifacts=None, has_custom_name=None, user=None, hydrate=False)
Get model version to artifact links by filter in Model Control Plane.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
sort_by
|
str
|
The column to sort by |
'created'
|
page
|
int
|
The page of items |
PAGINATION_STARTING_PAGE
|
size
|
int
|
The maximum size of all pages |
PAGE_SIZE_DEFAULT
|
logical_operator
|
LogicalOperators
|
Which logical operator to use [and, or] |
AND
|
created
|
Optional[Union[datetime, str]]
|
Use to filter by time of creation |
None
|
updated
|
Optional[Union[datetime, str]]
|
Use the last updated date for filtering |
None
|
model_version_id
|
Optional[Union[UUID, str]]
|
Use the model version id for filtering |
None
|
artifact_version_id
|
Optional[Union[UUID, str]]
|
Use the artifact id for filtering |
None
|
artifact_name
|
Optional[str]
|
Use the artifact name for filtering |
None
|
only_data_artifacts
|
Optional[bool]
|
Use to filter by data artifacts |
None
|
only_model_artifacts
|
Optional[bool]
|
Use to filter by model artifacts |
None
|
only_deployment_artifacts
|
Optional[bool]
|
Use to filter by deployment artifacts |
None
|
has_custom_name
|
Optional[bool]
|
Filter artifacts with/without custom names. |
None
|
user
|
Optional[Union[UUID, str]]
|
Filter by user name/ID. |
None
|
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
Type | Description |
---|---|
Page[ModelVersionArtifactResponse]
|
A page of all model version to artifact links. |
Source code in src/zenml/client.py
6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 |
|
list_model_version_pipeline_run_links(sort_by='created', page=PAGINATION_STARTING_PAGE, size=PAGE_SIZE_DEFAULT, logical_operator=LogicalOperators.AND, created=None, updated=None, model_version_id=None, pipeline_run_id=None, pipeline_run_name=None, user=None, hydrate=False)
Get all model version to pipeline run links by filter.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
sort_by
|
str
|
The column to sort by |
'created'
|
page
|
int
|
The page of items |
PAGINATION_STARTING_PAGE
|
size
|
int
|
The maximum size of all pages |
PAGE_SIZE_DEFAULT
|
logical_operator
|
LogicalOperators
|
Which logical operator to use [and, or] |
AND
|
created
|
Optional[Union[datetime, str]]
|
Use to filter by time of creation |
None
|
updated
|
Optional[Union[datetime, str]]
|
Use the last updated date for filtering |
None
|
model_version_id
|
Optional[Union[UUID, str]]
|
Use the model version id for filtering |
None
|
pipeline_run_id
|
Optional[Union[UUID, str]]
|
Use the pipeline run id for filtering |
None
|
pipeline_run_name
|
Optional[str]
|
Use the pipeline run name for filtering |
None
|
user
|
Optional[Union[UUID, str]]
|
Filter by user name or ID. |
None
|
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response |
False
|
Returns:
Type | Description |
---|---|
Page[ModelVersionPipelineRunResponse]
|
A page of all model version to pipeline run links. |
Source code in src/zenml/client.py
6606 6607 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6618 6619 6620 6621 6622 6623 6624 6625 6626 6627 6628 6629 6630 6631 6632 6633 6634 6635 6636 6637 6638 6639 6640 6641 6642 6643 6644 6645 6646 6647 6648 6649 6650 6651 6652 6653 |
|
list_model_versions(model_name_or_id=None, sort_by='number', page=PAGINATION_STARTING_PAGE, size=PAGE_SIZE_DEFAULT, logical_operator=LogicalOperators.AND, created=None, updated=None, name=None, number=None, stage=None, user=None, hydrate=False, tag=None)
Get model versions by filter from Model Control Plane.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model_name_or_id
|
Optional[Union[str, UUID]]
|
name or id of the model containing the model version. |
None
|
sort_by
|
str
|
The column to sort by |
'number'
|
page
|
int
|
The page of items |
PAGINATION_STARTING_PAGE
|
size
|
int
|
The maximum size of all pages |
PAGE_SIZE_DEFAULT
|
logical_operator
|
LogicalOperators
|
Which logical operator to use [and, or] |
AND
|
created
|
Optional[Union[datetime, str]]
|
Use to filter by time of creation |
None
|
updated
|
Optional[Union[datetime, str]]
|
Use the last updated date for filtering |
None
|
name
|
Optional[str]
|
name or id of the model version. |
None
|
number
|
Optional[int]
|
number of the model version. |
None
|
stage
|
Optional[Union[str, ModelStages]]
|
stage of the model version. |
None
|
user
|
Optional[Union[UUID, str]]
|
Filter by user name/ID. |
None
|
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
tag
|
Optional[str]
|
The tag to filter by. |
None
|
Returns:
Type | Description |
---|---|
Page[ModelVersionResponse]
|
A page object with all model versions. |
Source code in src/zenml/client.py
6385 6386 6387 6388 6389 6390 6391 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 |
|
list_models(sort_by='created', page=PAGINATION_STARTING_PAGE, size=PAGE_SIZE_DEFAULT, logical_operator=LogicalOperators.AND, created=None, updated=None, name=None, user=None, hydrate=False, tag=None)
Get models by filter from Model Control Plane.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
sort_by
|
str
|
The column to sort by |
'created'
|
page
|
int
|
The page of items |
PAGINATION_STARTING_PAGE
|
size
|
int
|
The maximum size of all pages |
PAGE_SIZE_DEFAULT
|
logical_operator
|
LogicalOperators
|
Which logical operator to use [and, or] |
AND
|
created
|
Optional[Union[datetime, str]]
|
Use to filter by time of creation |
None
|
updated
|
Optional[Union[datetime, str]]
|
Use the last updated date for filtering |
None
|
name
|
Optional[str]
|
The name of the model to filter by. |
None
|
user
|
Optional[Union[UUID, str]]
|
Filter by user name/ID. |
None
|
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
tag
|
Optional[str]
|
The tag of the model to filter by. |
None
|
Returns:
Type | Description |
---|---|
Page[ModelResponse]
|
A page object with all models. |
Source code in src/zenml/client.py
6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 |
|
list_pipeline_runs(sort_by='desc:created', page=PAGINATION_STARTING_PAGE, size=PAGE_SIZE_DEFAULT, logical_operator=LogicalOperators.AND, id=None, created=None, updated=None, name=None, workspace_id=None, pipeline_id=None, pipeline_name=None, user_id=None, stack_id=None, schedule_id=None, build_id=None, deployment_id=None, code_repository_id=None, template_id=None, model_version_id=None, orchestrator_run_id=None, status=None, start_time=None, end_time=None, num_steps=None, unlisted=None, templatable=None, tag=None, user=None, run_metadata=None, pipeline=None, code_repository=None, model=None, stack=None, stack_component=None, hydrate=False)
List all pipeline runs.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
sort_by
|
str
|
The column to sort by |
'desc:created'
|
page
|
int
|
The page of items |
PAGINATION_STARTING_PAGE
|
size
|
int
|
The maximum size of all pages |
PAGE_SIZE_DEFAULT
|
logical_operator
|
LogicalOperators
|
Which logical operator to use [and, or] |
AND
|
id
|
Optional[Union[UUID, str]]
|
The id of the runs to filter by. |
None
|
created
|
Optional[Union[datetime, str]]
|
Use to filter by time of creation |
None
|
updated
|
Optional[Union[datetime, str]]
|
Use the last updated date for filtering |
None
|
workspace_id
|
Optional[Union[str, UUID]]
|
The id of the workspace to filter by. |
None
|
pipeline_id
|
Optional[Union[str, UUID]]
|
The id of the pipeline to filter by. |
None
|
pipeline_name
|
Optional[str]
|
DEPRECATED. Use |
None
|
user_id
|
Optional[Union[str, UUID]]
|
The id of the user to filter by. |
None
|
stack_id
|
Optional[Union[str, UUID]]
|
The id of the stack to filter by. |
None
|
schedule_id
|
Optional[Union[str, UUID]]
|
The id of the schedule to filter by. |
None
|
build_id
|
Optional[Union[str, UUID]]
|
The id of the build to filter by. |
None
|
deployment_id
|
Optional[Union[str, UUID]]
|
The id of the deployment to filter by. |
None
|
code_repository_id
|
Optional[Union[str, UUID]]
|
The id of the code repository to filter by. |
None
|
template_id
|
Optional[Union[str, UUID]]
|
The ID of the template to filter by. |
None
|
model_version_id
|
Optional[Union[str, UUID]]
|
The ID of the model version to filter by. |
None
|
orchestrator_run_id
|
Optional[str]
|
The run id of the orchestrator to filter by. |
None
|
name
|
Optional[str]
|
The name of the run to filter by. |
None
|
status
|
Optional[str]
|
The status of the pipeline run |
None
|
start_time
|
Optional[Union[datetime, str]]
|
The start_time for the pipeline run |
None
|
end_time
|
Optional[Union[datetime, str]]
|
The end_time for the pipeline run |
None
|
num_steps
|
Optional[Union[int, str]]
|
The number of steps for the pipeline run |
None
|
unlisted
|
Optional[bool]
|
If the runs should be unlisted or not. |
None
|
templatable
|
Optional[bool]
|
If the runs should be templatable or not. |
None
|
tag
|
Optional[str]
|
Tag to filter by. |
None
|
user
|
Optional[Union[UUID, str]]
|
The name/ID of the user to filter by. |
None
|
run_metadata
|
Optional[Dict[str, Any]]
|
The run_metadata of the run to filter by. |
None
|
pipeline
|
Optional[Union[UUID, str]]
|
The name/ID of the pipeline to filter by. |
None
|
code_repository
|
Optional[Union[UUID, str]]
|
Filter by code repository name/ID. |
None
|
model
|
Optional[Union[UUID, str]]
|
Filter by model name/ID. |
None
|
stack
|
Optional[Union[UUID, str]]
|
Filter by stack name/ID. |
None
|
stack_component
|
Optional[Union[UUID, str]]
|
Filter by stack component name/ID. |
None
|
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
Type | Description |
---|---|
Page[PipelineRunResponse]
|
A page with Pipeline Runs fitting the filter description |
Source code in src/zenml/client.py
3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 |
|
list_pipelines(sort_by='created', page=PAGINATION_STARTING_PAGE, size=PAGE_SIZE_DEFAULT, logical_operator=LogicalOperators.AND, id=None, created=None, updated=None, name=None, latest_run_status=None, workspace_id=None, user_id=None, user=None, tag=None, hydrate=False)
List all pipelines.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
sort_by
|
str
|
The column to sort by |
'created'
|
page
|
int
|
The page of items |
PAGINATION_STARTING_PAGE
|
size
|
int
|
The maximum size of all pages |
PAGE_SIZE_DEFAULT
|
logical_operator
|
LogicalOperators
|
Which logical operator to use [and, or] |
AND
|
id
|
Optional[Union[UUID, str]]
|
Use the id of pipeline to filter by. |
None
|
created
|
Optional[Union[datetime, str]]
|
Use to filter by time of creation |
None
|
updated
|
Optional[Union[datetime, str]]
|
Use the last updated date for filtering |
None
|
name
|
Optional[str]
|
The name of the pipeline to filter by. |
None
|
latest_run_status
|
Optional[str]
|
Filter by the status of the latest run of a pipeline. |
None
|
workspace_id
|
Optional[Union[str, UUID]]
|
The id of the workspace to filter by. |
None
|
user_id
|
Optional[Union[str, UUID]]
|
The id of the user to filter by. |
None
|
user
|
Optional[Union[UUID, str]]
|
The name/ID of the user to filter by. |
None
|
tag
|
Optional[str]
|
Tag to filter by. |
None
|
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
Type | Description |
---|---|
Page[PipelineResponse]
|
A page with Pipeline fitting the filter description |
Source code in src/zenml/client.py
2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 |
|
list_run_steps(sort_by='created', page=PAGINATION_STARTING_PAGE, size=PAGE_SIZE_DEFAULT, logical_operator=LogicalOperators.AND, id=None, created=None, updated=None, name=None, cache_key=None, code_hash=None, status=None, start_time=None, end_time=None, pipeline_run_id=None, deployment_id=None, original_step_run_id=None, workspace_id=None, user_id=None, user=None, model_version_id=None, model=None, run_metadata=None, hydrate=False)
List all pipelines.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
sort_by
|
str
|
The column to sort by |
'created'
|
page
|
int
|
The page of items |
PAGINATION_STARTING_PAGE
|
size
|
int
|
The maximum size of all pages |
PAGE_SIZE_DEFAULT
|
logical_operator
|
LogicalOperators
|
Which logical operator to use [and, or] |
AND
|
id
|
Optional[Union[UUID, str]]
|
Use the id of runs to filter by. |
None
|
created
|
Optional[Union[datetime, str]]
|
Use to filter by time of creation |
None
|
updated
|
Optional[Union[datetime, str]]
|
Use the last updated date for filtering |
None
|
start_time
|
Optional[Union[datetime, str]]
|
Use to filter by the time when the step started running |
None
|
end_time
|
Optional[Union[datetime, str]]
|
Use to filter by the time when the step finished running |
None
|
workspace_id
|
Optional[Union[str, UUID]]
|
The id of the workspace to filter by. |
None
|
user_id
|
Optional[Union[str, UUID]]
|
The id of the user to filter by. |
None
|
user
|
Optional[Union[UUID, str]]
|
Filter by user name/ID. |
None
|
pipeline_run_id
|
Optional[Union[str, UUID]]
|
The id of the pipeline run to filter by. |
None
|
deployment_id
|
Optional[Union[str, UUID]]
|
The id of the deployment to filter by. |
None
|
original_step_run_id
|
Optional[Union[str, UUID]]
|
The id of the original step run to filter by. |
None
|
model_version_id
|
Optional[Union[str, UUID]]
|
The ID of the model version to filter by. |
None
|
model
|
Optional[Union[UUID, str]]
|
Filter by model name/ID. |
None
|
name
|
Optional[str]
|
The name of the step run to filter by. |
None
|
cache_key
|
Optional[str]
|
The cache key of the step run to filter by. |
None
|
code_hash
|
Optional[str]
|
The code hash of the step run to filter by. |
None
|
status
|
Optional[str]
|
The name of the run to filter by. |
None
|
run_metadata
|
Optional[Dict[str, Any]]
|
Filter by run metadata. |
None
|
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
Type | Description |
---|---|
Page[StepRunResponse]
|
A page with Pipeline fitting the filter description |
Source code in src/zenml/client.py
3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 |
|
list_run_templates(sort_by='created', page=PAGINATION_STARTING_PAGE, size=PAGE_SIZE_DEFAULT, logical_operator=LogicalOperators.AND, created=None, updated=None, id=None, name=None, tag=None, workspace_id=None, user_id=None, pipeline_id=None, build_id=None, stack_id=None, code_repository_id=None, user=None, pipeline=None, stack=None, hydrate=False)
Get a page of run templates.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
sort_by
|
str
|
The column to sort by. |
'created'
|
page
|
int
|
The page of items. |
PAGINATION_STARTING_PAGE
|
size
|
int
|
The maximum size of all pages. |
PAGE_SIZE_DEFAULT
|
logical_operator
|
LogicalOperators
|
Which logical operator to use [and, or]. |
AND
|
created
|
Optional[Union[datetime, str]]
|
Filter by the creation date. |
None
|
updated
|
Optional[Union[datetime, str]]
|
Filter by the last updated date. |
None
|
id
|
Optional[Union[UUID, str]]
|
Filter by run template ID. |
None
|
name
|
Optional[str]
|
Filter by run template name. |
None
|
tag
|
Optional[str]
|
Filter by run template tags. |
None
|
workspace_id
|
Optional[Union[str, UUID]]
|
Filter by workspace ID. |
None
|
user_id
|
Optional[Union[str, UUID]]
|
Filter by user ID. |
None
|
pipeline_id
|
Optional[Union[str, UUID]]
|
Filter by pipeline ID. |
None
|
build_id
|
Optional[Union[str, UUID]]
|
Filter by build ID. |
None
|
stack_id
|
Optional[Union[str, UUID]]
|
Filter by stack ID. |
None
|
code_repository_id
|
Optional[Union[str, UUID]]
|
Filter by code repository ID. |
None
|
user
|
Optional[Union[UUID, str]]
|
Filter by user name/ID. |
None
|
pipeline
|
Optional[Union[UUID, str]]
|
Filter by pipeline name/ID. |
None
|
stack
|
Optional[Union[UUID, str]]
|
Filter by stack name/ID. |
None
|
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
Type | Description |
---|---|
Page[RunTemplateResponse]
|
A page of run templates. |
Source code in src/zenml/client.py
3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 |
|
list_schedules(sort_by='created', page=PAGINATION_STARTING_PAGE, size=PAGE_SIZE_DEFAULT, logical_operator=LogicalOperators.AND, id=None, created=None, updated=None, name=None, workspace_id=None, user_id=None, user=None, pipeline_id=None, orchestrator_id=None, active=None, cron_expression=None, start_time=None, end_time=None, interval_second=None, catchup=None, hydrate=False, run_once_start_time=None)
List schedules.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
sort_by
|
str
|
The column to sort by |
'created'
|
page
|
int
|
The page of items |
PAGINATION_STARTING_PAGE
|
size
|
int
|
The maximum size of all pages |
PAGE_SIZE_DEFAULT
|
logical_operator
|
LogicalOperators
|
Which logical operator to use [and, or] |
AND
|
id
|
Optional[Union[UUID, str]]
|
Use the id of stacks to filter by. |
None
|
created
|
Optional[Union[datetime, str]]
|
Use to filter by time of creation |
None
|
updated
|
Optional[Union[datetime, str]]
|
Use the last updated date for filtering |
None
|
name
|
Optional[str]
|
The name of the stack to filter by. |
None
|
workspace_id
|
Optional[Union[str, UUID]]
|
The id of the workspace to filter by. |
None
|
user_id
|
Optional[Union[str, UUID]]
|
The id of the user to filter by. |
None
|
user
|
Optional[Union[UUID, str]]
|
Filter by user name/ID. |
None
|
pipeline_id
|
Optional[Union[str, UUID]]
|
The id of the pipeline to filter by. |
None
|
orchestrator_id
|
Optional[Union[str, UUID]]
|
The id of the orchestrator to filter by. |
None
|
active
|
Optional[Union[str, bool]]
|
Use to filter by active status. |
None
|
cron_expression
|
Optional[str]
|
Use to filter by cron expression. |
None
|
start_time
|
Optional[Union[datetime, str]]
|
Use to filter by start time. |
None
|
end_time
|
Optional[Union[datetime, str]]
|
Use to filter by end time. |
None
|
interval_second
|
Optional[int]
|
Use to filter by interval second. |
None
|
catchup
|
Optional[Union[str, bool]]
|
Use to filter by catchup. |
None
|
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
run_once_start_time
|
Optional[Union[datetime, str]]
|
Use to filter by run once start time. |
None
|
Returns:
Type | Description |
---|---|
Page[ScheduleResponse]
|
A list of schedules. |
Source code in src/zenml/client.py
3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 |
|
list_secrets(sort_by='created', page=PAGINATION_STARTING_PAGE, size=PAGE_SIZE_DEFAULT, logical_operator=LogicalOperators.AND, id=None, created=None, updated=None, name=None, scope=None, workspace_id=None, user_id=None, user=None, hydrate=False)
Fetches all the secret models.
The returned secrets do not contain the secret values. To get the
secret values, use get_secret
individually for each secret.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
sort_by
|
str
|
The column to sort by |
'created'
|
page
|
int
|
The page of items |
PAGINATION_STARTING_PAGE
|
size
|
int
|
The maximum size of all pages |
PAGE_SIZE_DEFAULT
|
logical_operator
|
LogicalOperators
|
Which logical operator to use [and, or] |
AND
|
id
|
Optional[Union[UUID, str]]
|
Use the id of secrets to filter by. |
None
|
created
|
Optional[datetime]
|
Use to secrets by time of creation |
None
|
updated
|
Optional[datetime]
|
Use the last updated date for filtering |
None
|
name
|
Optional[str]
|
The name of the secret to filter by. |
None
|
scope
|
Optional[SecretScope]
|
The scope of the secret to filter by. |
None
|
workspace_id
|
Optional[Union[str, UUID]]
|
The id of the workspace to filter by. |
None
|
user_id
|
Optional[Union[str, UUID]]
|
The id of the user to filter by. |
None
|
user
|
Optional[Union[UUID, str]]
|
Filter by user name/ID. |
None
|
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
Type | Description |
---|---|
Page[SecretResponse]
|
A list of all the secret models without the secret values. |
Raises:
Type | Description |
---|---|
NotImplementedError
|
If centralized secrets management is not enabled. |
Source code in src/zenml/client.py
4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 |
|
list_secrets_in_scope(scope, hydrate=False)
Fetches the list of secret in a given scope.
The returned secrets do not contain the secret values. To get the
secret values, use get_secret
individually for each secret.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
scope
|
SecretScope
|
The secrets scope to search for. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
Type | Description |
---|---|
Page[SecretResponse]
|
The list of secrets in the given scope without the secret values. |
Source code in src/zenml/client.py
4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 |
|
list_service_accounts(sort_by='created', page=PAGINATION_STARTING_PAGE, size=PAGE_SIZE_DEFAULT, logical_operator=LogicalOperators.AND, id=None, created=None, updated=None, name=None, description=None, active=None, hydrate=False)
List all service accounts.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
sort_by
|
str
|
The column to sort by |
'created'
|
page
|
int
|
The page of items |
PAGINATION_STARTING_PAGE
|
size
|
int
|
The maximum size of all pages |
PAGE_SIZE_DEFAULT
|
logical_operator
|
LogicalOperators
|
Which logical operator to use [and, or] |
AND
|
id
|
Optional[Union[UUID, str]]
|
Use the id of stacks to filter by. |
None
|
created
|
Optional[Union[datetime, str]]
|
Use to filter by time of creation |
None
|
updated
|
Optional[Union[datetime, str]]
|
Use the last updated date for filtering |
None
|
name
|
Optional[str]
|
Use the service account name for filtering |
None
|
description
|
Optional[str]
|
Use the service account description for filtering |
None
|
active
|
Optional[bool]
|
Use the service account active status for filtering |
None
|
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
Type | Description |
---|---|
Page[ServiceAccountResponse]
|
The list of service accounts matching the filter description. |
Source code in src/zenml/client.py
7131 7132 7133 7134 7135 7136 7137 7138 7139 7140 7141 7142 7143 7144 7145 7146 7147 7148 7149 7150 7151 7152 7153 7154 7155 7156 7157 7158 7159 7160 7161 7162 7163 7164 7165 7166 7167 7168 7169 7170 7171 7172 7173 7174 7175 7176 7177 7178 |
|
list_service_connector_resources(connector_type=None, resource_type=None, resource_id=None)
List resources that can be accessed by service connectors.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
connector_type
|
Optional[str]
|
The type of service connector to filter by. |
None
|
resource_type
|
Optional[str]
|
The type of resource to filter by. |
None
|
resource_id
|
Optional[str]
|
The ID of a particular resource instance to filter by. |
None
|
Returns:
Type | Description |
---|---|
List[ServiceConnectorResourcesModel]
|
The matching list of resources that available service |
List[ServiceConnectorResourcesModel]
|
connectors have access to. |
Source code in src/zenml/client.py
5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 |
|
list_service_connector_types(connector_type=None, resource_type=None, auth_method=None)
Get a list of service connector types.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
connector_type
|
Optional[str]
|
Filter by connector type. |
None
|
resource_type
|
Optional[str]
|
Filter by resource type. |
None
|
auth_method
|
Optional[str]
|
Filter by authentication method. |
None
|
Returns:
Type | Description |
---|---|
List[ServiceConnectorTypeModel]
|
List of service connector types. |
Source code in src/zenml/client.py
6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 |
|
list_service_connectors(sort_by='created', page=PAGINATION_STARTING_PAGE, size=PAGE_SIZE_DEFAULT, logical_operator=LogicalOperators.AND, id=None, created=None, updated=None, name=None, connector_type=None, auth_method=None, resource_type=None, resource_id=None, workspace_id=None, user_id=None, user=None, labels=None, secret_id=None, hydrate=False)
Lists all registered service connectors.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
sort_by
|
str
|
The column to sort by |
'created'
|
page
|
int
|
The page of items |
PAGINATION_STARTING_PAGE
|
size
|
int
|
The maximum size of all pages |
PAGE_SIZE_DEFAULT
|
logical_operator
|
LogicalOperators
|
Which logical operator to use [and, or] |
AND
|
id
|
Optional[Union[UUID, str]]
|
The id of the service connector to filter by. |
None
|
created
|
Optional[datetime]
|
Filter service connectors by time of creation |
None
|
updated
|
Optional[datetime]
|
Use the last updated date for filtering |
None
|
connector_type
|
Optional[str]
|
Use the service connector type for filtering |
None
|
auth_method
|
Optional[str]
|
Use the service connector auth method for filtering |
None
|
resource_type
|
Optional[str]
|
Filter service connectors by the resource type that they can give access to. |
None
|
resource_id
|
Optional[str]
|
Filter service connectors by the resource id that they can give access to. |
None
|
workspace_id
|
Optional[Union[str, UUID]]
|
The id of the workspace to filter by. |
None
|
user_id
|
Optional[Union[str, UUID]]
|
The id of the user to filter by. |
None
|
user
|
Optional[Union[UUID, str]]
|
Filter by user name/ID. |
None
|
name
|
Optional[str]
|
The name of the service connector to filter by. |
None
|
labels
|
Optional[Dict[str, Optional[str]]]
|
The labels of the service connector to filter by. |
None
|
secret_id
|
Optional[Union[str, UUID]]
|
Filter by the id of the secret that is referenced by the service connector. |
None
|
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
Type | Description |
---|---|
Page[ServiceConnectorResponse]
|
A page of service connectors. |
Source code in src/zenml/client.py
5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 |
|
list_services(sort_by='created', page=PAGINATION_STARTING_PAGE, size=PAGE_SIZE_DEFAULT, logical_operator=LogicalOperators.AND, id=None, created=None, updated=None, type=None, flavor=None, user=None, workspace_id=None, user_id=None, hydrate=False, running=None, service_name=None, pipeline_name=None, pipeline_run_id=None, pipeline_step_name=None, model_version_id=None, config=None)
List all services.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
sort_by
|
str
|
The column to sort by |
'created'
|
page
|
int
|
The page of items |
PAGINATION_STARTING_PAGE
|
size
|
int
|
The maximum size of all pages |
PAGE_SIZE_DEFAULT
|
logical_operator
|
LogicalOperators
|
Which logical operator to use [and, or] |
AND
|
id
|
Optional[Union[UUID, str]]
|
Use the id of services to filter by. |
None
|
created
|
Optional[datetime]
|
Use to filter by time of creation |
None
|
updated
|
Optional[datetime]
|
Use the last updated date for filtering |
None
|
type
|
Optional[str]
|
Use the service type for filtering |
None
|
flavor
|
Optional[str]
|
Use the service flavor for filtering |
None
|
workspace_id
|
Optional[Union[str, UUID]]
|
The id of the workspace to filter by. |
None
|
user_id
|
Optional[Union[str, UUID]]
|
The id of the user to filter by. |
None
|
user
|
Optional[Union[UUID, str]]
|
Filter by user name/ID. |
None
|
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
running
|
Optional[bool]
|
Use the running status for filtering |
None
|
pipeline_name
|
Optional[str]
|
Use the pipeline name for filtering |
None
|
service_name
|
Optional[str]
|
Use the service name or model name for filtering |
None
|
pipeline_step_name
|
Optional[str]
|
Use the pipeline step name for filtering |
None
|
model_version_id
|
Optional[Union[str, UUID]]
|
Use the model version id for filtering |
None
|
config
|
Optional[Dict[str, Any]]
|
Use the config for filtering |
None
|
pipeline_run_id
|
Optional[str]
|
Use the pipeline run id for filtering |
None
|
Returns:
Type | Description |
---|---|
Page[ServiceResponse]
|
The Service response page. |
Source code in src/zenml/client.py
1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 |
|
list_stack_components(sort_by='created', page=PAGINATION_STARTING_PAGE, size=PAGE_SIZE_DEFAULT, logical_operator=LogicalOperators.AND, id=None, created=None, updated=None, name=None, flavor=None, type=None, workspace_id=None, user_id=None, connector_id=None, stack_id=None, user=None, hydrate=False)
Lists all registered stack components.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
sort_by
|
str
|
The column to sort by |
'created'
|
page
|
int
|
The page of items |
PAGINATION_STARTING_PAGE
|
size
|
int
|
The maximum size of all pages |
PAGE_SIZE_DEFAULT
|
logical_operator
|
LogicalOperators
|
Which logical operator to use [and, or] |
AND
|
id
|
Optional[Union[UUID, str]]
|
Use the id of component to filter by. |
None
|
created
|
Optional[datetime]
|
Use to component by time of creation |
None
|
updated
|
Optional[datetime]
|
Use the last updated date for filtering |
None
|
flavor
|
Optional[str]
|
Use the component flavor for filtering |
None
|
type
|
Optional[str]
|
Use the component type for filtering |
None
|
workspace_id
|
Optional[Union[str, UUID]]
|
The id of the workspace to filter by. |
None
|
user_id
|
Optional[Union[str, UUID]]
|
The id of the user to filter by. |
None
|
connector_id
|
Optional[Union[str, UUID]]
|
The id of the connector to filter by. |
None
|
stack_id
|
Optional[Union[str, UUID]]
|
The id of the stack to filter by. |
None
|
name
|
Optional[str]
|
The name of the component to filter by. |
None
|
user
|
Optional[Union[UUID, str]]
|
The ID of name of the user to filter by. |
None
|
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
Type | Description |
---|---|
Page[ComponentResponse]
|
A page of stack components. |
Source code in src/zenml/client.py
1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 |
|
list_stacks(sort_by='created', page=PAGINATION_STARTING_PAGE, size=PAGE_SIZE_DEFAULT, logical_operator=LogicalOperators.AND, id=None, created=None, updated=None, name=None, description=None, workspace_id=None, user_id=None, component_id=None, user=None, component=None, hydrate=False)
Lists all stacks.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
sort_by
|
str
|
The column to sort by |
'created'
|
page
|
int
|
The page of items |
PAGINATION_STARTING_PAGE
|
size
|
int
|
The maximum size of all pages |
PAGE_SIZE_DEFAULT
|
logical_operator
|
LogicalOperators
|
Which logical operator to use [and, or] |
AND
|
id
|
Optional[Union[UUID, str]]
|
Use the id of stacks to filter by. |
None
|
created
|
Optional[Union[datetime, str]]
|
Use to filter by time of creation |
None
|
updated
|
Optional[Union[datetime, str]]
|
Use the last updated date for filtering |
None
|
description
|
Optional[str]
|
Use the stack description for filtering |
None
|
workspace_id
|
Optional[Union[str, UUID]]
|
The id of the workspace to filter by. |
None
|
user_id
|
Optional[Union[str, UUID]]
|
The id of the user to filter by. |
None
|
component_id
|
Optional[Union[str, UUID]]
|
The id of the component to filter by. |
None
|
user
|
Optional[Union[UUID, str]]
|
The name/ID of the user to filter by. |
None
|
component
|
Optional[Union[UUID, str]]
|
The name/ID of the component to filter by. |
None
|
name
|
Optional[str]
|
The name of the stack to filter by. |
None
|
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
Type | Description |
---|---|
Page[StackResponse]
|
A page of stacks. |
Source code in src/zenml/client.py
1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 |
|
list_tags(tag_filter_model, hydrate=False)
Get tags by filter.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
tag_filter_model
|
TagFilter
|
All filter parameters including pagination params. |
required |
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
Type | Description |
---|---|
Page[TagResponse]
|
A page of all tags. |
Source code in src/zenml/client.py
7569 7570 7571 7572 7573 7574 7575 7576 7577 7578 7579 7580 7581 7582 7583 7584 7585 7586 7587 |
|
list_trigger_executions(sort_by='created', page=PAGINATION_STARTING_PAGE, size=PAGE_SIZE_DEFAULT, logical_operator=LogicalOperators.AND, trigger_id=None, user=None, hydrate=False)
List all trigger executions matching the given filter criteria.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
sort_by
|
str
|
The column to sort by. |
'created'
|
page
|
int
|
The page of items. |
PAGINATION_STARTING_PAGE
|
size
|
int
|
The maximum size of all pages. |
PAGE_SIZE_DEFAULT
|
logical_operator
|
LogicalOperators
|
Which logical operator to use [and, or]. |
AND
|
trigger_id
|
Optional[UUID]
|
ID of the trigger to filter by. |
None
|
user
|
Optional[Union[UUID, str]]
|
Filter by user name/ID. |
None
|
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
Type | Description |
---|---|
Page[TriggerExecutionResponse]
|
A list of all trigger executions matching the filter criteria. |
Source code in src/zenml/client.py
6821 6822 6823 6824 6825 6826 6827 6828 6829 6830 6831 6832 6833 6834 6835 6836 6837 6838 6839 6840 6841 6842 6843 6844 6845 6846 6847 6848 6849 6850 6851 6852 6853 6854 6855 6856 6857 |
|
list_triggers(sort_by='created', page=PAGINATION_STARTING_PAGE, size=PAGE_SIZE_DEFAULT, logical_operator=LogicalOperators.AND, id=None, created=None, updated=None, name=None, event_source_id=None, action_id=None, event_source_flavor=None, event_source_subtype=None, action_flavor=None, action_subtype=None, workspace_id=None, user_id=None, user=None, hydrate=False)
Lists all triggers.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
sort_by
|
str
|
The column to sort by |
'created'
|
page
|
int
|
The page of items |
PAGINATION_STARTING_PAGE
|
size
|
int
|
The maximum size of all pages |
PAGE_SIZE_DEFAULT
|
logical_operator
|
LogicalOperators
|
Which logical operator to use [and, or] |
AND
|
id
|
Optional[Union[UUID, str]]
|
Use the id of triggers to filter by. |
None
|
created
|
Optional[datetime]
|
Use to filter by time of creation |
None
|
updated
|
Optional[datetime]
|
Use the last updated date for filtering |
None
|
workspace_id
|
Optional[Union[str, UUID]]
|
The id of the workspace to filter by. |
None
|
user_id
|
Optional[Union[str, UUID]]
|
The id of the user to filter by. |
None
|
user
|
Optional[Union[UUID, str]]
|
Filter by user name/ID. |
None
|
name
|
Optional[str]
|
The name of the trigger to filter by. |
None
|
event_source_id
|
Optional[UUID]
|
The event source associated with the trigger. |
None
|
action_id
|
Optional[UUID]
|
The action associated with the trigger. |
None
|
event_source_flavor
|
Optional[str]
|
Flavor of the event source associated with the trigger. |
None
|
event_source_subtype
|
Optional[str]
|
Type of the event source associated with the trigger. |
None
|
action_flavor
|
Optional[str]
|
Flavor of the action associated with the trigger. |
None
|
action_subtype
|
Optional[str]
|
Type of the action associated with the trigger. |
None
|
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
Type | Description |
---|---|
Page[TriggerResponse]
|
A page of triggers. |
Source code in src/zenml/client.py
3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 |
|
list_users(sort_by='created', page=PAGINATION_STARTING_PAGE, size=PAGE_SIZE_DEFAULT, logical_operator=LogicalOperators.AND, id=None, external_user_id=None, created=None, updated=None, name=None, full_name=None, email=None, active=None, email_opted_in=None, hydrate=False)
List all users.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
sort_by
|
str
|
The column to sort by |
'created'
|
page
|
int
|
The page of items |
PAGINATION_STARTING_PAGE
|
size
|
int
|
The maximum size of all pages |
PAGE_SIZE_DEFAULT
|
logical_operator
|
LogicalOperators
|
Which logical operator to use [and, or] |
AND
|
id
|
Optional[Union[UUID, str]]
|
Use the id of stacks to filter by. |
None
|
external_user_id
|
Optional[str]
|
Use the external user id for filtering. |
None
|
created
|
Optional[Union[datetime, str]]
|
Use to filter by time of creation |
None
|
updated
|
Optional[Union[datetime, str]]
|
Use the last updated date for filtering |
None
|
name
|
Optional[str]
|
Use the username for filtering |
None
|
full_name
|
Optional[str]
|
Use the user full name for filtering |
None
|
email
|
Optional[str]
|
Use the user email for filtering |
None
|
active
|
Optional[bool]
|
User the user active status for filtering |
None
|
email_opted_in
|
Optional[bool]
|
Use the user opt in status for filtering |
None
|
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
Type | Description |
---|---|
Page[UserResponse]
|
The User |
Source code in src/zenml/client.py
806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 |
|
list_workspaces(sort_by='created', page=PAGINATION_STARTING_PAGE, size=PAGE_SIZE_DEFAULT, logical_operator=LogicalOperators.AND, id=None, created=None, updated=None, name=None, hydrate=False)
List all workspaces.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
sort_by
|
str
|
The column to sort by |
'created'
|
page
|
int
|
The page of items |
PAGINATION_STARTING_PAGE
|
size
|
int
|
The maximum size of all pages |
PAGE_SIZE_DEFAULT
|
logical_operator
|
LogicalOperators
|
Which logical operator to use [and, or] |
AND
|
id
|
Optional[Union[UUID, str]]
|
Use the workspace ID to filter by. |
None
|
created
|
Optional[Union[datetime, str]]
|
Use to filter by time of creation |
None
|
updated
|
Optional[Union[datetime, str]]
|
Use the last updated date for filtering |
None
|
name
|
Optional[str]
|
Use the workspace name for filtering |
None
|
hydrate
|
bool
|
Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. |
False
|
Returns:
Type | Description |
---|---|
Page[WorkspaceResponse]
|
Page of workspaces |
Source code in src/zenml/client.py
1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 |
|
login_service_connector(name_id_or_prefix, resource_type=None, resource_id=None, **kwargs)
Use a service connector to authenticate a local client/SDK.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
Union[UUID, str]
|
The name, id or prefix of the service connector to use. |
required |
resource_type
|
Optional[str]
|
The type of the resource to connect to. If not provided, the resource type from the service connector configuration will be used. |
None
|
resource_id
|
Optional[str]
|
The ID of a particular resource instance to configure
the local client to connect to. If the connector instance is
already configured with a resource ID that is not the same or
equivalent to the one requested, a |
None
|
kwargs
|
Any
|
Additional implementation specific keyword arguments to use to configure the client. |
{}
|
Returns:
Type | Description |
---|---|
ServiceConnector
|
The service connector client instance that was used to configure the |
ServiceConnector
|
local client. |
Source code in src/zenml/client.py
5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 |
|
prune_artifacts(only_versions=True, delete_from_artifact_store=False)
Delete all unused artifacts and artifact versions.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
only_versions
|
bool
|
Only delete artifact versions, keeping artifacts |
True
|
delete_from_artifact_store
|
bool
|
Delete data from artifact metadata |
False
|
Source code in src/zenml/client.py
4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 |
|
restore_secrets(ignore_errors=False, delete_secrets=False)
Restore all secrets from the configured backup secrets store.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ignore_errors
|
bool
|
Whether to ignore individual errors during the restore process and attempt to restore all secrets. |
False
|
delete_secrets
|
bool
|
Whether to delete the secrets that have been successfully restored from the backup secrets store. Setting this flag effectively moves all secrets from the backup secrets store to the primary secrets store. |
False
|
Source code in src/zenml/client.py
4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 |
|
rotate_api_key(service_account_name_id_or_prefix, name_id_or_prefix, retain_period_minutes=0, set_key=False)
Rotate an API key.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
service_account_name_id_or_prefix
|
Union[str, UUID]
|
The name, ID or prefix of the service account to rotate the API key for. |
required |
name_id_or_prefix
|
Union[UUID, str]
|
Name, ID or prefix of the API key to update. |
required |
retain_period_minutes
|
int
|
The number of minutes to retain the old API key for. If set to 0, the old API key will be invalidated. |
0
|
set_key
|
bool
|
Whether to set the rotated API key as the active API key. |
False
|
Returns:
Type | Description |
---|---|
APIKeyResponse
|
The updated API key. |
Source code in src/zenml/client.py
7447 7448 7449 7450 7451 7452 7453 7454 7455 7456 7457 7458 7459 7460 7461 7462 7463 7464 7465 7466 7467 7468 7469 7470 7471 7472 7473 7474 7475 7476 7477 7478 7479 7480 7481 7482 7483 7484 |
|
set_active_workspace(workspace_name_or_id)
Set the workspace for the local client.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
workspace_name_or_id
|
Union[str, UUID]
|
The name or ID of the workspace to set active. |
required |
Returns:
Type | Description |
---|---|
WorkspaceResponse
|
The model of the active workspace. |
Source code in src/zenml/client.py
678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 |
|
set_api_key(key)
Configure the client with an API key.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
key
|
str
|
The API key to use. |
required |
Raises:
Type | Description |
---|---|
NotImplementedError
|
If the client is not connected to a ZenML server. |
Source code in src/zenml/client.py
7267 7268 7269 7270 7271 7272 7273 7274 7275 7276 7277 7278 7279 7280 7281 7282 7283 7284 7285 7286 7287 7288 7289 7290 7291 7292 7293 7294 |
|
trigger_pipeline(pipeline_name_or_id=None, run_configuration=None, config_path=None, template_id=None, stack_name_or_id=None, synchronous=False)
Trigger a pipeline from the server.
Usage examples: * Run the latest runnable template for a pipeline:
Client().trigger_pipeline(pipeline_name_or_id=<NAME>)
- Run the latest runnable template for a pipeline on a specific stack:
Client().trigger_pipeline(
pipeline_name_or_id=<NAME>,
stack_name_or_id=<STACK_NAME_OR_ID>
)
- Run a specific template:
Client().trigger_pipeline(template_id=<ID>)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pipeline_name_or_id
|
Union[str, UUID, None]
|
Name or ID of the pipeline. If this is specified, the latest runnable template for this pipeline will be used for the run (Runnable here means that the build associated with the template is for a remote stack without any custom flavor stack components). If not given, a template ID that should be run needs to be specified. |
None
|
run_configuration
|
Union[PipelineRunConfiguration, Dict[str, Any], None]
|
Configuration for the run. Either this or a path to a config file can be specified. |
None
|
config_path
|
Optional[str]
|
Path to a YAML configuration file. This file will be
parsed as a |
None
|
template_id
|
Optional[UUID]
|
ID of the template to run. Either this or a pipeline can be specified. |
None
|
stack_name_or_id
|
Union[str, UUID, None]
|
Name or ID of the stack on which to run the pipeline. If not specified, this method will try to find a runnable template on any stack. |
None
|
synchronous
|
bool
|
If |
False
|
Raises:
Type | Description |
---|---|
RuntimeError
|
If triggering the pipeline failed. |
Returns:
Type | Description |
---|---|
PipelineRunResponse
|
Model of the pipeline run. |
Source code in src/zenml/client.py
2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 |
|
update_action(name_id_or_prefix, name=None, description=None, configuration=None, service_account_id=None, auth_window=None)
Update an action.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
Union[UUID, str]
|
The name, id or prefix of the action to update. |
required |
name
|
Optional[str]
|
The new name of the action. |
None
|
description
|
Optional[str]
|
The new description of the action. |
None
|
configuration
|
Optional[Dict[str, Any]]
|
The new configuration of the action. |
None
|
service_account_id
|
Optional[UUID]
|
The new service account that is used to execute the action. |
None
|
auth_window
|
Optional[int]
|
The new time window in minutes for which the service account is authorized to execute the action. Set this to 0 to authorize the service account indefinitely (not recommended). |
None
|
Returns:
Type | Description |
---|---|
ActionResponse
|
The updated action. |
Source code in src/zenml/client.py
3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 |
|
update_api_key(service_account_name_id_or_prefix, name_id_or_prefix, name=None, description=None, active=None)
Update an API key.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
service_account_name_id_or_prefix
|
Union[str, UUID]
|
The name, ID or prefix of the service account to update the API key for. |
required |
name_id_or_prefix
|
Union[UUID, str]
|
Name, ID or prefix of the API key to update. |
required |
name
|
Optional[str]
|
New name of the API key. |
None
|
description
|
Optional[str]
|
New description of the API key. |
None
|
active
|
Optional[bool]
|
Whether the API key is active or not. |
None
|
Returns:
Type | Description |
---|---|
APIKeyResponse
|
The updated API key. |
Source code in src/zenml/client.py
7412 7413 7414 7415 7416 7417 7418 7419 7420 7421 7422 7423 7424 7425 7426 7427 7428 7429 7430 7431 7432 7433 7434 7435 7436 7437 7438 7439 7440 7441 7442 7443 7444 7445 |
|
update_artifact(name_id_or_prefix, new_name=None, add_tags=None, remove_tags=None, has_custom_name=None)
Update an artifact.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
Union[str, UUID]
|
The name, ID or prefix of the artifact to update. |
required |
new_name
|
Optional[str]
|
The new name of the artifact. |
None
|
add_tags
|
Optional[List[str]]
|
Tags to add to the artifact. |
None
|
remove_tags
|
Optional[List[str]]
|
Tags to remove from the artifact. |
None
|
has_custom_name
|
Optional[bool]
|
Whether the artifact has a custom name. |
None
|
Returns:
Type | Description |
---|---|
ArtifactResponse
|
The updated artifact. |
Source code in src/zenml/client.py
4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 |
|
update_artifact_version(name_id_or_prefix, version=None, add_tags=None, remove_tags=None)
Update an artifact version.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
Union[str, UUID]
|
The name, ID or prefix of the artifact to update. |
required |
version
|
Optional[str]
|
The version of the artifact to update. Only used if
|
None
|
add_tags
|
Optional[List[str]]
|
Tags to add to the artifact version. |
None
|
remove_tags
|
Optional[List[str]]
|
Tags to remove from the artifact version. |
None
|
Returns:
Type | Description |
---|---|
ArtifactVersionResponse
|
The updated artifact version. |
Source code in src/zenml/client.py
4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 |
|
update_authorized_device(id_or_prefix, locked=None)
Update an authorized device.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id_or_prefix
|
Union[UUID, str]
|
The ID or ID prefix of the authorized device. |
required |
locked
|
Optional[bool]
|
Whether to lock or unlock the authorized device. |
None
|
Returns:
Type | Description |
---|---|
OAuthDeviceResponse
|
The updated authorized device. |
Source code in src/zenml/client.py
6761 6762 6763 6764 6765 6766 6767 6768 6769 6770 6771 6772 6773 6774 6775 6776 6777 6778 6779 6780 6781 6782 6783 |
|
update_code_repository(name_id_or_prefix, name=None, description=None, logo_url=None, config=None)
Update a code repository.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
Union[UUID, str]
|
Name, ID or prefix of the code repository to update. |
required |
name
|
Optional[str]
|
New name of the code repository. |
None
|
description
|
Optional[str]
|
New description of the code repository. |
None
|
logo_url
|
Optional[str]
|
New logo URL of the code repository. |
None
|
config
|
Optional[Dict[str, Any]]
|
New configuration options for the code repository. Will
be used to update the existing configuration values. To remove
values from the existing configuration, set the value for that
key to |
None
|
Returns:
Type | Description |
---|---|
CodeRepositoryResponse
|
The updated code repository. |
Source code in src/zenml/client.py
5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 |
|
update_event_source(name_id_or_prefix, name=None, description=None, configuration=None, rotate_secret=None, is_active=None)
Updates a event_source.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
Union[UUID, str]
|
The name, id or prefix of the event_source to update. |
required |
name
|
Optional[str]
|
the new name of the event_source. |
None
|
description
|
Optional[str]
|
the new description of the event_source. |
None
|
configuration
|
Optional[Dict[str, Any]]
|
The event source configuration. |
None
|
rotate_secret
|
Optional[bool]
|
Allows rotating of secret, if true, the response will contain the new secret value |
None
|
is_active
|
Optional[bool]
|
Optional[bool] = Allows for activation/deactivating the event source |
None
|
Returns:
Type | Description |
---|---|
EventSourceResponse
|
The model of the updated event_source. |
Raises:
Type | Description |
---|---|
EntityExistsError
|
If the event_source name is already taken. |
Source code in src/zenml/client.py
2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 |
|
update_model(model_name_or_id, name=None, license=None, description=None, audience=None, use_cases=None, limitations=None, trade_offs=None, ethics=None, add_tags=None, remove_tags=None, save_models_to_registry=None)
Updates an existing model in Model Control Plane.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model_name_or_id
|
Union[str, UUID]
|
name or id of the model to be deleted. |
required |
name
|
Optional[str]
|
The name of the model. |
None
|
license
|
Optional[str]
|
The license under which the model is created. |
None
|
description
|
Optional[str]
|
The description of the model. |
None
|
audience
|
Optional[str]
|
The target audience of the model. |
None
|
use_cases
|
Optional[str]
|
The use cases of the model. |
None
|
limitations
|
Optional[str]
|
The known limitations of the model. |
None
|
trade_offs
|
Optional[str]
|
The tradeoffs of the model. |
None
|
ethics
|
Optional[str]
|
The ethical implications of the model. |
None
|
add_tags
|
Optional[List[str]]
|
Tags to add to the model. |
None
|
remove_tags
|
Optional[List[str]]
|
Tags to remove from to the model. |
None
|
save_models_to_registry
|
Optional[bool]
|
Whether to save the model to the registry. |
None
|
Returns:
Type | Description |
---|---|
ModelResponse
|
The updated model. |
Source code in src/zenml/client.py
6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 |
|
update_model_version(model_name_or_id, version_name_or_id, stage=None, force=False, name=None, description=None, add_tags=None, remove_tags=None)
Get all model versions by filter.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model_name_or_id
|
Union[str, UUID]
|
The name or ID of the model containing model version. |
required |
version_name_or_id
|
Union[str, UUID]
|
The name or ID of model version to be updated. |
required |
stage
|
Optional[Union[str, ModelStages]]
|
Target model version stage to be set. |
None
|
force
|
bool
|
Whether existing model version in target stage should be silently archived or an error should be raised. |
False
|
name
|
Optional[str]
|
Target model version name to be set. |
None
|
description
|
Optional[str]
|
Target model version description to be set. |
None
|
add_tags
|
Optional[List[str]]
|
Tags to add to the model version. |
None
|
remove_tags
|
Optional[List[str]]
|
Tags to remove from to the model version. |
None
|
Returns:
Type | Description |
---|---|
ModelVersionResponse
|
An updated model version. |
Source code in src/zenml/client.py
6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 |
|
update_run_template(name_id_or_prefix, name=None, description=None, add_tags=None, remove_tags=None)
Update a run template.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
Union[str, UUID]
|
Name/ID/ID prefix of the template to update. |
required |
name
|
Optional[str]
|
The new name of the run template. |
None
|
description
|
Optional[str]
|
The new description of the run template. |
None
|
add_tags
|
Optional[List[str]]
|
Tags to add to the run template. |
None
|
remove_tags
|
Optional[List[str]]
|
Tags to remove from the run template. |
None
|
Returns:
Type | Description |
---|---|
RunTemplateResponse
|
The updated run template. |
Source code in src/zenml/client.py
3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 |
|
update_secret(name_id_or_prefix, scope=None, new_name=None, new_scope=None, add_or_update_values=None, remove_values=None)
Updates a secret.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
Union[str, UUID]
|
The name, id or prefix of the id for the secret to update. |
required |
scope
|
Optional[SecretScope]
|
The scope of the secret to update. |
None
|
new_name
|
Optional[str]
|
The new name of the secret. |
None
|
new_scope
|
Optional[SecretScope]
|
The new scope of the secret. |
None
|
add_or_update_values
|
Optional[Dict[str, str]]
|
The values to add or update. |
None
|
remove_values
|
Optional[List[str]]
|
The values to remove. |
None
|
Returns:
Type | Description |
---|---|
SecretResponse
|
The updated secret. |
Raises:
Type | Description |
---|---|
KeyError
|
If trying to remove a value that doesn't exist. |
ValueError
|
If a key is provided in both add_or_update_values and remove_values. |
Source code in src/zenml/client.py
4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 |
|
update_server_settings(updated_name=None, updated_logo_url=None, updated_enable_analytics=None, updated_enable_announcements=None, updated_enable_updates=None, updated_onboarding_state=None)
Update the server settings.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
updated_name
|
Optional[str]
|
Updated name for the server. |
None
|
updated_logo_url
|
Optional[str]
|
Updated logo URL for the server. |
None
|
updated_enable_analytics
|
Optional[bool]
|
Updated value whether to enable analytics for the server. |
None
|
updated_enable_announcements
|
Optional[bool]
|
Updated value whether to display announcements about ZenML. |
None
|
updated_enable_updates
|
Optional[bool]
|
Updated value whether to display updates about ZenML. |
None
|
updated_onboarding_state
|
Optional[Dict[str, Any]]
|
Updated onboarding state for the server. |
None
|
Returns:
Type | Description |
---|---|
ServerSettingsResponse
|
The updated server settings. |
Source code in src/zenml/client.py
717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 |
|
update_service(id, name=None, service_source=None, admin_state=None, status=None, endpoint=None, labels=None, prediction_url=None, health_check_url=None, model_version_id=None)
Update a service.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id
|
UUID
|
The ID of the service to update. |
required |
name
|
Optional[str]
|
The new name of the service. |
None
|
admin_state
|
Optional[ServiceState]
|
The new admin state of the service. |
None
|
status
|
Optional[Dict[str, Any]]
|
The new status of the service. |
None
|
endpoint
|
Optional[Dict[str, Any]]
|
The new endpoint of the service. |
None
|
service_source
|
Optional[str]
|
The new service source of the service. |
None
|
labels
|
Optional[Dict[str, str]]
|
The new labels of the service. |
None
|
prediction_url
|
Optional[str]
|
The new prediction url of the service. |
None
|
health_check_url
|
Optional[str]
|
The new health check url of the service. |
None
|
model_version_id
|
Optional[UUID]
|
The new model version id of the service. |
None
|
Returns:
Type | Description |
---|---|
ServiceResponse
|
The updated service. |
Source code in src/zenml/client.py
1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 |
|
update_service_account(name_id_or_prefix, updated_name=None, description=None, active=None)
Update a service account.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
Union[str, UUID]
|
The name or ID of the service account to update. |
required |
updated_name
|
Optional[str]
|
The new name of the service account. |
None
|
description
|
Optional[str]
|
The new description of the service account. |
None
|
active
|
Optional[bool]
|
The new active status of the service account. |
None
|
Returns:
Type | Description |
---|---|
ServiceAccountResponse
|
The updated service account. |
Source code in src/zenml/client.py
7180 7181 7182 7183 7184 7185 7186 7187 7188 7189 7190 7191 7192 7193 7194 7195 7196 7197 7198 7199 7200 7201 7202 7203 7204 7205 7206 7207 7208 7209 7210 |
|
update_service_connector(name_id_or_prefix, name=None, auth_method=None, resource_type=None, configuration=None, resource_id=None, description=None, expires_at=None, expires_skew_tolerance=None, expiration_seconds=None, labels=None, verify=True, list_resources=True, update=True)
Validate and/or register an updated service connector.
If the resource_type
, resource_id
and expiration_seconds
parameters are set to their "empty" values (empty string for resource
type and resource ID, 0 for expiration seconds), the existing values
will be removed from the service connector. Setting them to None or
omitting them will not affect the existing values.
If supplied, the configuration
parameter is a full replacement of the
existing configuration rather than a partial update.
Labels can be updated or removed by setting the label value to None.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
Union[UUID, str]
|
The name, id or prefix of the service connector to update. |
required |
name
|
Optional[str]
|
The new name of the service connector. |
None
|
auth_method
|
Optional[str]
|
The new authentication method of the service connector. |
None
|
resource_type
|
Optional[str]
|
The new resource type for the service connector. If set to the empty string, the existing resource type will be removed. |
None
|
configuration
|
Optional[Dict[str, str]]
|
The new configuration of the service connector. If set, this needs to be a full replacement of the existing configuration rather than a partial update. |
None
|
resource_id
|
Optional[str]
|
The new resource id of the service connector. If set to the empty string, the existing resource ID will be removed. |
None
|
description
|
Optional[str]
|
The description of the service connector. |
None
|
expires_at
|
Optional[datetime]
|
The new UTC expiration time of the service connector. |
None
|
expires_skew_tolerance
|
Optional[int]
|
The allowed expiration skew for the service connector credentials. |
None
|
expiration_seconds
|
Optional[int]
|
The expiration time of the service connector. If set to 0, the existing expiration time will be removed. |
None
|
labels
|
Optional[Dict[str, Optional[str]]]
|
The service connector to update or remove. If a label value is set to None, the label will be removed. |
None
|
verify
|
bool
|
Whether to verify that the service connector configuration and credentials can be used to gain access to the resource. |
True
|
list_resources
|
bool
|
Whether to also list the resources that the service connector can give access to (if verify is True). |
True
|
update
|
bool
|
Whether to update the service connector or not. |
True
|
Returns:
Type | Description |
---|---|
Optional[Union[ServiceConnectorResponse, ServiceConnectorUpdate]]
|
The model of the registered service connector and the resources |
Optional[ServiceConnectorResourcesModel]
|
that the service connector can give access to (if verify is True). |
Raises:
Type | Description |
---|---|
AuthorizationException
|
If the service connector verification fails due to invalid credentials or insufficient permissions. |
Source code in src/zenml/client.py
5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 |
|
update_stack(name_id_or_prefix=None, name=None, stack_spec_file=None, labels=None, description=None, component_updates=None)
Updates a stack and its components.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
Optional[Union[UUID, str]]
|
The name, id or prefix of the stack to update. |
None
|
name
|
Optional[str]
|
the new name of the stack. |
None
|
stack_spec_file
|
Optional[str]
|
path to the stack spec file. |
None
|
labels
|
Optional[Dict[str, Any]]
|
The new labels of the stack component. |
None
|
description
|
Optional[str]
|
the new description of the stack. |
None
|
component_updates
|
Optional[Dict[StackComponentType, List[Union[UUID, str]]]]
|
dictionary which maps stack component types to lists of new stack component names or ids. |
None
|
Returns:
Type | Description |
---|---|
StackResponse
|
The model of the updated stack. |
Raises:
Type | Description |
---|---|
EntityExistsError
|
If the stack name is already taken. |
Source code in src/zenml/client.py
1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 |
|
update_stack_component(name_id_or_prefix, component_type, name=None, configuration=None, labels=None, disconnect=None, connector_id=None, connector_resource_id=None)
Updates a stack component.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
Optional[Union[UUID, str]]
|
The name, id or prefix of the stack component to update. |
required |
component_type
|
StackComponentType
|
The type of the stack component to update. |
required |
name
|
Optional[str]
|
The new name of the stack component. |
None
|
configuration
|
Optional[Dict[str, Any]]
|
The new configuration of the stack component. |
None
|
labels
|
Optional[Dict[str, Any]]
|
The new labels of the stack component. |
None
|
disconnect
|
Optional[bool]
|
Whether to disconnect the stack component from its service connector. |
None
|
connector_id
|
Optional[UUID]
|
The new connector id of the stack component. |
None
|
connector_resource_id
|
Optional[str]
|
The new connector resource id of the stack component. |
None
|
Returns:
Type | Description |
---|---|
ComponentResponse
|
The updated stack component. |
Raises:
Type | Description |
---|---|
EntityExistsError
|
If the new name is already taken. |
Source code in src/zenml/client.py
2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 |
|
update_tag(tag_name_or_id, tag_update_model)
Updates an existing tag.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
tag_name_or_id
|
Union[str, UUID]
|
name or UUID of the tag to be updated. |
required |
tag_update_model
|
TagUpdate
|
the tag to be updated. |
required |
Returns:
Type | Description |
---|---|
TagResponse
|
The updated tag. |
Source code in src/zenml/client.py
7534 7535 7536 7537 7538 7539 7540 7541 7542 7543 7544 7545 7546 7547 7548 7549 7550 |
|
update_trigger(name_id_or_prefix, name=None, description=None, event_filter=None, is_active=None)
Updates a trigger.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
Union[UUID, str]
|
The name, id or prefix of the trigger to update. |
required |
name
|
Optional[str]
|
the new name of the trigger. |
None
|
description
|
Optional[str]
|
the new description of the trigger. |
None
|
event_filter
|
Optional[Dict[str, Any]]
|
The event filter configuration. |
None
|
is_active
|
Optional[bool]
|
Whether the trigger is active or not. |
None
|
Returns:
Type | Description |
---|---|
TriggerResponse
|
The model of the updated trigger. |
Raises:
Type | Description |
---|---|
EntityExistsError
|
If the trigger name is already taken. |
Source code in src/zenml/client.py
3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 |
|
update_user(name_id_or_prefix, updated_name=None, updated_full_name=None, updated_email=None, updated_email_opt_in=None, updated_password=None, old_password=None, updated_is_admin=None, updated_metadata=None, active=None)
Update a user.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
Union[str, UUID]
|
The name or ID of the user to update. |
required |
updated_name
|
Optional[str]
|
The new name of the user. |
None
|
updated_full_name
|
Optional[str]
|
The new full name of the user. |
None
|
updated_email
|
Optional[str]
|
The new email of the user. |
None
|
updated_email_opt_in
|
Optional[bool]
|
The new email opt-in status of the user. |
None
|
updated_password
|
Optional[str]
|
The new password of the user. |
None
|
old_password
|
Optional[str]
|
The old password of the user. Required for password update. |
None
|
updated_is_admin
|
Optional[bool]
|
Whether the user should be an admin. |
None
|
updated_metadata
|
Optional[Dict[str, Any]]
|
The new metadata for the user. |
None
|
active
|
Optional[bool]
|
Use to activate or deactivate the user. |
None
|
Returns:
Type | Description |
---|---|
UserResponse
|
The updated user. |
Raises:
Type | Description |
---|---|
ValidationError
|
If the old password is not provided when updating the password. |
Source code in src/zenml/client.py
864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 |
|
update_workspace(name_id_or_prefix, new_name=None, new_description=None)
Update a workspace.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
Optional[Union[UUID, str]]
|
Name, ID or prefix of the workspace to update. |
required |
new_name
|
Optional[str]
|
New name of the workspace. |
None
|
new_description
|
Optional[str]
|
New description of the workspace. |
None
|
Returns:
Type | Description |
---|---|
WorkspaceResponse
|
The updated workspace. |
Source code in src/zenml/client.py
1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 |
|
verify_service_connector(name_id_or_prefix, resource_type=None, resource_id=None, list_resources=True)
Verifies if a service connector has access to one or more resources.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
Union[UUID, str]
|
The name, id or prefix of the service connector to verify. |
required |
resource_type
|
Optional[str]
|
The type of the resource for which to verify access. If not provided, the resource type from the service connector configuration will be used. |
None
|
resource_id
|
Optional[str]
|
The ID of the resource for which to verify access. If not provided, the resource ID from the service connector configuration will be used. |
None
|
list_resources
|
bool
|
Whether to list the resources that the service connector has access to. |
True
|
Returns:
Type | Description |
---|---|
ServiceConnectorResourcesModel
|
The list of resources that the service connector has access to, |
ServiceConnectorResourcesModel
|
scoped to the supplied resource type and ID, if provided. |
Raises:
Type | Description |
---|---|
AuthorizationException
|
If the service connector does not have access to the resources. |
Source code in src/zenml/client.py
5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 |
|
CodeRepositoryFilter
Bases: WorkspaceScopedFilter
Model to enable advanced filtering of all code repositories.
Source code in src/zenml/models/v2/core/code_repository.py
184 185 186 187 188 189 190 |
|
ColorVariants
Bases: StrEnum
All possible color variants for frontend.
Source code in src/zenml/enums.py
336 337 338 339 340 341 342 343 344 345 346 347 348 349 |
|
ComponentFilter
Bases: WorkspaceScopedFilter
Model to enable advanced filtering of all ComponentModels.
The Component Model needs additional scoping. As such the _scope_user
field can be set to the user that is doing the filtering. The
generate_filter()
method of the baseclass is overwritten to include the
scoping.
Source code in src/zenml/models/v2/core/component.py
349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 |
|
generate_filter(table)
Generate the filter for the query.
Stack components can be scoped by type to narrow the search.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
table
|
Type[AnySchema]
|
The Table that is being queried from. |
required |
Returns:
Type | Description |
---|---|
Union[ColumnElement[bool]]
|
The filter expression for the query. |
Source code in src/zenml/models/v2/core/component.py
402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 |
|
set_scope_type(component_type)
Set the type of component on which to perform the filtering to scope the response.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
component_type
|
str
|
The type of component to scope the query to. |
required |
Source code in src/zenml/models/v2/core/component.py
394 395 396 397 398 399 400 |
|
ComponentInfo
Bases: BaseModel
Information about each stack components when creating a full stack.
Source code in src/zenml/models/v2/misc/info_models.py
34 35 36 37 38 39 40 41 42 43 44 45 46 |
|
CredentialsNotValid
Bases: AuthorizationException
Raised when the credentials provided are invalid.
This is a subclass of AuthorizationException and should only be raised when the authentication credentials are invalid (e.g. expired API token, invalid username/password, invalid signature). If caught by the ZenML client, it will trigger an invalidation of the currently cached API token and a re-authentication flow.
Source code in src/zenml/exceptions.py
50 51 52 53 54 55 56 57 58 |
|
DatabaseBackupStrategy
Bases: StrEnum
All available database backup strategies.
Source code in src/zenml/enums.py
382 383 384 385 386 387 388 389 390 391 392 |
|
EntityExistsError
Bases: ZenMLBaseException
Raised when trying to register an entity that already exists.
Source code in src/zenml/exceptions.py
167 168 |
|
Environment
Provides environment information.
Individual environment components can be registered separately to extend
the global Environment object with additional information (see
BaseEnvironmentComponent
).
Source code in src/zenml/environment.py
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 |
|
__init__()
Initializes an Environment instance.
Note: Environment is a singleton class, which means this method will
only get called once. All following Environment()
calls will return
the previously initialized instance.
Source code in src/zenml/environment.py
121 122 123 124 125 126 127 |
|
get_system_info()
staticmethod
Information about the operating system.
Returns:
Type | Description |
---|---|
Dict[str, str]
|
A dictionary containing information about the operating system. |
Source code in src/zenml/environment.py
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 |
|
in_bitbucket_ci()
staticmethod
If the current Python process is running in Bitbucket CI.
Returns:
Type | Description |
---|---|
bool
|
|
bool
|
CI, |
Source code in src/zenml/environment.py
326 327 328 329 330 331 332 333 334 |
|
in_ci()
staticmethod
If the current Python process is running in any CI.
Returns:
Type | Description |
---|---|
bool
|
|
bool
|
CI, |
Source code in src/zenml/environment.py
336 337 338 339 340 341 342 343 344 |
|
in_circle_ci()
staticmethod
If the current Python process is running in Circle CI.
Returns:
Type | Description |
---|---|
bool
|
|
bool
|
CI, |
Source code in src/zenml/environment.py
316 317 318 319 320 321 322 323 324 |
|
in_container()
staticmethod
If the current python process is running in a container.
Returns:
Type | Description |
---|---|
bool
|
|
bool
|
container, |
Source code in src/zenml/environment.py
172 173 174 175 176 177 178 179 180 181 |
|
in_docker()
staticmethod
If the current python process is running in a docker container.
Returns:
Type | Description |
---|---|
bool
|
|
bool
|
container, |
Source code in src/zenml/environment.py
183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 |
|
in_github_actions()
staticmethod
If the current Python process is running in GitHub Actions.
Returns:
Type | Description |
---|---|
bool
|
|
bool
|
Actions, |
Source code in src/zenml/environment.py
296 297 298 299 300 301 302 303 304 |
|
in_github_codespaces()
staticmethod
If the current Python process is running in GitHub Codespaces.
Returns:
Type | Description |
---|---|
bool
|
|
bool
|
|
Source code in src/zenml/environment.py
259 260 261 262 263 264 265 266 267 268 269 270 271 |
|
in_gitlab_ci()
staticmethod
If the current Python process is running in GitLab CI.
Returns:
Type | Description |
---|---|
bool
|
|
bool
|
CI, |
Source code in src/zenml/environment.py
306 307 308 309 310 311 312 313 314 |
|
in_google_colab()
staticmethod
If the current Python process is running in a Google Colab.
Returns:
Type | Description |
---|---|
bool
|
|
bool
|
|
Source code in src/zenml/environment.py
219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 |
|
in_kubernetes()
staticmethod
If the current python process is running in a kubernetes pod.
Returns:
Type | Description |
---|---|
bool
|
|
bool
|
pod, |
Source code in src/zenml/environment.py
201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 |
|
in_lightning_ai_studio()
staticmethod
If the current Python process is running in Lightning.ai studios.
Returns:
Type | Description |
---|---|
bool
|
|
bool
|
|
Source code in src/zenml/environment.py
357 358 359 360 361 362 363 364 365 366 367 368 |
|
in_notebook()
staticmethod
If the current Python process is running in a notebook.
Returns:
Type | Description |
---|---|
bool
|
|
bool
|
|
Source code in src/zenml/environment.py
235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 |
|
in_paperspace_gradient()
staticmethod
If the current Python process is running in Paperspace Gradient.
Returns:
Type | Description |
---|---|
bool
|
|
bool
|
Gradient, |
Source code in src/zenml/environment.py
286 287 288 289 290 291 292 293 294 |
|
in_vscode_remote_container()
staticmethod
If the current Python process is running in a VS Code Remote Container.
Returns:
Type | Description |
---|---|
bool
|
|
bool
|
|
Source code in src/zenml/environment.py
273 274 275 276 277 278 279 280 281 282 283 284 |
|
in_wsl()
staticmethod
If the current process is running in Windows Subsystem for Linux.
source: https://www.scivision.dev/python-detect-wsl/
Returns:
Type | Description |
---|---|
bool
|
|
Source code in src/zenml/environment.py
346 347 348 349 350 351 352 353 354 355 |
|
python_version()
staticmethod
Returns the python version of the running interpreter.
Returns:
Name | Type | Description |
---|---|---|
str |
str
|
the python version |
Source code in src/zenml/environment.py
163 164 165 166 167 168 169 170 |
|
GitNotFoundError
Bases: ImportError
Raised when ZenML CLI is used to interact with examples on a machine with no git installation.
Source code in src/zenml/exceptions.py
215 216 |
|
GlobalConfiguration
Bases: BaseModel
Stores global configuration options.
Configuration options are read from a config file, but can be overwritten
by environment variables. See GlobalConfiguration.__getattribute__
for
more details.
Attributes:
Name | Type | Description |
---|---|---|
user_id |
UUID
|
Unique user id. |
user_email |
Optional[str]
|
Email address associated with this client. |
user_email_opt_in |
Optional[bool]
|
Whether the user has opted in to email communication. |
analytics_opt_in |
bool
|
If a user agreed to sending analytics or not. |
version |
Optional[str]
|
Version of ZenML that was last used to create or update the global config. |
store |
Optional[SerializeAsAny[StoreConfiguration]]
|
Store configuration. |
active_stack_id |
Optional[UUID]
|
The ID of the active stack. |
active_workspace_name |
Optional[str]
|
The name of the active workspace. |
Source code in src/zenml/config/global_config.py
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 |
|
config_directory
property
Directory where the global configuration file is located.
Returns:
Type | Description |
---|---|
str
|
The directory where the global configuration file is located. |
is_initialized
property
Check if the global configuration is initialized.
Returns:
Type | Description |
---|---|
bool
|
|
local_stores_path
property
Path where local stores information is stored.
Returns:
Type | Description |
---|---|
str
|
The path where local stores information is stored. |
store_configuration
property
Get the current store configuration.
Returns:
Type | Description |
---|---|
StoreConfiguration
|
The store configuration. |
zen_store
property
Initialize and/or return the global zen store.
If the store hasn't been initialized yet, it is initialized when this property is first accessed according to the global store configuration.
Returns:
Type | Description |
---|---|
BaseZenStore
|
The current zen store. |
__custom_getattribute__(key)
Gets an attribute value for a specific key.
If a value for this attribute was specified using an environment
variable called $(CONFIG_ENV_VAR_PREFIX)$(ATTRIBUTE_NAME)
and its
value can be parsed to the attribute type, the value from this
environment variable is returned instead.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
key
|
str
|
The attribute name. |
required |
Returns:
Type | Description |
---|---|
Any
|
The attribute value. |
Source code in src/zenml/config/global_config.py
216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 |
|
__init__(**data)
Initializes a GlobalConfiguration using values from the config file.
GlobalConfiguration is a singleton class: only one instance can exist. Calling this constructor multiple times will always yield the same instance.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data
|
Any
|
Custom configuration options. |
{}
|
Source code in src/zenml/config/global_config.py
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
|
__setattr__(key, value)
Sets an attribute and persists it in the global configuration.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
key
|
str
|
The attribute name. |
required |
value
|
Any
|
The attribute value. |
required |
Source code in src/zenml/config/global_config.py
204 205 206 207 208 209 210 211 212 213 214 |
|
get_active_stack_id()
Get the ID of the active stack.
If the active stack doesn't exist yet, the ZenStore is reinitialized.
Returns:
Type | Description |
---|---|
UUID
|
The active stack ID. |
Source code in src/zenml/config/global_config.py
773 774 775 776 777 778 779 780 781 782 783 784 785 |
|
get_active_workspace()
Get a model of the active workspace for the local client.
Returns:
Type | Description |
---|---|
WorkspaceResponse
|
The model of the active workspace. |
Source code in src/zenml/config/global_config.py
743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 |
|
get_active_workspace_name()
Get the name of the active workspace.
If the active workspace doesn't exist yet, the ZenStore is reinitialized.
Returns:
Type | Description |
---|---|
str
|
The name of the active workspace. |
Source code in src/zenml/config/global_config.py
759 760 761 762 763 764 765 766 767 768 769 770 771 |
|
get_config_environment_vars()
Convert the global configuration to environment variables.
Returns:
Type | Description |
---|---|
Dict[str, str]
|
Environment variables dictionary. |
Source code in src/zenml/config/global_config.py
437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 |
|
get_default_store()
Get the default SQLite store configuration.
Returns:
Type | Description |
---|---|
StoreConfiguration
|
The default SQLite store configuration. |
Source code in src/zenml/config/global_config.py
634 635 636 637 638 639 640 641 642 643 644 645 646 647 |
|
get_instance()
classmethod
Return the GlobalConfiguration singleton instance.
Returns:
Type | Description |
---|---|
Optional[GlobalConfiguration]
|
The GlobalConfiguration singleton instance or None, if the |
Optional[GlobalConfiguration]
|
GlobalConfiguration hasn't been initialized yet. |
Source code in src/zenml/config/global_config.py
150 151 152 153 154 155 156 157 158 |
|
set_active_stack(stack)
Set the active stack for the local client.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
stack
|
StackResponse
|
The model of the stack to set active. |
required |
Source code in src/zenml/config/global_config.py
734 735 736 737 738 739 740 741 |
|
set_active_workspace(workspace)
Set the workspace for the local client.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
workspace
|
WorkspaceResponse
|
The workspace to set active. |
required |
Returns:
Type | Description |
---|---|
WorkspaceResponse
|
The workspace that was set active. |
Source code in src/zenml/config/global_config.py
717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 |
|
set_default_store()
Initializes and sets the default store configuration.
Call this method to initialize or revert the store configuration to the default store.
Source code in src/zenml/config/global_config.py
649 650 651 652 653 654 655 656 657 658 659 660 |
|
set_store(config, skip_default_registrations=False, **kwargs)
Update the active store configuration.
Call this method to validate and update the active store configuration.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
config
|
StoreConfiguration
|
The new store configuration to use. |
required |
skip_default_registrations
|
bool
|
If |
False
|
**kwargs
|
Any
|
Additional keyword arguments to pass to the store constructor. |
{}
|
Source code in src/zenml/config/global_config.py
670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 |
|
uses_default_store()
Check if the global configuration uses the default store.
Returns:
Type | Description |
---|---|
bool
|
|
Source code in src/zenml/config/global_config.py
662 663 664 665 666 667 668 |
|
IllegalOperationError
Bases: ZenMLBaseException
Raised when an illegal operation is attempted.
Source code in src/zenml/exceptions.py
223 224 |
|
InitializationException
Bases: ZenMLBaseException
Raised when an error occurred during initialization of a ZenML repository.
Source code in src/zenml/exceptions.py
42 43 |
|
LoggingLevels
Bases: Enum
Enum for logging levels.
Source code in src/zenml/enums.py
96 97 98 99 100 101 102 103 104 |
|
ModelFilter
Bases: WorkspaceScopedFilter
, TaggableFilter
Model to enable advanced filtering of all Workspaces.
Source code in src/zenml/models/v2/core/model.py
326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 |
|
apply_sorting(query, table)
Apply sorting to the query for Models.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
query
|
AnyQuery
|
The query to which to apply the sorting. |
required |
table
|
Type[AnySchema]
|
The query table. |
required |
Returns:
Type | Description |
---|---|
AnyQuery
|
The query with sorting applied. |
Source code in src/zenml/models/v2/core/model.py
348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 |
|
ModelRegistryModelMetadata
Bases: BaseModel
Base class for all ZenML model registry model metadata.
The ModelRegistryModelMetadata
class represents metadata associated with
a registered model version, including information such as the associated
pipeline name, pipeline run ID, step name, ZenML version, and custom
attributes. It serves as a blueprint for creating concrete model metadata
implementations in a registry, and provides a record of the history of a
model and its development process.
Source code in src/zenml/model_registries/base_model_registry.py
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
|
custom_attributes
property
Returns a dictionary of custom attributes.
Returns:
Type | Description |
---|---|
Dict[str, str]
|
A dictionary of custom attributes. |
model_dump(*, exclude_unset=False, exclude_none=True, **kwargs)
Returns a dictionary representation of the metadata.
This method overrides the default Pydantic model_dump
method to allow
for the exclusion of fields with a value of None.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
exclude_unset
|
bool
|
Whether to exclude unset attributes. |
False
|
exclude_none
|
bool
|
Whether to exclude None attributes. |
True
|
**kwargs
|
Any
|
Additional keyword arguments. |
{}
|
Returns:
Type | Description |
---|---|
Dict[str, str]
|
A dictionary representation of the metadata. |
Source code in src/zenml/model_registries/base_model_registry.py
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
|
ModelResponse
Bases: WorkspaceScopedResponse[ModelResponseBody, ModelResponseMetadata, ModelResponseResources]
Response model for models.
Source code in src/zenml/models/v2/core/model.py
181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 |
|
audience
property
The audience
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
description
property
The description
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
ethics
property
The ethics
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
latest_version_id
property
The latest_version_id
property.
Returns:
Type | Description |
---|---|
Optional[UUID]
|
the value of the property. |
latest_version_name
property
The latest_version_name
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
license
property
The license
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
limitations
property
The limitations
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
save_models_to_registry
property
The save_models_to_registry
property.
Returns:
Type | Description |
---|---|
bool
|
the value of the property. |
tags
property
trade_offs
property
The trade_offs
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
use_cases
property
The use_cases
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
versions
property
List all versions of the model.
Returns:
Type | Description |
---|---|
List[Model]
|
The list of all model version. |
get_hydrated_version()
Get the hydrated version of this model.
Returns:
Type | Description |
---|---|
ModelResponse
|
an instance of the same entity with the metadata field attached. |
Source code in src/zenml/models/v2/core/model.py
193 194 195 196 197 198 199 200 201 |
|
ModelStages
Bases: StrEnum
All possible stages of a Model Version.
Source code in src/zenml/enums.py
326 327 328 329 330 331 332 333 |
|
ModelVersionArtifactFilter
Bases: BaseFilter
Model version pipeline run links filter model.
Source code in src/zenml/models/v2/core/model_version_artifact.py
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 |
|
get_custom_filters(table)
Get custom filters.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
table
|
Type[AnySchema]
|
The query table. |
required |
Returns:
Type | Description |
---|---|
List[Union[ColumnElement[bool]]]
|
A list of custom filters. |
Source code in src/zenml/models/v2/core/model_version_artifact.py
170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 |
|
ModelVersionFilter
Bases: WorkspaceScopedFilter
, TaggableFilter
Filter model for model versions.
Source code in src/zenml/models/v2/core/model_version.py
571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 |
|
apply_filter(query, table)
Applies the filter to a query.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
query
|
AnyQuery
|
The query to which to apply the filter. |
required |
table
|
Type[AnySchema]
|
The query table. |
required |
Returns:
Type | Description |
---|---|
AnyQuery
|
The query with filter applied. |
Source code in src/zenml/models/v2/core/model_version.py
665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 |
|
get_custom_filters(table)
Get custom filters.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
table
|
Type[AnySchema]
|
The query table. |
required |
Returns:
Type | Description |
---|---|
List[ColumnElement[bool]]
|
A list of custom filters. |
Source code in src/zenml/models/v2/core/model_version.py
623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 |
|
set_scope_model(model_name_or_id)
Set the model to scope this response.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model_name_or_id
|
Union[str, UUID]
|
The model to scope this response to. |
required |
Source code in src/zenml/models/v2/core/model_version.py
608 609 610 611 612 613 614 615 616 617 618 619 620 621 |
|
ModelVersionPipelineRunFilter
Bases: BaseFilter
Model version pipeline run links filter model.
Source code in src/zenml/models/v2/core/model_version_pipeline_run.py
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 |
|
get_custom_filters(table)
Get custom filters.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
table
|
Type[AnySchema]
|
The query table. |
required |
Returns:
Type | Description |
---|---|
List[ColumnElement[bool]]
|
A list of custom filters. |
Source code in src/zenml/models/v2/core/model_version_pipeline_run.py
156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 |
|
ModelVersionResponse
Bases: WorkspaceScopedResponse[ModelVersionResponseBody, ModelVersionResponseMetadata, ModelVersionResponseResources]
Response model for model versions.
Source code in src/zenml/models/v2/core/model_version.py
205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 |
|
data_artifact_ids
property
The data_artifact_ids
property.
Returns:
Type | Description |
---|---|
Dict[str, Dict[str, UUID]]
|
the value of the property. |
data_artifacts
property
Get all data artifacts linked to this model version.
Returns:
Type | Description |
---|---|
Dict[str, Dict[str, ArtifactVersionResponse]]
|
Dictionary of data artifacts with versions as |
Dict[str, Dict[str, ArtifactVersionResponse]]
|
Dict[str, Dict[str, ArtifactResponse]] |
deployment_artifact_ids
property
The deployment_artifact_ids
property.
Returns:
Type | Description |
---|---|
Dict[str, Dict[str, UUID]]
|
the value of the property. |
deployment_artifacts
property
Get all deployment artifacts linked to this model version.
Returns:
Type | Description |
---|---|
Dict[str, Dict[str, ArtifactVersionResponse]]
|
Dictionary of deployment artifacts with versions as |
Dict[str, Dict[str, ArtifactVersionResponse]]
|
Dict[str, Dict[str, ArtifactResponse]] |
description
property
The description
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
model
property
model_artifact_ids
property
The model_artifact_ids
property.
Returns:
Type | Description |
---|---|
Dict[str, Dict[str, UUID]]
|
the value of the property. |
model_artifacts
property
Get all model artifacts linked to this model version.
Returns:
Type | Description |
---|---|
Dict[str, Dict[str, ArtifactVersionResponse]]
|
Dictionary of model artifacts with versions as |
Dict[str, Dict[str, ArtifactVersionResponse]]
|
Dict[str, Dict[str, ArtifactResponse]] |
number
property
The number
property.
Returns:
Type | Description |
---|---|
int
|
the value of the property. |
pipeline_run_ids
property
The pipeline_run_ids
property.
Returns:
Type | Description |
---|---|
Dict[str, UUID]
|
the value of the property. |
pipeline_runs
property
Get all pipeline runs linked to this version.
Returns:
Type | Description |
---|---|
Dict[str, PipelineRunResponse]
|
Dictionary of Pipeline Runs as PipelineRunResponseModel |
run_metadata
property
The run_metadata
property.
Returns:
Type | Description |
---|---|
Dict[str, MetadataType]
|
the value of the property. |
stage
property
The stage
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
tags
property
get_artifact(name, version=None)
Get the artifact linked to this model version.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
The name of the artifact to retrieve. |
required |
version
|
Optional[str]
|
The version of the artifact to retrieve (None for latest/non-versioned) |
None
|
Returns:
Type | Description |
---|---|
Optional[ArtifactVersionResponse]
|
Specific version of an artifact or None |
Source code in src/zenml/models/v2/core/model_version.py
460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 |
|
get_data_artifact(name, version=None)
Get the data artifact linked to this model version.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
The name of the data artifact to retrieve. |
required |
version
|
Optional[str]
|
The version of the data artifact to retrieve (None for latest/non-versioned) |
None
|
Returns:
Type | Description |
---|---|
Optional[ArtifactVersionResponse]
|
Specific version of the data artifact or None |
Source code in src/zenml/models/v2/core/model_version.py
494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 |
|
get_deployment_artifact(name, version=None)
Get the deployment artifact linked to this model version.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
The name of the deployment artifact to retrieve. |
required |
version
|
Optional[str]
|
The version of the deployment artifact to retrieve (None for latest/non-versioned) |
None
|
Returns:
Type | Description |
---|---|
Optional[ArtifactVersionResponse]
|
Specific version of the deployment artifact or None |
Source code in src/zenml/models/v2/core/model_version.py
511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 |
|
get_hydrated_version()
Get the hydrated version of this model version.
Returns:
Type | Description |
---|---|
ModelVersionResponse
|
an instance of the same entity with the metadata field attached. |
Source code in src/zenml/models/v2/core/model_version.py
310 311 312 313 314 315 316 317 318 |
|
get_model_artifact(name, version=None)
Get the model artifact linked to this model version.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
The name of the model artifact to retrieve. |
required |
version
|
Optional[str]
|
The version of the model artifact to retrieve (None for latest/non-versioned) |
None
|
Returns:
Type | Description |
---|---|
Optional[ArtifactVersionResponse]
|
Specific version of the model artifact or None |
Source code in src/zenml/models/v2/core/model_version.py
477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 |
|
get_pipeline_run(name)
Get pipeline run linked to this version.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
The name of the pipeline run to retrieve. |
required |
Returns:
Type | Description |
---|---|
PipelineRunResponse
|
PipelineRun as PipelineRunResponseModel |
Source code in src/zenml/models/v2/core/model_version.py
528 529 530 531 532 533 534 535 536 537 538 539 |
|
set_stage(stage, force=False)
Sets this Model Version to a desired stage.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
stage
|
Union[str, ModelStages]
|
the target stage for model version. |
required |
force
|
bool
|
whether to force archiving of current model version in target stage or raise. |
False
|
Raises:
Type | Description |
---|---|
ValueError
|
if model_stage is not valid. |
Source code in src/zenml/models/v2/core/model_version.py
541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 |
|
to_model_class(suppress_class_validation_warnings=True)
Convert response model to Model object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
suppress_class_validation_warnings
|
bool
|
internally used to suppress repeated warnings. |
True
|
Returns:
Type | Description |
---|---|
Model
|
Model object |
Source code in src/zenml/models/v2/core/model_version.py
321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 |
|
ModelVersionStage
Bases: Enum
Enum of the possible stages of a registered model.
Source code in src/zenml/model_registries/base_model_registry.py
28 29 30 31 32 33 34 |
|
OAuthDeviceFilter
Bases: UserScopedFilter
Model to enable advanced filtering of OAuth2 devices.
Source code in src/zenml/models/v2/core/device.py
439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 |
|
OldSchoolMarkdownHeading
Bases: Heading
A traditional markdown heading.
Source code in src/zenml/cli/text_utils.py
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 |
|
__rich_console__(console, options)
Render the heading.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
console
|
Console
|
The console rendering the content. |
required |
options
|
ConsoleOptions
|
The console options. |
required |
Yields:
Name | Type | Description |
---|---|---|
RenderResult |
RenderResult
|
The rendered content. |
Source code in src/zenml/cli/text_utils.py
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 |
|
Pipeline
ZenML pipeline class.
Source code in src/zenml/pipelines/pipeline_definition.py
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 |
|
configuration
property
The configuration of the pipeline.
Returns:
Type | Description |
---|---|
PipelineConfiguration
|
The configuration of the pipeline. |
enable_cache
property
If caching is enabled for the pipeline.
Returns:
Type | Description |
---|---|
Optional[bool]
|
If caching is enabled for the pipeline. |
invocations
property
Returns the step invocations of this pipeline.
This dictionary will only be populated once the pipeline has been called.
Returns:
Type | Description |
---|---|
Dict[str, StepInvocation]
|
The step invocations. |
is_prepared
property
If the pipeline is prepared.
Prepared means that the pipeline entrypoint has been called and the pipeline is fully defined.
Returns:
Type | Description |
---|---|
bool
|
If the pipeline is prepared. |
missing_parameters
property
List of missing parameters for the pipeline entrypoint.
Returns:
Type | Description |
---|---|
List[str]
|
List of missing parameters for the pipeline entrypoint. |
model
property
Gets the registered pipeline model for this instance.
Returns:
Type | Description |
---|---|
PipelineResponse
|
The registered pipeline model. |
Raises:
Type | Description |
---|---|
RuntimeError
|
If the pipeline has not been registered yet. |
name
property
The name of the pipeline.
Returns:
Type | Description |
---|---|
str
|
The name of the pipeline. |
required_parameters
property
List of required parameters for the pipeline entrypoint.
Returns:
Type | Description |
---|---|
List[str]
|
List of required parameters for the pipeline entrypoint. |
source_code
property
The source code of this pipeline.
Returns:
Type | Description |
---|---|
str
|
The source code of this pipeline. |
source_object
property
The source object of this pipeline.
Returns:
Type | Description |
---|---|
Any
|
The source object of this pipeline. |
__call__(*args, **kwargs)
Handle a call of the pipeline.
This method does one of two things: * If there is an active pipeline context, it calls the pipeline entrypoint function within that context and the step invocations will be added to the active pipeline. * If no pipeline is active, it activates this pipeline before calling the entrypoint function.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
*args
|
Any
|
Entrypoint function arguments. |
()
|
**kwargs
|
Any
|
Entrypoint function keyword arguments. |
{}
|
Returns:
Type | Description |
---|---|
Optional[PipelineRunResponse]
|
If called within another pipeline, returns the outputs of the |
Optional[PipelineRunResponse]
|
|
Optional[PipelineRunResponse]
|
if running with a schedule. |
Source code in src/zenml/pipelines/pipeline_definition.py
1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 |
|
__enter__()
Activate the pipeline context.
Raises:
Type | Description |
---|---|
RuntimeError
|
If a different pipeline is already active. |
Returns:
Type | Description |
---|---|
Self
|
The pipeline instance. |
Source code in src/zenml/pipelines/pipeline_definition.py
1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 |
|
__exit__(*args)
Deactivates the pipeline context.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
*args
|
Any
|
The arguments passed to the context exit handler. |
()
|
Source code in src/zenml/pipelines/pipeline_definition.py
1264 1265 1266 1267 1268 1269 1270 |
|
__init__(name, entrypoint, enable_cache=None, enable_artifact_metadata=None, enable_artifact_visualization=None, enable_step_logs=None, settings=None, tags=None, extra=None, on_failure=None, on_success=None, model=None, substitutions=None)
Initializes a pipeline.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
The name of the pipeline. |
required |
entrypoint
|
F
|
The entrypoint function of the pipeline. |
required |
enable_cache
|
Optional[bool]
|
If caching should be enabled for this pipeline. |
None
|
enable_artifact_metadata
|
Optional[bool]
|
If artifact metadata should be enabled for this pipeline. |
None
|
enable_artifact_visualization
|
Optional[bool]
|
If artifact visualization should be enabled for this pipeline. |
None
|
enable_step_logs
|
Optional[bool]
|
If step logs should be enabled for this pipeline. |
None
|
settings
|
Optional[Mapping[str, SettingsOrDict]]
|
Settings for this pipeline. |
None
|
tags
|
Optional[List[str]]
|
Tags to apply to runs of this pipeline. |
None
|
extra
|
Optional[Dict[str, Any]]
|
Extra configurations for this pipeline. |
None
|
on_failure
|
Optional[HookSpecification]
|
Callback function in event of failure of the step. Can
be a function with a single argument of type |
None
|
on_success
|
Optional[HookSpecification]
|
Callback function in event of success of the step. Can
be a function with no arguments, or a source path to such a
function (e.g. |
None
|
model
|
Optional[Model]
|
configuration of the model in the Model Control Plane. |
None
|
substitutions
|
Optional[Dict[str, str]]
|
Extra placeholders to use in the name templates. |
None
|
Source code in src/zenml/pipelines/pipeline_definition.py
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
__suppress_configure_warnings__()
Context manager to suppress warnings in Pipeline.configure(...)
.
Used to suppress warnings when called from inner code and not user-facing code.
Yields:
Type | Description |
---|---|
Any
|
Nothing. |
Source code in src/zenml/pipelines/pipeline_definition.py
276 277 278 279 280 281 282 283 284 285 286 287 |
|
add_step_invocation(step, input_artifacts, external_artifacts, model_artifacts_or_metadata, client_lazy_loaders, parameters, default_parameters, upstream_steps, custom_id=None, allow_id_suffix=True)
Adds a step invocation to the pipeline.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
step
|
BaseStep
|
The step for which to add an invocation. |
required |
input_artifacts
|
Dict[str, StepArtifact]
|
The input artifacts for the invocation. |
required |
external_artifacts
|
Dict[str, Union[ExternalArtifact, ArtifactVersionResponse]]
|
The external artifacts for the invocation. |
required |
model_artifacts_or_metadata
|
Dict[str, ModelVersionDataLazyLoader]
|
The model artifacts or metadata for the invocation. |
required |
client_lazy_loaders
|
Dict[str, ClientLazyLoader]
|
The client lazy loaders for the invocation. |
required |
parameters
|
Dict[str, Any]
|
The parameters for the invocation. |
required |
default_parameters
|
Dict[str, Any]
|
The default parameters for the invocation. |
required |
upstream_steps
|
Set[str]
|
The upstream steps for the invocation. |
required |
custom_id
|
Optional[str]
|
Custom ID to use for the invocation. |
None
|
allow_id_suffix
|
bool
|
Whether a suffix can be appended to the invocation ID. |
True
|
Raises:
Type | Description |
---|---|
RuntimeError
|
If the method is called on an inactive pipeline. |
RuntimeError
|
If the invocation was called with an artifact from a different pipeline. |
Returns:
Type | Description |
---|---|
str
|
The step invocation ID. |
Source code in src/zenml/pipelines/pipeline_definition.py
1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 |
|
build(settings=None, step_configurations=None, config_path=None)
Builds Docker images for the pipeline.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
settings
|
Optional[Mapping[str, SettingsOrDict]]
|
Settings for the pipeline. |
None
|
step_configurations
|
Optional[Mapping[str, StepConfigurationUpdateOrDict]]
|
Configurations for steps of the pipeline. |
None
|
config_path
|
Optional[str]
|
Path to a yaml configuration file. This file will
be parsed as a
|
None
|
Returns:
Type | Description |
---|---|
Optional[PipelineBuildResponse]
|
The build output. |
Source code in src/zenml/pipelines/pipeline_definition.py
532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 |
|
configure(enable_cache=None, enable_artifact_metadata=None, enable_artifact_visualization=None, enable_step_logs=None, settings=None, tags=None, extra=None, on_failure=None, on_success=None, model=None, parameters=None, merge=True, substitutions=None)
Configures the pipeline.
Configuration merging example:
* merge==True
:
pipeline.configure(extra={"key1": 1})
pipeline.configure(extra={"key2": 2}, merge=True)
pipeline.configuration.extra # {"key1": 1, "key2": 2}
* merge==False
:
pipeline.configure(extra={"key1": 1})
pipeline.configure(extra={"key2": 2}, merge=False)
pipeline.configuration.extra # {"key2": 2}
Parameters:
Name | Type | Description | Default |
---|---|---|---|
enable_cache
|
Optional[bool]
|
If caching should be enabled for this pipeline. |
None
|
enable_artifact_metadata
|
Optional[bool]
|
If artifact metadata should be enabled for this pipeline. |
None
|
enable_artifact_visualization
|
Optional[bool]
|
If artifact visualization should be enabled for this pipeline. |
None
|
enable_step_logs
|
Optional[bool]
|
If step logs should be enabled for this pipeline. |
None
|
settings
|
Optional[Mapping[str, SettingsOrDict]]
|
settings for this pipeline. |
None
|
tags
|
Optional[List[str]]
|
Tags to apply to runs of this pipeline. |
None
|
extra
|
Optional[Dict[str, Any]]
|
Extra configurations for this pipeline. |
None
|
on_failure
|
Optional[HookSpecification]
|
Callback function in event of failure of the step. Can
be a function with a single argument of type |
None
|
on_success
|
Optional[HookSpecification]
|
Callback function in event of success of the step. Can
be a function with no arguments, or a source path to such a
function (e.g. |
None
|
merge
|
bool
|
If |
True
|
model
|
Optional[Model]
|
configuration of the model version in the Model Control Plane. |
None
|
parameters
|
Optional[Dict[str, Any]]
|
input parameters for the pipeline. |
None
|
substitutions
|
Optional[Dict[str, str]]
|
Extra placeholders to use in the name templates. |
None
|
Returns:
Type | Description |
---|---|
Self
|
The pipeline instance that this method was called on. |
Source code in src/zenml/pipelines/pipeline_definition.py
289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 |
|
copy()
Copies the pipeline.
Returns:
Type | Description |
---|---|
Pipeline
|
The pipeline copy. |
Source code in src/zenml/pipelines/pipeline_definition.py
1373 1374 1375 1376 1377 1378 1379 |
|
create_run_template(name, **kwargs)
Create a run template for the pipeline.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
The name of the run template. |
required |
**kwargs
|
Any
|
Keyword arguments for the client method to create a run template. |
{}
|
Returns:
Type | Description |
---|---|
RunTemplateResponse
|
The created run template. |
Source code in src/zenml/pipelines/pipeline_definition.py
1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 |
|
log_pipeline_deployment_metadata(deployment_model)
staticmethod
Displays logs based on the deployment model upon running a pipeline.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
deployment_model
|
PipelineDeploymentResponse
|
The model for the pipeline deployment |
required |
Source code in src/zenml/pipelines/pipeline_definition.py
839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 |
|
prepare(*args, **kwargs)
Prepares the pipeline.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
*args
|
Any
|
Pipeline entrypoint input arguments. |
()
|
**kwargs
|
Any
|
Pipeline entrypoint input keyword arguments. |
{}
|
Raises:
Type | Description |
---|---|
RuntimeError
|
If the pipeline has parameters configured differently in configuration file and code. |
Source code in src/zenml/pipelines/pipeline_definition.py
448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 |
|
register()
Register the pipeline in the server.
Returns:
Type | Description |
---|---|
PipelineResponse
|
The registered pipeline model. |
Source code in src/zenml/pipelines/pipeline_definition.py
506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 |
|
resolve()
Resolves the pipeline.
Returns:
Type | Description |
---|---|
Source
|
The pipeline source. |
Source code in src/zenml/pipelines/pipeline_definition.py
228 229 230 231 232 233 234 |
|
with_options(run_name=None, schedule=None, build=None, step_configurations=None, steps=None, config_path=None, unlisted=False, prevent_build_reuse=False, **kwargs)
Copies the pipeline and applies the given configurations.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
run_name
|
Optional[str]
|
Name of the pipeline run. |
None
|
schedule
|
Optional[Schedule]
|
Optional schedule to use for the run. |
None
|
build
|
Union[str, UUID, PipelineBuildBase, None]
|
Optional build to use for the run. |
None
|
step_configurations
|
Optional[Mapping[str, StepConfigurationUpdateOrDict]]
|
Configurations for steps of the pipeline. |
None
|
steps
|
Optional[Mapping[str, StepConfigurationUpdateOrDict]]
|
Configurations for steps of the pipeline. This is equivalent
to |
None
|
config_path
|
Optional[str]
|
Path to a yaml configuration file. This file will
be parsed as a
|
None
|
unlisted
|
bool
|
Whether the pipeline run should be unlisted (not assigned to any pipeline). |
False
|
prevent_build_reuse
|
bool
|
DEPRECATED: Use
|
False
|
**kwargs
|
Any
|
Pipeline configuration options. These will be passed
to the |
{}
|
Returns:
Type | Description |
---|---|
Pipeline
|
The copied pipeline instance. |
Source code in src/zenml/pipelines/pipeline_definition.py
1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 |
|
write_run_configuration_template(path, stack=None)
Writes a run configuration yaml template.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path
|
str
|
The path where the template will be written. |
required |
stack
|
Optional[Stack]
|
The stack for which the template should be generated. If not given, the active stack will be used. |
None
|
Source code in src/zenml/pipelines/pipeline_definition.py
901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 |
|
PipelineBuildBase
Bases: BaseZenModel
Base model for pipeline builds.
Source code in src/zenml/models/v2/core/pipeline_build.py
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 |
|
requires_code_download
property
Whether the build requires code download.
Returns:
Type | Description |
---|---|
bool
|
Whether the build requires code download. |
get_image(component_key, step=None)
Get the image built for a specific key.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
component_key
|
str
|
The key for which to get the image. |
required |
step
|
Optional[str]
|
The pipeline step for which to get the image. If no image exists for this step, will fall back to the pipeline image for the same key. |
None
|
Returns:
Type | Description |
---|---|
str
|
The image name or digest. |
Source code in src/zenml/models/v2/core/pipeline_build.py
104 105 106 107 108 109 110 111 112 113 114 115 116 |
|
get_image_key(component_key, step=None)
staticmethod
Get the image key.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
component_key
|
str
|
The component key. |
required |
step
|
Optional[str]
|
The pipeline step for which the image was built. |
None
|
Returns:
Type | Description |
---|---|
str
|
The image key. |
Source code in src/zenml/models/v2/core/pipeline_build.py
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
|
get_settings_checksum(component_key, step=None)
Get the settings checksum for a specific key.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
component_key
|
str
|
The key for which to get the checksum. |
required |
step
|
Optional[str]
|
The pipeline step for which to get the checksum. If no image exists for this step, will fall back to the pipeline image for the same key. |
None
|
Returns:
Type | Description |
---|---|
Optional[str]
|
The settings checksum. |
Source code in src/zenml/models/v2/core/pipeline_build.py
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 |
|
PipelineBuildFilter
Bases: WorkspaceScopedFilter
Model to enable advanced filtering of all pipeline builds.
Source code in src/zenml/models/v2/core/pipeline_build.py
461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 |
|
get_custom_filters(table)
Get custom filters.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
table
|
Type[AnySchema]
|
The query table. |
required |
Returns:
Type | Description |
---|---|
List[ColumnElement[bool]]
|
A list of custom filters. |
Source code in src/zenml/models/v2/core/pipeline_build.py
506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 |
|
PipelineFilter
Bases: WorkspaceScopedFilter
, TaggableFilter
Pipeline filter model.
Source code in src/zenml/models/v2/core/pipeline.py
260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 |
|
apply_filter(query, table)
Applies the filter to a query.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
query
|
AnyQuery
|
The query to which to apply the filter. |
required |
table
|
Type[AnySchema]
|
The query table. |
required |
Returns:
Type | Description |
---|---|
AnyQuery
|
The query with filter applied. |
Source code in src/zenml/models/v2/core/pipeline.py
288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 |
|
apply_sorting(query, table)
Apply sorting to the query.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
query
|
AnyQuery
|
The query to which to apply the sorting. |
required |
table
|
Type[AnySchema]
|
The query table. |
required |
Returns:
Type | Description |
---|---|
AnyQuery
|
The query with sorting applied. |
Source code in src/zenml/models/v2/core/pipeline.py
342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 |
|
PipelineRunFilter
Bases: WorkspaceScopedFilter
, TaggableFilter
Model to enable advanced filtering of all Workspaces.
Source code in src/zenml/models/v2/core/pipeline_run.py
593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 |
|
apply_sorting(query, table)
Apply sorting to the query.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
query
|
AnyQuery
|
The query to which to apply the sorting. |
required |
table
|
Type[AnySchema]
|
The query table. |
required |
Returns:
Type | Description |
---|---|
AnyQuery
|
The query with sorting applied. |
Source code in src/zenml/models/v2/core/pipeline_run.py
937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 |
|
get_custom_filters(table)
Get custom filters.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
table
|
Type[AnySchema]
|
The query table. |
required |
Returns:
Type | Description |
---|---|
List[ColumnElement[bool]]
|
A list of custom filters. |
Source code in src/zenml/models/v2/core/pipeline_run.py
726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 |
|
ScheduleFilter
Bases: WorkspaceScopedFilter
Model to enable advanced filtering of all Users.
Source code in src/zenml/models/v2/core/schedule.py
316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 |
|
SecretFilter
Bases: WorkspaceScopedFilter
Model to enable advanced filtering of all Secrets.
Source code in src/zenml/models/v2/core/secret.py
243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 |
|
secret_matches(secret)
Checks if a secret matches the filter criteria.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
secret
|
SecretResponse
|
The secret to check. |
required |
Returns:
Type | Description |
---|---|
bool
|
True if the secret matches the filter criteria, False otherwise. |
Source code in src/zenml/models/v2/core/secret.py
279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 |
|
sort_secrets(secrets)
Sorts a list of secrets according to the filter criteria.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
secrets
|
List[SecretResponse]
|
The list of secrets to sort. |
required |
Returns:
Type | Description |
---|---|
List[SecretResponse]
|
The sorted list of secrets. |
Source code in src/zenml/models/v2/core/secret.py
334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 |
|
SecretResponse
Bases: WorkspaceScopedResponse[SecretResponseBody, SecretResponseMetadata, SecretResponseResources]
Response model for secrets.
Source code in src/zenml/models/v2/core/secret.py
135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 |
|
has_missing_values
property
Returns True if the secret has missing values (i.e. None).
Values can be missing from a secret for example if the user retrieves a secret but does not have the permission to view the secret values.
Returns:
Type | Description |
---|---|
bool
|
True if the secret has any values set to None. |
scope
property
secret_values
property
A dictionary with all un-obfuscated values stored in this secret.
The values are returned as strings, not SecretStr. If a value is None, it is not included in the returned dictionary. This is to enable the use of None values in the update model to indicate that a secret value should be deleted.
Returns:
Type | Description |
---|---|
Dict[str, str]
|
A dictionary containing the secret's values. |
values
property
The values
property.
Returns:
Type | Description |
---|---|
Dict[str, Optional[SecretStr]]
|
the value of the property. |
add_secret(key, value)
Adds a secret value to the secret.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
key
|
str
|
The key of the secret value. |
required |
value
|
str
|
The secret value. |
required |
Source code in src/zenml/models/v2/core/secret.py
210 211 212 213 214 215 216 217 |
|
get_hydrated_version()
Get the hydrated version of this workspace.
Returns:
Type | Description |
---|---|
SecretResponse
|
an instance of the same entity with the metadata field attached. |
Source code in src/zenml/models/v2/core/secret.py
149 150 151 152 153 154 155 156 157 |
|
remove_secret(key)
Removes a secret value from the secret.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
key
|
str
|
The key of the secret value. |
required |
Source code in src/zenml/models/v2/core/secret.py
219 220 221 222 223 224 225 |
|
remove_secrets()
Removes all secret values from the secret but keep the keys.
Source code in src/zenml/models/v2/core/secret.py
227 228 229 |
|
set_secrets(values)
Sets the secret values of the secret.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
values
|
Dict[str, str]
|
The secret values to set. |
required |
Source code in src/zenml/models/v2/core/secret.py
231 232 233 234 235 236 237 |
|
SecretScope
Bases: StrEnum
Enum for the scope of a secret.
Source code in src/zenml/enums.py
138 139 140 141 142 |
|
ServerCredentials
Bases: BaseModel
Cached Server Credentials.
Source code in src/zenml/login/credentials.py
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 |
|
api_hyperlink
property
Get the hyperlink to the ZenML OpenAPI dashboard for this tenant.
Returns:
Type | Description |
---|---|
str
|
The hyperlink to the ZenML OpenAPI dashboard for this tenant. |
auth_status
property
Get the authentication status.
Returns:
Type | Description |
---|---|
str
|
The authentication status. |
dashboard_hyperlink
property
Get the hyperlink to the ZenML dashboard for this tenant.
Returns:
Type | Description |
---|---|
str
|
The hyperlink to the ZenML dashboard for this tenant. |
dashboard_organization_url
property
Get the URL to the ZenML Pro dashboard for this tenant's organization.
Returns:
Type | Description |
---|---|
str
|
The URL to the ZenML Pro dashboard for this tenant's organization. |
dashboard_url
property
Get the URL to the ZenML dashboard for this server.
Returns:
Type | Description |
---|---|
str
|
The URL to the ZenML dashboard for this server. |
expires_at
property
Get the expiration time of the token as a string.
Returns:
Type | Description |
---|---|
str
|
The expiration time of the token as a string. |
expires_in
property
Get the time remaining until the token expires.
Returns:
Type | Description |
---|---|
str
|
The time remaining until the token expires. |
id
property
Get the server identifier.
Returns:
Type | Description |
---|---|
str
|
The server identifier. |
is_available
property
Check if the server is available (running and authenticated).
Returns:
Type | Description |
---|---|
bool
|
True if the server is available, False otherwise. |
organization_hyperlink
property
Get the hyperlink to the ZenML Pro dashboard for this server's organization.
Returns:
Type | Description |
---|---|
str
|
The hyperlink to the ZenML Pro dashboard for this server's |
str
|
organization. |
organization_id_hyperlink
property
Get the hyperlink to the ZenML Pro dashboard for this tenant's organization using its ID.
Returns:
Type | Description |
---|---|
str
|
The hyperlink to the ZenML Pro dashboard for this tenant's |
str
|
organization using its ID. |
organization_name_hyperlink
property
Get the hyperlink to the ZenML Pro dashboard for this server's organization using its name.
Returns:
Type | Description |
---|---|
str
|
The hyperlink to the ZenML Pro dashboard for this server's |
str
|
organization using its name. |
server_id_hyperlink
property
Get the hyperlink to the ZenML dashboard for this server using its ID.
Returns:
Type | Description |
---|---|
str
|
The hyperlink to the ZenML dashboard for this server using its ID. |
server_name_hyperlink
property
Get the hyperlink to the ZenML dashboard for this server using its name.
Returns:
Type | Description |
---|---|
str
|
The hyperlink to the ZenML dashboard for this server using its name. |
type
property
update_server_info(server_info)
Update with server information received from the server itself or from a ZenML Pro tenant descriptor.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
server_info
|
Union[ServerModel, TenantRead]
|
The server information to update with. |
required |
Source code in src/zenml/login/credentials.py
141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 |
|
ServerProviderType
Bases: StrEnum
ZenML server providers.
Source code in src/zenml/enums.py
207 208 209 210 211 |
|
ServerType
Bases: StrEnum
The type of server.
Source code in src/zenml/login/credentials.py
33 34 35 36 37 38 39 |
|
ServiceAccountFilter
Bases: BaseFilter
Model to enable advanced filtering of service accounts.
Source code in src/zenml/models/v2/core/service_account.py
190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 |
|
apply_filter(query, table)
Override to filter out user accounts from the query.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
query
|
AnyQuery
|
The query to which to apply the filter. |
required |
table
|
Type[AnySchema]
|
The query table. |
required |
Returns:
Type | Description |
---|---|
AnyQuery
|
The query with filter applied. |
Source code in src/zenml/models/v2/core/service_account.py
207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 |
|
ServiceConnectorFilter
Bases: WorkspaceScopedFilter
Model to enable advanced filtering of service connectors.
Source code in src/zenml/models/v2/core/service_connector.py
784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 |
|
validate_labels()
Parse the labels string into a label dictionary and vice-versa.
Returns:
Type | Description |
---|---|
ServiceConnectorFilter
|
The validated values. |
Source code in src/zenml/models/v2/core/service_connector.py
851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 |
|
ServiceConnectorInfo
Bases: BaseModel
Information about the service connector when creating a full stack.
Source code in src/zenml/models/v2/misc/info_models.py
26 27 28 29 30 31 |
|
ServiceConnectorRequest
Bases: WorkspaceScopedRequest
Request model for service connectors.
Source code in src/zenml/models/v2/core/service_connector.py
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 |
|
emojified_connector_type
property
Get the emojified connector type.
Returns:
Type | Description |
---|---|
str
|
The emojified connector type. |
emojified_resource_types
property
Get the emojified connector type.
Returns:
Type | Description |
---|---|
List[str]
|
The emojified connector type. |
type
property
Get the connector type.
Returns:
Type | Description |
---|---|
str
|
The connector type. |
get_analytics_metadata()
Format the resource types in the analytics metadata.
Returns:
Type | Description |
---|---|
Dict[str, Any]
|
Dict of analytics metadata. |
Source code in src/zenml/models/v2/core/service_connector.py
120 121 122 123 124 125 126 127 128 129 130 131 132 |
|
validate_and_configure_resources(connector_type, resource_types=None, resource_id=None, configuration=None, secrets=None)
Validate and configure the resources that the connector can be used to access.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
connector_type
|
ServiceConnectorTypeModel
|
The connector type specification used to validate the connector configuration. |
required |
resource_types
|
Optional[Union[str, List[str]]]
|
The type(s) of resource that the connector instance can be used to access. If omitted, a multi-type connector is configured. |
None
|
resource_id
|
Optional[str]
|
Uniquely identifies a specific resource instance that the connector instance can be used to access. |
None
|
configuration
|
Optional[Dict[str, Any]]
|
The connector configuration. |
None
|
secrets
|
Optional[Dict[str, Optional[SecretStr]]]
|
The connector secrets. |
None
|
Source code in src/zenml/models/v2/core/service_connector.py
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 |
|
ServiceConnectorResourcesInfo
Bases: BaseModel
Information about the service connector resources needed for CLI and UI.
Source code in src/zenml/models/v2/misc/info_models.py
73 74 75 76 77 78 |
|
ServiceConnectorResourcesModel
Bases: BaseModel
Service connector resources list.
Lists the resource types and resource instances that a service connector can provide access to.
Source code in src/zenml/models/v2/misc/service_connector_type.py
574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 |
|
emojified_connector_type
property
Get the emojified connector type.
Returns:
Type | Description |
---|---|
str
|
The emojified connector type. |
resource_types
property
Get the resource types.
Returns:
Type | Description |
---|---|
List[str]
|
The resource types. |
resources_dict
property
Get the resources as a dictionary indexed by resource type.
Returns:
Type | Description |
---|---|
Dict[str, ServiceConnectorTypedResourcesModel]
|
The resources as a dictionary indexed by resource type. |
type
property
Get the connector type.
Returns:
Type | Description |
---|---|
str
|
The connector type. |
from_connector_model(connector_model, resource_type=None)
classmethod
Initialize a resource model from a connector model.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
connector_model
|
ServiceConnectorResponse
|
The connector model. |
required |
resource_type
|
Optional[str]
|
The resource type to set on the resource model. If omitted, the resource type is set according to the connector model. |
None
|
Returns:
Type | Description |
---|---|
ServiceConnectorResourcesModel
|
A resource list model instance. |
Source code in src/zenml/models/v2/misc/service_connector_type.py
772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 |
|
get_default_resource_id()
Get the default resource ID, if included in the resource list.
The default resource ID is a resource ID supplied by the connector implementation only for resource types that do not support multiple instances.
Returns:
Type | Description |
---|---|
Optional[str]
|
The default resource ID, or None if no resource ID is set. |
Source code in src/zenml/models/v2/misc/service_connector_type.py
739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 |
|
get_emojified_resource_types(resource_type=None)
Get the emojified resource type.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
resource_type
|
Optional[str]
|
The resource type to get the emojified resource type for. If omitted, the emojified resource type for all resource types is returned. |
None
|
Returns:
Type | Description |
---|---|
List[str]
|
The list of emojified resource types. |
Source code in src/zenml/models/v2/misc/service_connector_type.py
708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 |
|
set_error(error, resource_type=None)
Set a global error message or an error for a single resource type.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
error
|
str
|
The error message. |
required |
resource_type
|
Optional[str]
|
The resource type to set the error message for. If omitted, or if there is only one resource type involved, the error message is (also) set globally. |
None
|
Raises:
Type | Description |
---|---|
KeyError
|
If the resource type is not found in the resources list. |
Source code in src/zenml/models/v2/misc/service_connector_type.py
631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 |
|
set_resource_ids(resource_type, resource_ids)
Set the resource IDs for a resource type.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
resource_type
|
str
|
The resource type to set the resource IDs for. |
required |
resource_ids
|
List[str]
|
The resource IDs to set. |
required |
Raises:
Type | Description |
---|---|
KeyError
|
If the resource type is not found in the resources list. |
Source code in src/zenml/models/v2/misc/service_connector_type.py
664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 |
|
ServiceConnectorResponse
Bases: WorkspaceScopedResponse[ServiceConnectorResponseBody, ServiceConnectorResponseMetadata, ServiceConnectorResponseResources]
Response model for service connectors.
Source code in src/zenml/models/v2/core/service_connector.py
482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 |
|
auth_method
property
The auth_method
property.
Returns:
Type | Description |
---|---|
str
|
the value of the property. |
configuration
property
The configuration
property.
Returns:
Type | Description |
---|---|
Dict[str, Any]
|
the value of the property. |
connector_type
property
The connector_type
property.
Returns:
Type | Description |
---|---|
Union[str, ServiceConnectorTypeModel]
|
the value of the property. |
description
property
The description
property.
Returns:
Type | Description |
---|---|
str
|
the value of the property. |
emojified_connector_type
property
Get the emojified connector type.
Returns:
Type | Description |
---|---|
str
|
The emojified connector type. |
emojified_resource_types
property
Get the emojified connector type.
Returns:
Type | Description |
---|---|
List[str]
|
The emojified connector type. |
expiration_seconds
property
The expiration_seconds
property.
Returns:
Type | Description |
---|---|
Optional[int]
|
the value of the property. |
expires_at
property
The expires_at
property.
Returns:
Type | Description |
---|---|
Optional[datetime]
|
the value of the property. |
expires_skew_tolerance
property
The expires_skew_tolerance
property.
Returns:
Type | Description |
---|---|
Optional[int]
|
the value of the property. |
full_configuration
property
Get the full connector configuration, including secrets.
Returns:
Type | Description |
---|---|
Dict[str, str]
|
The full connector configuration, including secrets. |
is_multi_instance
property
Checks if the connector is multi-instance.
A multi-instance connector is configured to access multiple instances of the configured resource type.
Returns:
Type | Description |
---|---|
bool
|
True if the connector is multi-instance, False otherwise. |
is_multi_type
property
Checks if the connector is multi-type.
A multi-type connector can be used to access multiple types of resources.
Returns:
Type | Description |
---|---|
bool
|
True if the connector is multi-type, False otherwise. |
is_single_instance
property
Checks if the connector is single-instance.
A single-instance connector is configured to access only a single instance of the configured resource type or does not support multiple resource instances.
Returns:
Type | Description |
---|---|
bool
|
True if the connector is single-instance, False otherwise. |
labels
property
The labels
property.
Returns:
Type | Description |
---|---|
Dict[str, str]
|
the value of the property. |
resource_id
property
The resource_id
property.
Returns:
Type | Description |
---|---|
Optional[str]
|
the value of the property. |
resource_types
property
The resource_types
property.
Returns:
Type | Description |
---|---|
List[str]
|
the value of the property. |
secret_id
property
The secret_id
property.
Returns:
Type | Description |
---|---|
Optional[UUID]
|
the value of the property. |
secrets
property
The secrets
property.
Returns:
Type | Description |
---|---|
Dict[str, Optional[SecretStr]]
|
the value of the property. |
supports_instances
property
The supports_instances
property.
Returns:
Type | Description |
---|---|
bool
|
the value of the property. |
type
property
Get the connector type.
Returns:
Type | Description |
---|---|
str
|
The connector type. |
get_analytics_metadata()
Add the service connector labels to analytics metadata.
Returns:
Type | Description |
---|---|
Dict[str, Any]
|
Dict of analytics metadata. |
Source code in src/zenml/models/v2/core/service_connector.py
500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 |
|
get_hydrated_version()
Get the hydrated version of this service connector.
Returns:
Type | Description |
---|---|
ServiceConnectorResponse
|
an instance of the same entity with the metadata field attached. |
Source code in src/zenml/models/v2/core/service_connector.py
517 518 519 520 521 522 523 524 525 |
|
set_connector_type(value)
Auxiliary method to set the connector type.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value
|
Union[str, ServiceConnectorTypeModel]
|
the new value for the connector type. |
required |
Source code in src/zenml/models/v2/core/service_connector.py
622 623 624 625 626 627 628 629 630 |
|
validate_and_configure_resources(connector_type, resource_types=None, resource_id=None, configuration=None, secrets=None)
Validate and configure the resources that the connector can be used to access.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
connector_type
|
ServiceConnectorTypeModel
|
The connector type specification used to validate the connector configuration. |
required |
resource_types
|
Optional[Union[str, List[str]]]
|
The type(s) of resource that the connector instance can be used to access. If omitted, a multi-type connector is configured. |
None
|
resource_id
|
Optional[str]
|
Uniquely identifies a specific resource instance that the connector instance can be used to access. |
None
|
configuration
|
Optional[Dict[str, Any]]
|
The connector configuration. |
None
|
secrets
|
Optional[Dict[str, Optional[SecretStr]]]
|
The connector secrets. |
None
|
Source code in src/zenml/models/v2/core/service_connector.py
632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 |
|
ServiceState
Bases: StrEnum
Possible states for the service and service endpoint.
Source code in src/zenml/services/service_status.py
25 26 27 28 29 30 31 32 33 |
|
Source
Bases: BaseModel
Source specification.
A source specifies a module name as well as an optional attribute of that module. These values can be used to import the module and get the value of the attribute inside the module.
Example
The source Source(module="zenml.config.source", attribute="Source")
references the class that this docstring is describing. This class is
defined in the zenml.config.source
module and the name of the
attribute is the class name Source
.
Attributes:
Name | Type | Description |
---|---|---|
module |
str
|
The module name. |
attribute |
Optional[str]
|
Optional name of the attribute inside the module. |
type |
SourceType
|
The type of the source. |
Source code in src/zenml/config/source.py
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 |
|
import_path
property
The import path of the source.
Returns:
Type | Description |
---|---|
str
|
The import path of the source. |
is_internal
property
If the source is internal (=from the zenml package).
Returns:
Type | Description |
---|---|
bool
|
True if the source is internal, False otherwise |
is_module_source
property
If the source is a module source.
Returns:
Type | Description |
---|---|
bool
|
If the source is a module source. |
from_import_path(import_path, is_module_path=False)
classmethod
Creates a source from an import path.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
import_path
|
str
|
The import path. |
required |
is_module_path
|
bool
|
If the import path points to a module or not. |
False
|
Raises:
Type | Description |
---|---|
ValueError
|
If the import path is empty. |
Returns:
Type | Description |
---|---|
Source
|
The source. |
Source code in src/zenml/config/source.py
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
|
model_dump(**kwargs)
Dump the source as a dictionary.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
**kwargs
|
Any
|
Additional keyword arguments. |
{}
|
Returns:
Type | Description |
---|---|
Dict[str, Any]
|
The source as a dictionary. |
Source code in src/zenml/config/source.py
143 144 145 146 147 148 149 150 151 152 |
|
model_dump_json(**kwargs)
Dump the source as a JSON string.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
**kwargs
|
Any
|
Additional keyword arguments. |
{}
|
Returns:
Type | Description |
---|---|
str
|
The source as a JSON string. |
Source code in src/zenml/config/source.py
154 155 156 157 158 159 160 161 162 163 |
|
StackComponentType
Bases: StrEnum
All possible types a StackComponent
can have.
Source code in src/zenml/enums.py
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
|
plural
property
Returns the plural of the enum value.
Returns:
Type | Description |
---|---|
str
|
The plural of the enum value. |
StackDeploymentProvider
Bases: StrEnum
All possible stack deployment providers.
Source code in src/zenml/enums.py
426 427 428 429 430 431 |
|
StackFilter
Bases: WorkspaceScopedFilter
Model to enable advanced filtering of all StackModels.
The Stack Model needs additional scoping. As such the _scope_user
field
can be set to the user that is doing the filtering. The
generate_filter()
method of the baseclass is overwritten to include the
scoping.
Source code in src/zenml/models/v2/core/stack.py
327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 |
|
get_custom_filters(table)
Get custom filters.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
table
|
Type[AnySchema]
|
The query table. |
required |
Returns:
Type | Description |
---|---|
List[ColumnElement[bool]]
|
A list of custom filters. |
Source code in src/zenml/models/v2/core/stack.py
358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 |
|
StackRequest
Bases: BaseRequest
Request model for a stack.
Source code in src/zenml/models/v2/core/stack.py
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 |
|
is_valid
property
Check if the stack is valid.
Returns:
Type | Description |
---|---|
bool
|
True if the stack is valid, False otherwise. |
StoreType
Bases: StrEnum
Zen Store Backend Types.
Source code in src/zenml/enums.py
145 146 147 148 149 |
|
TagFilter
Bases: BaseFilter
Model to enable advanced filtering of all tags.
Source code in src/zenml/models/v2/core/tag.py
121 122 123 124 125 126 127 128 129 |
|
TagRequest
Bases: BaseRequest
Request model for tags.
Source code in src/zenml/models/v2/core/tag.py
35 36 37 38 39 40 41 42 43 44 45 |
|
TagUpdate
Bases: BaseModel
Update model for tags.
Source code in src/zenml/models/v2/core/tag.py
51 52 53 54 55 |
|
UserFilter
Bases: BaseFilter
Model to enable advanced filtering of all Users.
Source code in src/zenml/models/v2/core/user.py
441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 |
|
apply_filter(query, table)
Override to filter out service accounts from the query.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
query
|
AnyQuery
|
The query to which to apply the filter. |
required |
table
|
Type[AnySchema]
|
The query table. |
required |
Returns:
Type | Description |
---|---|
AnyQuery
|
The query with filter applied. |
Source code in src/zenml/models/v2/core/user.py
472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 |
|
WorkspaceFilter
Bases: BaseFilter
Model to enable advanced filtering of all Workspaces.
Source code in src/zenml/models/v2/core/workspace.py
125 126 127 128 129 130 131 |
|
ZenKeyError
Bases: KeyError
Specialized key error which allows error messages with line breaks.
Source code in src/zenml/exceptions.py
247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 |
|
__init__(message)
Initialization.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
message
|
str
|
str, the error message |
required |
Source code in src/zenml/exceptions.py
250 251 252 253 254 255 256 |
|
__str__()
String function.
Returns:
Type | Description |
---|---|
str
|
the error message |
Source code in src/zenml/exceptions.py
258 259 260 261 262 263 264 |
|
ZenMLProjectTemplateLocation
Bases: BaseModel
A ZenML project template location.
Source code in src/zenml/cli/base.py
63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
|
copier_github_url
property
Get the GitHub URL for the copier.
Returns:
Type | Description |
---|---|
str
|
A GitHub URL in copier format. |
track_handler
Bases: object
Context handler to enable tracking the success status of an event.
Source code in src/zenml/analytics/utils.py
204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 |
|
__enter__()
Enter function of the event handler.
Returns:
Type | Description |
---|---|
track_handler
|
the handler instance. |
Source code in src/zenml/analytics/utils.py
221 222 223 224 225 226 227 |
|
__exit__(type_, value, traceback)
Exit function of the event handler.
Checks whether there was a traceback and updates the metadata accordingly. Following the check, it calls the function to track the event.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
type_
|
Optional[Any]
|
The class of the exception |
required |
value
|
Optional[Any]
|
The instance of the exception |
required |
traceback
|
Optional[Any]
|
The traceback of the exception |
required |
Source code in src/zenml/analytics/utils.py
229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 |
|
__init__(event, metadata=None)
Initialization of the context manager.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
event
|
AnalyticsEvent
|
The type of the analytics event |
required |
metadata
|
Optional[Dict[str, Any]]
|
The metadata of the event. |
None
|
Source code in src/zenml/analytics/utils.py
207 208 209 210 211 212 213 214 215 216 217 218 219 |
|
analytics()
Analytics for opt-in and opt-out.
Source code in src/zenml/cli/config.py
27 28 29 |
|
api_key(ctx, service_account_name_or_id)
List and manage the API keys associated with a service account.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ctx
|
Context
|
The click context. |
required |
service_account_name_or_id
|
str
|
The name or ID of the service account. |
required |
Source code in src/zenml/cli/service_accounts.py
286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 |
|
artifact()
Commands for interacting with artifacts.
Source code in src/zenml/cli/artifact.py
33 34 35 |
|
authorized_device()
Interact with authorized devices.
Source code in src/zenml/cli/authorized_device.py
32 33 34 |
|
backup_database(strategy=None, location=None, overwrite=False)
Backup the ZenML database.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
strategy
|
Optional[str]
|
Custom backup strategy to use. Defaults to whatever is configured in the store config. |
None
|
location
|
Optional[str]
|
Custom location to store the backup. Defaults to whatever is configured in the store config. Depending on the strategy, this can be a local path or a database name. |
None
|
overwrite
|
bool
|
Whether to overwrite the existing backup. |
False
|
Source code in src/zenml/cli/base.py
701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 |
|
backup_secrets(ignore_errors=True, delete_secrets=False)
Backup all secrets to the backup secrets store.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ignore_errors
|
bool
|
Whether to ignore individual errors when backing up secrets and continue with the backup operation until all secrets have been backed up. |
True
|
delete_secrets
|
bool
|
Whether to delete the secrets that have been successfully backed up from the primary secrets store. Setting this flag effectively moves all secrets from the primary secrets store to the backup secrets store. |
False
|
Source code in src/zenml/cli/secret.py
537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 |
|
build_pipeline(source, config_path=None, stack_name_or_id=None, output_path=None)
Build Docker images for a pipeline.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
source
|
str
|
Importable source resolving to a pipeline instance. |
required |
config_path
|
Optional[str]
|
Path to pipeline configuration file. |
None
|
stack_name_or_id
|
Optional[str]
|
Name or ID of the stack for which the images should be built. |
None
|
output_path
|
Optional[str]
|
Optional file path to write the output to. |
None
|
Source code in src/zenml/cli/pipeline.py
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 |
|
builds()
Commands for pipeline builds.
Source code in src/zenml/cli/pipeline.py
573 574 575 |
|
change_user_password(password=None, old_password=None)
Change the password of the current user.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
password
|
Optional[str]
|
The new password for the current user. |
None
|
old_password
|
Optional[str]
|
The old password for the current user. |
None
|
Source code in src/zenml/cli/user_management.py
301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 |
|
clean(yes=False, local=False)
Delete all ZenML metadata, artifacts and stacks.
This is a destructive operation, primarily intended for use in development.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
yes
|
bool
|
If you don't want a confirmation prompt. |
False
|
local
|
bool
|
If you want to delete local files associated with the active stack. |
False
|
Source code in src/zenml/cli/base.py
306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 |
|
code_repository()
Interact with code repositories.
Source code in src/zenml/cli/code_repository.py
35 36 37 |
|
confirmation(text, *args, **kwargs)
Echo a confirmation string on the CLI.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
text
|
str
|
Input text string. |
required |
*args
|
Any
|
Args to be passed to click.confirm(). |
()
|
**kwargs
|
Any
|
Kwargs to be passed to click.confirm(). |
{}
|
Returns:
Type | Description |
---|---|
bool
|
Boolean based on user response. |
Source code in src/zenml/cli/utils.py
124 125 126 127 128 129 130 131 132 133 134 135 |
|
connect(url=None, username=None, password=None, api_key=None, no_verify_ssl=False, ssl_ca_cert=None)
Connect to a remote ZenML server.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
url
|
Optional[str]
|
The URL where the ZenML server is reachable. |
None
|
username
|
Optional[str]
|
The username that is used to authenticate with the ZenML server. |
None
|
password
|
Optional[str]
|
The password that is used to authenticate with the ZenML server. |
None
|
api_key
|
Optional[str]
|
The API key that is used to authenticate with the ZenML server. |
None
|
no_verify_ssl
|
bool
|
Whether to verify the server's TLS certificate. |
False
|
ssl_ca_cert
|
Optional[str]
|
A path to a CA bundle to use to verify the server's TLS certificate or the CA bundle value itself. |
None
|
Source code in src/zenml/cli/server.py
311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 |
|
connect_stack(stack_name_or_id=None, connector=None, interactive=False, no_verify=False)
Connect a service-connector to all components of a stack.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
stack_name_or_id
|
Optional[str]
|
Name of the stack to connect. |
None
|
connector
|
Optional[str]
|
The name, ID or prefix of the connector to use. |
None
|
interactive
|
bool
|
Configure a service connector resource interactively. |
False
|
no_verify
|
bool
|
Skip verification of the connector resource. |
False
|
Source code in src/zenml/cli/stack.py
1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 |
|
connect_stack_component_with_service_connector(component_type, name_id_or_prefix=None, connector=None, resource_id=None, interactive=False, no_verify=False)
Connect the stack component to a resource through a service connector.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
component_type
|
StackComponentType
|
Type of the component to generate the command for. |
required |
name_id_or_prefix
|
Optional[str]
|
The name of the stack component to connect. |
None
|
connector
|
Optional[str]
|
The name, ID or prefix of the connector to use. |
None
|
resource_id
|
Optional[str]
|
The resource ID to use connect to. Only required for multi-instance connectors that are not already configured with a particular resource ID. |
None
|
interactive
|
bool
|
Configure a service connector resource interactively. |
False
|
no_verify
|
bool
|
Do not verify whether the resource is accessible. |
False
|
Source code in src/zenml/cli/stack_components.py
1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 |
|
connect_to_pro_server(pro_server=None, api_key=None, refresh=False, pro_api_url=None)
Connect the client to a ZenML Pro server.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pro_server
|
Optional[str]
|
The UUID, name or URL of the ZenML Pro server to connect to. If not provided, the web login flow will be initiated. |
None
|
api_key
|
Optional[str]
|
The API key to use to authenticate with the ZenML Pro server. |
None
|
refresh
|
bool
|
Whether to force a new login flow with the ZenML Pro server. |
False
|
pro_api_url
|
Optional[str]
|
The URL for the ZenML Pro API. |
None
|
Raises:
Type | Description |
---|---|
ValueError
|
If incorrect parameters are provided. |
AuthorizationException
|
If the user does not have access to the ZenML Pro server. |
Source code in src/zenml/cli/login.py
227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 |
|
connect_to_server(url, api_key=None, verify_ssl=True, refresh=False, pro_server=False)
Connect the client to a ZenML server or a SQL database.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
url
|
str
|
The URL of the ZenML server or the SQL database to connect to. |
required |
api_key
|
Optional[str]
|
The API key to use to authenticate with the ZenML server. |
None
|
verify_ssl
|
Union[str, bool]
|
Whether to verify the server's TLS certificate. If a string is passed, it is interpreted as the path to a CA bundle file. |
True
|
refresh
|
bool
|
Whether to force a new login flow with the ZenML server. |
False
|
pro_server
|
bool
|
Whether the server is a ZenML Pro server. |
False
|
Source code in src/zenml/cli/login.py
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 |
|
connected_to_local_server()
Check if the client is connected to a local server.
Returns:
Type | Description |
---|---|
bool
|
True if the client is connected to a local server, False otherwise. |
Source code in src/zenml/zen_server/utils.py
287 288 289 290 291 292 293 294 295 296 |
|
convert_structured_str_to_dict(string)
Convert a structured string (JSON or YAML) into a dict.
Examples:
>>> convert_structured_str_to_dict('{"location": "Nevada", "aliens":"many"}')
{'location': 'Nevada', 'aliens': 'many'}
>>> convert_structured_str_to_dict('location: Nevada \naliens: many')
{'location': 'Nevada', 'aliens': 'many'}
>>> convert_structured_str_to_dict("{'location': 'Nevada', 'aliens': 'many'}")
{'location': 'Nevada', 'aliens': 'many'}
Parameters:
Name | Type | Description | Default |
---|---|---|---|
string
|
str
|
JSON or YAML string value |
required |
Returns:
Name | Type | Description |
---|---|---|
dict_ |
Dict[str, str]
|
dict from structured JSON or YAML str |
Source code in src/zenml/cli/utils.py
765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 |
|
copy_dir(source_dir, destination_dir, overwrite=False)
Copies dir from source to destination.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
source_dir
|
str
|
Path to copy from. |
required |
destination_dir
|
str
|
Path to copy to. |
required |
overwrite
|
bool
|
Boolean. If false, function throws an error before overwrite. |
False
|
Source code in src/zenml/utils/io_utils.py
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 |
|
copy_stack(source_stack_name_or_id, target_stack)
Copy a stack.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
source_stack_name_or_id
|
str
|
The name or id of the stack to copy. |
required |
target_stack
|
str
|
Name of the copied stack. |
required |
Source code in src/zenml/cli/stack.py
1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 |
|
create_api_key(service_account_name_or_id, name, description, set_key=False, output_file=None)
Create an API key.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
service_account_name_or_id
|
str
|
The name or ID of the service account to which the API key should be added. |
required |
name
|
str
|
Name of the API key |
required |
description
|
Optional[str]
|
The API key description. |
required |
set_key
|
bool
|
Configure the local client with the generated key. |
False
|
output_file
|
Optional[str]
|
Output file to write the API key to. |
None
|
Source code in src/zenml/cli/service_accounts.py
305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 |
|
create_run_template(source, name, config_path=None, stack_name_or_id=None)
Create a run template for a pipeline.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
source
|
str
|
Importable source resolving to a pipeline instance. |
required |
name
|
str
|
Name of the run template. |
required |
config_path
|
Optional[str]
|
Path to pipeline configuration file. |
None
|
stack_name_or_id
|
Optional[str]
|
Name or ID of the stack for which the template should be created. |
None
|
Source code in src/zenml/cli/pipeline.py
302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 |
|
create_secret(name, scope, interactive, values, args)
Create a secret.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
The name of the secret to create. |
required |
scope
|
str
|
The scope of the secret to create. |
required |
interactive
|
bool
|
Whether to use interactive mode to enter the secret values. |
required |
values
|
str
|
Secret key-value pairs to be passed as JSON or YAML. |
required |
args
|
List[str]
|
The arguments to pass to the secret. |
required |
Source code in src/zenml/cli/secret.py
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 |
|
create_service_account(service_account_name, description='', create_api_key=True, set_api_key=False, output_file=None)
Create a new service account.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
service_account_name
|
str
|
The name of the service account to create. |
required |
description
|
str
|
The API key description. |
''
|
create_api_key
|
bool
|
Create an API key for the service account. |
True
|
set_api_key
|
bool
|
Configure the local client to use the generated API key. |
False
|
output_file
|
Optional[str]
|
Output file to write the API key to. |
None
|
Source code in src/zenml/cli/service_accounts.py
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 |
|
create_user(user_name, password=None, is_admin=False)
Create a new user.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
user_name
|
str
|
The name of the user to create. |
required |
password
|
Optional[str]
|
The password of the user to create. |
None
|
is_admin
|
bool
|
Whether the user should be an admin. |
False
|
Source code in src/zenml/cli/user_management.py
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 |
|
deactivate_user(user_name_or_id)
Reset the password of a user.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
user_name_or_id
|
str
|
The name or ID of the user to reset the password for. |
required |
Source code in src/zenml/cli/user_management.py
371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 |
|
declare(text, bold=None, italic=None, **kwargs)
Echo a declaration on the CLI.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
text
|
Union[str, Text]
|
Input text string. |
required |
bold
|
Optional[bool]
|
Optional boolean to bold the text. |
None
|
italic
|
Optional[bool]
|
Optional boolean to italicize the text. |
None
|
**kwargs
|
Any
|
Optional kwargs to be passed to console.print(). |
{}
|
Source code in src/zenml/cli/utils.py
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
|
delete_api_key(service_account_name_or_id, name_or_id, yes=False)
Delete an API key.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
service_account_name_or_id
|
str
|
The name or ID of the service account to which the API key belongs. |
required |
name_or_id
|
str
|
The name or ID of the API key to delete. |
required |
yes
|
bool
|
If set, don't ask for confirmation. |
False
|
Source code in src/zenml/cli/service_accounts.py
551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 |
|
delete_authorized_device(id, yes=False)
Delete an authorized device.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id
|
str
|
The ID of the authorized device to delete. |
required |
yes
|
bool
|
If set, don't ask for confirmation. |
False
|
Source code in src/zenml/cli/authorized_device.py
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
|
delete_code_repository(name_or_id, yes=False)
Delete a code repository.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_or_id
|
str
|
The name or ID of the code repository to delete. |
required |
yes
|
bool
|
If set, don't ask for confirmation. |
False
|
Source code in src/zenml/cli/code_repository.py
280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 |
|
delete_model(model_name_or_id, yes=False)
Delete an existing model from the Model Control Plane.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model_name_or_id
|
str
|
The ID or name of the model to delete. |
required |
yes
|
bool
|
If set, don't ask for confirmation. |
False
|
Source code in src/zenml/cli/model.py
360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 |
|
delete_model_version(model_name_or_id, model_version_name_or_number_or_id, yes=False)
Delete an existing model version in the Model Control Plane.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model_name_or_id
|
str
|
The ID or name of the model that contains the version. |
required |
model_version_name_or_number_or_id
|
str
|
The ID, number or name of the model version. |
required |
yes
|
bool
|
If set, don't ask for confirmation. |
False
|
Source code in src/zenml/cli/model.py
542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 |
|
delete_pipeline(pipeline_name_or_id, yes=False)
Delete a pipeline.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pipeline_name_or_id
|
str
|
The name or ID of the pipeline to delete. |
required |
yes
|
bool
|
If set, don't ask for confirmation. |
False
|
Source code in src/zenml/cli/pipeline.py
389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 |
|
delete_pipeline_build(build_id, yes=False)
Delete a pipeline build.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
build_id
|
str
|
The ID of the pipeline build to delete. |
required |
yes
|
bool
|
If set, don't ask for confirmation. |
False
|
Source code in src/zenml/cli/pipeline.py
610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 |
|
delete_pipeline_run(run_name_or_id, yes=False)
Delete a pipeline run.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
run_name_or_id
|
str
|
The name or ID of the pipeline run to delete. |
required |
yes
|
bool
|
If set, don't ask for confirmation. |
False
|
Source code in src/zenml/cli/pipeline.py
514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 |
|
delete_schedule(schedule_name_or_id, yes=False)
Delete a pipeline schedule.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
schedule_name_or_id
|
str
|
The name or ID of the schedule to delete. |
required |
yes
|
bool
|
If set, don't ask for confirmation. |
False
|
Source code in src/zenml/cli/pipeline.py
454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 |
|
delete_secret(name_or_id, yes=False)
Delete a secret for a given name or id.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_or_id
|
str
|
The name or id of the secret to delete. |
required |
yes
|
bool
|
Skip asking for confirmation. |
False
|
Source code in src/zenml/cli/secret.py
445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 |
|
delete_service_account(service_account_name_or_id)
Delete a service account.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
service_account_name_or_id
|
str
|
The name or ID of the service account. |
required |
Source code in src/zenml/cli/service_accounts.py
267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 |
|
delete_service_connector(name_id_or_prefix)
Deletes a service connector.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
str
|
The name of the service connector to delete. |
required |
Source code in src/zenml/cli/service_connectors.py
1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 |
|
delete_stack(stack_name_or_id, yes=False, recursive=False)
Delete a stack.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
stack_name_or_id
|
str
|
Name or id of the stack to delete. |
required |
yes
|
bool
|
Stack will be deleted without prompting for confirmation. |
False
|
recursive
|
bool
|
The stack will be deleted along with the corresponding stack associated with it. |
False
|
Source code in src/zenml/cli/stack.py
996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 |
|
delete_tag(tag_name_or_id, yes=False)
Delete an existing tag.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
tag_name_or_id
|
Union[str, UUID]
|
The ID or name of the tag to delete. |
required |
yes
|
bool
|
If set, don't ask for confirmation. |
False
|
Source code in src/zenml/cli/tag.py
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 |
|
delete_user(user_name_or_id)
Delete a user.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
user_name_or_id
|
str
|
The name or ID of the user to delete. |
required |
Source code in src/zenml/cli/user_management.py
417 418 419 420 421 422 423 424 425 426 427 428 429 |
|
depaginate(list_method, **kwargs)
Depaginate the results from a client or store method that returns pages.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
list_method
|
Callable[..., Page[AnyResponse]]
|
The list method to depaginate. |
required |
**kwargs
|
Any
|
Arguments for the list method. |
{}
|
Returns:
Type | Description |
---|---|
List[AnyResponse]
|
A list of the corresponding Response Models. |
Source code in src/zenml/utils/pagination_utils.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
|
deploy(ctx, provider, stack_name=None, location=None, set_stack=False)
Deploy and register a fully functional cloud ZenML stack.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ctx
|
Context
|
The click context. |
required |
provider
|
str
|
The cloud provider to deploy the stack to. |
required |
stack_name
|
Optional[str]
|
A name for the ZenML stack that gets imported as a result of the recipe deployment. |
None
|
location
|
Optional[str]
|
The location to deploy the stack to. |
None
|
set_stack
|
bool
|
Immediately set the deployed stack as active. |
False
|
Raises:
Type | Description |
---|---|
Abort
|
If the user aborts the deployment. |
KeyboardInterrupt
|
If the user interrupts the deployment. |
Source code in src/zenml/cli/stack.py
1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 |
|
describe_api_key(service_account_name_or_id, name_or_id)
Describe an API key.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
service_account_name_or_id
|
str
|
The name or ID of the service account to which the API key belongs. |
required |
name_or_id
|
str
|
The name or ID of the API key to describe. |
required |
Source code in src/zenml/cli/service_accounts.py
355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 |
|
describe_authorized_device(id_or_prefix)
Fetch an authorized device.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id_or_prefix
|
str
|
The ID of the authorized device to fetch. |
required |
Source code in src/zenml/cli/authorized_device.py
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
|
describe_code_repository(name_id_or_prefix)
Describe a code repository.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
str
|
Name, ID or prefix of the code repository. |
required |
Source code in src/zenml/cli/code_repository.py
165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 |
|
describe_service_account(service_account_name_or_id)
Describe a service account.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
service_account_name_or_id
|
str
|
The name or ID of the service account. |
required |
Source code in src/zenml/cli/service_accounts.py
165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 |
|
describe_service_connector(name_id_or_prefix, show_secrets=False, describe_client=False, resource_type=None, resource_id=None)
Prints details about a service connector.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
str
|
Name or id of the service connector to describe. |
required |
show_secrets
|
bool
|
Whether to show security sensitive configuration attributes in the terminal. |
False
|
describe_client
|
bool
|
Fetch and describe a service connector client instead of the base connector if possible. |
False
|
resource_type
|
Optional[str]
|
Resource type to use when fetching the service connector client. |
None
|
resource_id
|
Optional[str]
|
Resource ID to use when fetching the service connector client. |
None
|
Source code in src/zenml/cli/service_connectors.py
1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 |
|
describe_service_connector_type(type, resource_type=None, auth_method=None)
Describes a service connector type.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
type
|
str
|
The connector type to describe. |
required |
resource_type
|
Optional[str]
|
The resource type to describe. |
None
|
auth_method
|
Optional[str]
|
The authentication method to describe. |
None
|
Source code in src/zenml/cli/service_connectors.py
2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 |
|
describe_stack(stack_name_or_id=None)
Show details about a named stack or the active stack.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
stack_name_or_id
|
Optional[str]
|
Name of the stack to describe. |
None
|
Source code in src/zenml/cli/stack.py
963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 |
|
describe_user(user_name_or_id=None)
Get the user.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
user_name_or_id
|
Optional[str]
|
The name or ID of the user. |
None
|
Source code in src/zenml/cli/user_management.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
|
describe_workspace(workspace_name_or_id=None)
Get the workspace.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
workspace_name_or_id
|
Optional[str]
|
The name or ID of the workspace to set as active. |
None
|
Source code in src/zenml/cli/workspace.py
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
|
disconnect_server()
Disconnect from a ZenML server.
Source code in src/zenml/cli/server.py
419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 |
|
down()
Shut down the local ZenML dashboard.
Source code in src/zenml/cli/server.py
162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 |
|
email_opt_int(opted_in, email, source)
Track the event of the users response to the email prompt, identify them.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
opted_in
|
bool
|
Did the user decide to opt-in |
required |
email
|
Optional[str]
|
The email the user optionally provided |
required |
source
|
str
|
Location when the user replied ["zenml go", "zenml server"] |
required |
Source code in src/zenml/analytics/utils.py
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
|
error(text)
Echo an error string on the CLI.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
text
|
str
|
Input text string. |
required |
Raises:
Type | Description |
---|---|
ClickException
|
when called. |
Source code in src/zenml/cli/utils.py
157 158 159 160 161 162 163 164 165 166 |
|
expand_argument_value_from_file(name, value)
Expands the value of an argument pointing to a file into the contents of that file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
Name of the argument. Used solely for logging purposes. |
required |
value
|
str
|
The value of the argument. This is to be interpreted as a
filename if it begins with a |
required |
Returns:
Type | Description |
---|---|
str
|
The argument value expanded into the contents of the file, if the |
str
|
argument value begins with a |
str
|
value is returned unchanged. |
Raises:
Type | Description |
---|---|
ValueError
|
If the argument value points to a file that doesn't exist,
that cannot be read, or is too long(i.e. exceeds
|
Source code in src/zenml/cli/utils.py
717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 |
|
export_requirements(stack_name_or_id=None, output_file=None, overwrite=False)
Exports stack requirements so they can be installed using pip.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
stack_name_or_id
|
Optional[str]
|
Stack name or ID. If not given, the active stack will be used. |
None
|
output_file
|
Optional[str]
|
Optional path to the requirements output file. |
None
|
overwrite
|
bool
|
Overwrite the output file if it already exists. This option is only valid if the output file is provided. |
False
|
Source code in src/zenml/cli/stack.py
1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 |
|
export_secret(name_id_or_prefix, scope=None, filename=None)
Export a secret as a YAML file.
The resulting YAML file can then be imported as a new secret using the
zenml secret create <new_secret_name> -v @<filename>
command.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
str
|
The name of the secret to export. |
required |
scope
|
Optional[str]
|
The scope of the secret to export. |
None
|
filename
|
Optional[str]
|
The name of the file to export the secret to. |
None
|
Source code in src/zenml/cli/secret.py
489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 |
|
export_stack(stack_name_or_id=None, filename=None)
Export a stack to YAML.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
stack_name_or_id
|
Optional[str]
|
The name of the stack to export. |
None
|
filename
|
Optional[str]
|
The filename to export the stack to. |
None
|
Source code in src/zenml/cli/stack.py
1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 |
|
format_integration_list(integrations)
Formats a list of integrations into a List of Dicts.
This list of dicts can then be printed in a table style using cli_utils.print_table.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
integrations
|
List[Tuple[str, Type[Integration]]]
|
List of tuples containing the name of the integration and the integration metadata. |
required |
Returns:
Type | Description |
---|---|
List[Dict[str, str]]
|
List of Dicts containing the name of the integration and the integration |
Source code in src/zenml/cli/utils.py
511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 |
|
generate_stack_component_connect_command(component_type)
Generates a connect
command for the specific stack component type.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
component_type
|
StackComponentType
|
Type of the component to generate the command for. |
required |
Returns:
Type | Description |
---|---|
Callable[[str, str], None]
|
A function that can be used as a |
Source code in src/zenml/cli/stack_components.py
1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 |
|
generate_stack_component_copy_command(component_type)
Generates a copy
command for the specific stack component type.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
component_type
|
StackComponentType
|
Type of the component to generate the command for. |
required |
Returns:
Type | Description |
---|---|
Callable[[str, str], None]
|
A function that can be used as a |
Source code in src/zenml/cli/stack_components.py
528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 |
|
generate_stack_component_delete_command(component_type)
Generates a delete
command for the specific stack component type.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
component_type
|
StackComponentType
|
Type of the component to generate the command for. |
required |
Returns:
Type | Description |
---|---|
Callable[[str], None]
|
A function that can be used as a |
Source code in src/zenml/cli/stack_components.py
491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 |
|
generate_stack_component_describe_command(component_type)
Generates a describe
command for the specific stack component type.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
component_type
|
StackComponentType
|
Type of the component to generate the command for. |
required |
Returns:
Type | Description |
---|---|
Callable[[str], None]
|
A function that can be used as a |
Source code in src/zenml/cli/stack_components.py
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 |
|
generate_stack_component_disconnect_command(component_type)
Generates a disconnect
command for the specific stack component type.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
component_type
|
StackComponentType
|
Type of the component to generate the command for. |
required |
Returns:
Type | Description |
---|---|
Callable[[str], None]
|
A function that can be used as a |
Source code in src/zenml/cli/stack_components.py
1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 |
|
generate_stack_component_explain_command(component_type)
Generates an explain
command for the specific stack component type.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
component_type
|
StackComponentType
|
Type of the component to generate the command for. |
required |
Returns:
Type | Description |
---|---|
Callable[[], None]
|
A function that can be used as a |
Source code in src/zenml/cli/stack_components.py
670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 |
|
generate_stack_component_flavor_delete_command(component_type)
Generates a delete
command for a single flavor of a component.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
component_type
|
StackComponentType
|
Type of the component to generate the command for. |
required |
Returns:
Type | Description |
---|---|
Callable[[str], None]
|
A function that can be used as a |
Source code in src/zenml/cli/stack_components.py
858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 |
|
generate_stack_component_flavor_describe_command(component_type)
Generates a describe
command for a single flavor of a component.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
component_type
|
StackComponentType
|
Type of the component to generate the command for. |
required |
Returns:
Type | Description |
---|---|
Callable[[str], None]
|
A function that can be used as a |
Source code in src/zenml/cli/stack_components.py
796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 |
|
generate_stack_component_flavor_list_command(component_type)
Generates a list
command for the flavors of a stack component.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
component_type
|
StackComponentType
|
Type of the component to generate the command for. |
required |
Returns:
Type | Description |
---|---|
Callable[[], None]
|
A function that can be used as a |
Source code in src/zenml/cli/stack_components.py
700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 |
|
generate_stack_component_flavor_register_command(component_type)
Generates a register
command for the flavors of a stack component.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
component_type
|
StackComponentType
|
Type of the component to generate the command for. |
required |
Returns:
Type | Description |
---|---|
Callable[[str], None]
|
A function that can be used as a |
Source code in src/zenml/cli/stack_components.py
726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 |
|
generate_stack_component_get_command(component_type)
Generates a get
command for the specific stack component type.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
component_type
|
StackComponentType
|
Type of the component to generate the command for. |
required |
Returns:
Type | Description |
---|---|
Callable[[], None]
|
A function that can be used as a |
Source code in src/zenml/cli/stack_components.py
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
|
generate_stack_component_list_command(component_type)
Generates a list
command for the specific stack component type.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
component_type
|
StackComponentType
|
Type of the component to generate the command for. |
required |
Returns:
Type | Description |
---|---|
Callable[..., None]
|
A function that can be used as a |
Source code in src/zenml/cli/stack_components.py
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 |
|
generate_stack_component_logs_command(component_type)
Generates a logs
command for the specific stack component type.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
component_type
|
StackComponentType
|
Type of the component to generate the command for. |
required |
Returns:
Type | Description |
---|---|
Callable[[str, bool], None]
|
A function that can be used as a |
Source code in src/zenml/cli/stack_components.py
582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 |
|
generate_stack_component_register_command(component_type)
Generates a register
command for the specific stack component type.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
component_type
|
StackComponentType
|
Type of the component to generate the command for. |
required |
Returns:
Type | Description |
---|---|
Callable[[str, str, List[str]], None]
|
A function that can be used as a |
Source code in src/zenml/cli/stack_components.py
185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 |
|
generate_stack_component_remove_attribute_command(component_type)
Generates remove_attribute
command for a specific stack component type.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
component_type
|
StackComponentType
|
Type of the component to generate the command for. |
required |
Returns:
Type | Description |
---|---|
Callable[[str, List[str]], None]
|
A function that can be used as a |
Source code in src/zenml/cli/stack_components.py
374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 |
|
generate_stack_component_rename_command(component_type)
Generates a rename
command for the specific stack component type.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
component_type
|
StackComponentType
|
Type of the component to generate the command for. |
required |
Returns:
Type | Description |
---|---|
Callable[[str, str], None]
|
A function that can be used as a |
Source code in src/zenml/cli/stack_components.py
436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 |
|
generate_stack_component_update_command(component_type)
Generates an update
command for the specific stack component type.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
component_type
|
StackComponentType
|
Type of the component to generate the command for. |
required |
Returns:
Type | Description |
---|---|
Callable[[str, List[str]], None]
|
A function that can be used as a |
Source code in src/zenml/cli/stack_components.py
300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 |
|
get_active_stack()
Gets the active stack.
Source code in src/zenml/cli/stack.py
1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 |
|
get_component_url(component)
Function to get the dashboard URL of a given component model.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
component
|
ComponentResponse
|
the response model of the given component. |
required |
Returns:
Type | Description |
---|---|
Optional[str]
|
the URL to the component if the dashboard is available, else None. |
Source code in src/zenml/utils/dashboard_utils.py
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
|
get_environment()
Returns a string representing the execution environment of the pipeline.
Returns:
Name | Type | Description |
---|---|---|
str |
str
|
the execution environment |
Source code in src/zenml/environment.py
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
|
get_global_config_directory()
Gets the global config directory for ZenML.
Returns:
Type | Description |
---|---|
str
|
The global config directory for ZenML. |
Source code in src/zenml/utils/io_utils.py
53 54 55 56 57 58 59 60 61 62 |
|
get_local_server()
Get the active local server.
Call this function to retrieve the local server deployed on this machine.
Returns:
Type | Description |
---|---|
Optional[LocalServerDeployment]
|
The local server deployment or None, if no local server deployment was |
Optional[LocalServerDeployment]
|
found. |
Source code in src/zenml/zen_server/utils.py
269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 |
|
get_logger(logger_name)
Main function to get logger name,.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
logger_name
|
str
|
Name of logger to initialize. |
required |
Returns:
Type | Description |
---|---|
Logger
|
A logger object. |
Source code in src/zenml/logger.py
171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 |
|
get_requirements(integration_name=None)
List all requirements for the chosen integration.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
integration_name
|
Optional[str]
|
The name of the integration to list the requirements for. |
None
|
Source code in src/zenml/cli/integration.py
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
|
get_resources_options_from_resource_model_for_full_stack(connector_details)
Get the resource options from the resource model for the full stack.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
connector_details
|
Union[UUID, ServiceConnectorInfo]
|
The service connector details (UUID or Info). |
required |
Returns:
Type | Description |
---|---|
ServiceConnectorResourcesInfo
|
All available service connector resource options. |
Source code in src/zenml/service_connectors/service_connector_utils.py
165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 |
|
get_secret(name_id_or_prefix, scope=None)
Get a secret and print it to the console.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
str
|
The name of the secret to get. |
required |
scope
|
Optional[str]
|
The scope of the secret to get. |
None
|
Source code in src/zenml/cli/secret.py
197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 |
|
get_stack_url(stack)
Function to get the dashboard URL of a given stack model.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
stack
|
StackResponse
|
the response model of the given stack. |
required |
Returns:
Type | Description |
---|---|
Optional[str]
|
the URL to the stack if the dashboard is available, else None. |
Source code in src/zenml/utils/dashboard_utils.py
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
|
go()
Quickly explore ZenML with this walk-through.
Raises:
Type | Description |
---|---|
GitNotFoundError
|
If git is not installed. |
e
|
when Jupyter Notebook fails to launch. |
Source code in src/zenml/cli/base.py
404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 |
|
import_stack(stack_name, filename, ignore_version_mismatch=False)
Import a stack from YAML.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
stack_name
|
str
|
The name of the stack to import. |
required |
filename
|
Optional[str]
|
The filename to import the stack from. |
required |
ignore_version_mismatch
|
bool
|
Import stack components even if the installed version of ZenML is different from the one specified in the stack YAML file. |
False
|
Source code in src/zenml/cli/stack.py
1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 |
|
info(packages, all=False, file='', stack=False)
Show information about the current user setup.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
packages
|
Tuple[str]
|
List of packages to show information about. |
required |
all
|
bool
|
Flag to show information about all installed packages. |
False
|
file
|
str
|
Flag to output to a file. |
''
|
stack
|
bool
|
Flag to output information about active stack and components |
False
|
Source code in src/zenml/cli/base.py
559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 |
|
init(path, template=None, template_tag=None, template_with_defaults=False, test=False)
Initialize ZenML on given path.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path
|
Optional[Path]
|
Path to the repository. |
required |
template
|
Optional[str]
|
Optional name or URL of the ZenML project template to use to
initialize the repository. Can be a string like |
None
|
template_tag
|
Optional[str]
|
Optional tag of the ZenML project template to use to initialize the repository. If template is a pre-defined template, then this is ignored. |
None
|
template_with_defaults
|
bool
|
Whether to use default parameters of the ZenML project template |
False
|
test
|
bool
|
Whether to skip interactivity when testing. |
False
|
Source code in src/zenml/cli/base.py
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 |
|
install(integrations, ignore_integration, force=False, uv=False)
Installs the required packages for a given integration.
If no integration is specified all required packages for all integrations are installed using pip or uv.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
integrations
|
Tuple[str]
|
The name of the integration to install the requirements for. |
required |
ignore_integration
|
Tuple[str]
|
Integrations to ignore explicitly (passed in separately). |
required |
force
|
bool
|
Force the installation of the required packages. |
False
|
uv
|
bool
|
Use uv for package installation (experimental). |
False
|
Source code in src/zenml/cli/integration.py
211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 |
|
install_packages(packages, upgrade=False, use_uv=False)
Installs pypi packages into the current environment with pip or uv.
When using with uv
, a virtual environment is required.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
packages
|
List[str]
|
List of packages to install. |
required |
upgrade
|
bool
|
Whether to upgrade the packages if they are already installed. |
False
|
use_uv
|
bool
|
Whether to use uv for package installation. |
False
|
Raises:
Type | Description |
---|---|
e
|
If the package installation fails. |
Source code in src/zenml/cli/utils.py
1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 |
|
integration()
Interact with external integrations.
Source code in src/zenml/cli/integration.py
41 42 43 44 45 46 |
|
is_analytics_opted_in()
Check whether user is opt-in or opt-out of analytics.
Source code in src/zenml/cli/config.py
32 33 34 35 36 |
|
is_jupyter_installed()
Checks if Jupyter notebook is installed.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
True if Jupyter notebook is installed, False otherwise. |
Source code in src/zenml/cli/utils.py
2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 |
|
is_pro_server(url)
Check if the server at the given URL is a ZenML Pro server.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
url
|
str
|
The URL of the server to check. |
required |
Returns:
Type | Description |
---|---|
Optional[bool]
|
True if the server is a ZenML Pro server, False otherwise, and the |
Optional[str]
|
extracted pro API URL if the server is a ZenML Pro server, or None if |
Tuple[Optional[bool], Optional[str]]
|
no information could be extracted. |
Source code in src/zenml/cli/login.py
422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 |
|
is_sorted_or_filtered(ctx)
Decides whether any filtering/sorting happens during a 'list' CLI call.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ctx
|
Context
|
the Click context of the CLI call. |
required |
Returns:
Type | Description |
---|---|
bool
|
a boolean indicating whether any sorting or filtering parameters were |
bool
|
used during the list CLI call. |
Source code in src/zenml/cli/utils.py
2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 |
|
legacy_show(ngrok_token=None)
Show the ZenML dashboard.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ngrok_token
|
Optional[str]
|
An ngrok auth token to use for exposing the ZenML dashboard on a public domain. Primarily used for accessing the dashboard in Colab. |
None
|
Source code in src/zenml/cli/server.py
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 |
|
list_api_keys(service_account_name_or_id, **kwargs)
List all API keys.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
service_account_name_or_id
|
str
|
The name or ID of the service account for which to list the API keys. |
required |
**kwargs
|
Any
|
Keyword arguments to filter API keys. |
{}
|
Source code in src/zenml/cli/service_accounts.py
384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 |
|
list_artifact_versions(**kwargs)
List all artifact versions.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
**kwargs
|
Any
|
Keyword arguments to filter artifact versions by. |
{}
|
Source code in src/zenml/cli/artifact.py
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 |
|
list_artifacts(**kwargs)
List all artifacts.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
**kwargs
|
Any
|
Keyword arguments to filter artifacts by. |
{}
|
Source code in src/zenml/cli/artifact.py
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
|
list_authorized_devices(**kwargs)
List all authorized devices.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
**kwargs
|
Any
|
Keyword arguments to filter authorized devices. |
{}
|
Source code in src/zenml/cli/authorized_device.py
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
|
list_code_repositories(**kwargs)
List all connected code repositories.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
**kwargs
|
Any
|
Keyword arguments to filter code repositories. |
{}
|
Source code in src/zenml/cli/code_repository.py
191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 |
|
list_integrations()
List all available integrations with their installation status.
Source code in src/zenml/cli/integration.py
49 50 51 52 53 54 55 56 57 58 59 60 61 |
|
list_model_version_data_artifacts(model_name, model_version=None, **kwargs)
List data artifacts linked to a model version in the Model Control Plane.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model_name
|
str
|
The ID or name of the model containing version. |
required |
model_version
|
Optional[str]
|
The name, number or ID of the model version. If not provided, the latest version is used. |
None
|
**kwargs
|
Any
|
Keyword arguments to filter models. |
{}
|
Source code in src/zenml/cli/model.py
646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 |
|
list_model_version_deployment_artifacts(model_name, model_version=None, **kwargs)
List deployment artifacts linked to a model version in the Model Control Plane.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model_name
|
str
|
The ID or name of the model containing version. |
required |
model_version
|
Optional[str]
|
The name, number or ID of the model version. If not provided, the latest version is used. |
None
|
**kwargs
|
Any
|
Keyword arguments to filter models. |
{}
|
Source code in src/zenml/cli/model.py
702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 |
|
list_model_version_model_artifacts(model_name, model_version=None, **kwargs)
List model artifacts linked to a model version in the Model Control Plane.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model_name
|
str
|
The ID or name of the model containing version. |
required |
model_version
|
Optional[str]
|
The name, number or ID of the model version. If not provided, the latest version is used. |
None
|
**kwargs
|
Any
|
Keyword arguments to filter models. |
{}
|
Source code in src/zenml/cli/model.py
674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 |
|
list_model_version_pipeline_runs(model_name, model_version=None, **kwargs)
List pipeline runs of a model version in the Model Control Plane.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model_name
|
str
|
The ID or name of the model containing version. |
required |
model_version
|
Optional[str]
|
The name, number or ID of the model version. If not provided, the latest version is used. |
None
|
**kwargs
|
Any
|
Keyword arguments to filter models. |
{}
|
Source code in src/zenml/cli/model.py
730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 |
|
list_model_versions(model_name, **kwargs)
List model versions with filter in the Model Control Plane.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model_name
|
str
|
The name of the parent model. |
required |
**kwargs
|
Any
|
Keyword arguments to filter models. |
{}
|
Source code in src/zenml/cli/model.py
401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 |
|
list_models(**kwargs)
List models with filter in the Model Control Plane.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
**kwargs
|
Any
|
Keyword arguments to filter models. |
{}
|
Source code in src/zenml/cli/model.py
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
|
list_options(filter_model)
Create a decorator to generate the correct list of filter parameters.
The Outer decorator (list_options
) is responsible for creating the inner
decorator. This is necessary so that the type of FilterModel
can be passed
in as a parameter.
Based on the filter model, the inner decorator extracts all the click options that should be added to the decorated function (wrapper).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
filter_model
|
Type[BaseFilter]
|
The filter model based on which to decorate the function. |
required |
Returns:
Type | Description |
---|---|
Callable[[F], F]
|
The inner decorator. |
Source code in src/zenml/cli/utils.py
2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 |
|
list_pipeline_builds(**kwargs)
List all pipeline builds for the filter.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
**kwargs
|
Any
|
Keyword arguments to filter pipeline builds. |
{}
|
Source code in src/zenml/cli/pipeline.py
578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 |
|
list_pipeline_runs(**kwargs)
List all registered pipeline runs for the filter.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
**kwargs
|
Any
|
Keyword arguments to filter pipeline runs. |
{}
|
Source code in src/zenml/cli/pipeline.py
491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 |
|
list_pipelines(**kwargs)
List all registered pipelines.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
**kwargs
|
Any
|
Keyword arguments to filter pipelines. |
{}
|
Source code in src/zenml/cli/pipeline.py
367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 |
|
list_schedules(**kwargs)
List all pipeline schedules.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
**kwargs
|
Any
|
Keyword arguments to filter schedules. |
{}
|
Source code in src/zenml/cli/pipeline.py
432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 |
|
list_secrets(**kwargs)
List all secrets that fulfill the filter criteria.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
kwargs
|
Any
|
Keyword arguments to filter the secrets. |
{}
|
Source code in src/zenml/cli/secret.py
165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 |
|
list_service_accounts(ctx, **kwargs)
List all users.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ctx
|
Context
|
The click context object |
required |
kwargs
|
Any
|
Keyword arguments to filter the list of users. |
{}
|
Source code in src/zenml/cli/service_accounts.py
187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 |
|
list_service_connector_resources(connector_type=None, resource_type=None, resource_id=None, exclude_errors=False)
List resources that can be accessed by service connectors.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
connector_type
|
Optional[str]
|
The type of service connector to filter by. |
None
|
resource_type
|
Optional[str]
|
The type of resource to filter by. |
None
|
resource_id
|
Optional[str]
|
The name of a resource to filter by. |
None
|
exclude_errors
|
bool
|
Exclude resources that cannot be accessed due to errors. |
False
|
Source code in src/zenml/cli/service_connectors.py
1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 |
|
list_service_connector_types(type=None, resource_type=None, auth_method=None, detailed=False)
List service connector types.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
type
|
Optional[str]
|
Filter by service connector type. |
None
|
resource_type
|
Optional[str]
|
Filter by the type of resource to connect to. |
None
|
auth_method
|
Optional[str]
|
Filter by the supported authentication method. |
None
|
detailed
|
bool
|
Show detailed information about the service connectors. |
False
|
Source code in src/zenml/cli/service_connectors.py
2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 |
|
list_service_connectors(ctx, labels=None, **kwargs)
List all service connectors.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ctx
|
Context
|
The click context object |
required |
labels
|
Optional[List[str]]
|
Labels to filter by. |
None
|
kwargs
|
Any
|
Keyword arguments to filter the components. |
{}
|
Source code in src/zenml/cli/service_connectors.py
969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 |
|
list_stacks(ctx, **kwargs)
List all stacks that fulfill the filter requirements.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ctx
|
Context
|
the Click context |
required |
kwargs
|
Any
|
Keyword arguments to filter the stacks. |
{}
|
Source code in src/zenml/cli/stack.py
939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 |
|
list_tags(**kwargs)
List tags with filter.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
**kwargs
|
Any
|
Keyword arguments to filter models. |
{}
|
Source code in src/zenml/cli/tag.py
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
|
list_users(ctx, **kwargs)
List all users.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ctx
|
Context
|
The click context object |
required |
kwargs
|
Any
|
Keyword arguments to filter the list of users. |
{}
|
Source code in src/zenml/cli/user_management.py
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
|
list_workspaces(ctx, **kwargs)
List all workspaces.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ctx
|
Context
|
The click context object |
required |
**kwargs
|
Any
|
Keyword arguments to filter the list of workspaces. |
{}
|
Source code in src/zenml/cli/workspace.py
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
|
lock_authorized_device(id)
Lock an authorized device.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id
|
str
|
The ID of the authorized device to lock. |
required |
Source code in src/zenml/cli/authorized_device.py
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
|
logging()
Configuration of logging for ZenML pipelines.
Source code in src/zenml/cli/config.py
62 63 64 |
|
login_service_connector(name_id_or_prefix, resource_type=None, resource_id=None)
Authenticate the local client/SDK with connector credentials.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
str
|
The name or id of the service connector to use. |
required |
resource_type
|
Optional[str]
|
The type of resource to connect to. |
None
|
resource_id
|
Optional[str]
|
Explicit resource ID to connect to. |
None
|
Source code in src/zenml/cli/service_connectors.py
1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 |
|
logs(follow=False, raw=False, tail=None)
Display the logs for a ZenML server.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
follow
|
bool
|
Continue to output new log data as it becomes available. |
False
|
tail
|
Optional[int]
|
Only show the last NUM lines of log output. |
None
|
raw
|
bool
|
Show raw log contents (don't pretty-print logs). |
False
|
Source code in src/zenml/cli/server.py
438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 |
|
migrate_database(skip_default_registrations=False)
Migrate the ZenML database.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
skip_default_registrations
|
bool
|
If |
False
|
Source code in src/zenml/cli/base.py
670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 |
|
model()
Interact with models and model versions in the Model Control Plane.
Source code in src/zenml/cli/model.py
81 82 83 |
|
opt_in()
Opt-in to analytics.
Source code in src/zenml/cli/config.py
39 40 41 42 43 44 45 46 47 |
|
opt_out()
Opt-out of analytics.
Source code in src/zenml/cli/config.py
50 51 52 53 54 55 56 57 58 |
|
parse_name_and_extra_arguments(args, expand_args=False, name_mandatory=True)
Parse a name and extra arguments from the CLI.
This is a utility function used to parse a variable list of optional CLI
arguments of the form --key=value
that must also include one mandatory
free-form name argument. There is no restriction as to the order of the
arguments.
Examples:
>>> parse_name_and_extra_arguments(['foo']])
('foo', {})
>>> parse_name_and_extra_arguments(['foo', '--bar=1'])
('foo', {'bar': '1'})
>>> parse_name_and_extra_arguments(['--bar=1', 'foo', '--baz=2'])
('foo', {'bar': '1', 'baz': '2'})
>>> parse_name_and_extra_arguments(['--bar=1'])
Traceback (most recent call last):
...
ValueError: Missing required argument: name
Parameters:
Name | Type | Description | Default |
---|---|---|---|
args
|
List[str]
|
A list of command line arguments from the CLI. |
required |
expand_args
|
bool
|
Whether to expand argument values into the contents of the
files they may be pointing at using the special |
False
|
name_mandatory
|
bool
|
Whether the name argument is mandatory. |
True
|
Returns:
Type | Description |
---|---|
Tuple[Optional[str], Dict[str, str]]
|
The name and a dict of parsed args. |
Source code in src/zenml/cli/utils.py
800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 |
|
pipeline()
Interact with pipelines, runs and schedules.
Source code in src/zenml/cli/pipeline.py
72 73 74 |
|
pretty_print_model_deployer(model_services, model_deployer)
Given a list of served_models, print all associated key-value pairs.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model_services
|
List[BaseService]
|
list of model deployment services |
required |
model_deployer
|
BaseModelDeployer
|
Active model deployer |
required |
Source code in src/zenml/cli/utils.py
1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 |
|
pretty_print_secret(secret, hide_secret=True)
Print all key-value pairs associated with a secret.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
secret
|
Dict[str, str]
|
Secret values to print. |
required |
hide_secret
|
bool
|
boolean that configures if the secret values are shown on the CLI |
True
|
Source code in src/zenml/cli/utils.py
1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 |
|
print_model_url(url)
Pretty prints a given URL on the CLI.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
url
|
Optional[str]
|
optional str, the URL to display. |
required |
Source code in src/zenml/cli/utils.py
2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 |
|
print_page_info(page)
Print all page information showing the number of items and pages.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
page
|
Page[T]
|
The page to print the information for. |
required |
Source code in src/zenml/cli/utils.py
2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 |
|
print_served_model_configuration(model_service, model_deployer)
Prints the configuration of a model_service.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model_service
|
BaseService
|
Specific service instance to |
required |
model_deployer
|
BaseModelDeployer
|
Active model deployer |
required |
Source code in src/zenml/cli/utils.py
1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 |
|
print_stacks_table(client, stacks, show_active=False)
Print a prettified list of all stacks supplied to this method.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
client
|
Client
|
Repository instance |
required |
stacks
|
Sequence[StackResponse]
|
List of stacks |
required |
show_active
|
bool
|
Flag to decide whether to append the active stack on the top of the list. |
False
|
Source code in src/zenml/cli/utils.py
1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 |
|
print_table(obj, title=None, caption=None, **columns)
Prints the list of dicts in a table format.
The input object should be a List of Dicts. Each item in that list represent a line in the Table. Each dict should have the same keys. The keys of the dict will be used as headers of the resulting table.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
obj
|
List[Dict[str, Any]]
|
A List containing dictionaries. |
required |
title
|
Optional[str]
|
Title of the table. |
None
|
caption
|
Optional[str]
|
Caption of the table. |
None
|
columns
|
Column
|
Optional column configurations to be used in the table. |
{}
|
Source code in src/zenml/cli/utils.py
209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 |
|
prompt_connector_name(default_name=None, connector=None)
Prompt the user for a service connector name.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
default_name
|
Optional[str]
|
The default name to use if the user doesn't provide one. |
None
|
connector
|
Optional[UUID]
|
The UUID of a service connector being renamed. |
None
|
Returns:
Type | Description |
---|---|
str
|
The name provided by the user. |
Source code in src/zenml/cli/service_connectors.py
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
|
prompt_expiration_time(min=None, max=None, default=None)
Prompt the user for an expiration time.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
min
|
Optional[int]
|
The minimum allowed expiration time. |
None
|
max
|
Optional[int]
|
The maximum allowed expiration time. |
None
|
default
|
Optional[int]
|
The default expiration time. |
None
|
Returns:
Type | Description |
---|---|
int
|
The expiration time provided by the user. |
Source code in src/zenml/cli/service_connectors.py
203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 |
|
prompt_expires_at(default=None)
Prompt the user for an expiration timestamp.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
default
|
Optional[datetime]
|
The default expiration time. |
None
|
Returns:
Type | Description |
---|---|
Optional[datetime]
|
The expiration time provided by the user. |
Source code in src/zenml/cli/service_connectors.py
271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 |
|
prompt_resource_id(resource_name, resource_ids)
Prompt the user for a resource ID.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
resource_name
|
str
|
The name of the resource. |
required |
resource_ids
|
List[str]
|
The list of available resource IDs. |
required |
Returns:
Type | Description |
---|---|
Optional[str]
|
The resource ID provided by the user. |
Source code in src/zenml/cli/service_connectors.py
141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 |
|
prompt_resource_type(available_resource_types)
Prompt the user for a resource type.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
available_resource_types
|
List[str]
|
The list of available resource types. |
required |
Returns:
Type | Description |
---|---|
Optional[str]
|
The resource type provided by the user. |
Source code in src/zenml/cli/service_connectors.py
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 |
|
prompt_select_resource(resource_list)
Prompts the user to select a resource ID from a list of resources.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
resource_list
|
List[ServiceConnectorResourcesModel]
|
List of resources to select from. |
required |
Returns:
Type | Description |
---|---|
UUID
|
The ID of a selected connector and the ID of the selected resource |
str
|
instance. |
Source code in src/zenml/cli/stack_components.py
943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 |
|
prompt_select_resource_id(resource_ids, resource_name, interactive=True)
Prompts the user to select a resource ID from a list of available IDs.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
resource_ids
|
List[str]
|
A list of available resource IDs. |
required |
resource_name
|
str
|
The name of the resource type to select. |
required |
interactive
|
bool
|
Whether to prompt the user for input or error out if user input is required. |
True
|
Returns:
Type | Description |
---|---|
str
|
The selected resource ID. |
Source code in src/zenml/cli/stack_components.py
894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 |
|
prune_artifacts(only_artifact=False, only_metadata=False, yes=False, ignore_errors=False)
Delete all unused artifacts and artifact versions.
Unused artifact versions are those that are no longer referenced by any pipeline runs. Similarly, unused artifacts are those that no longer have any used artifact versions.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
only_artifact
|
bool
|
If set, only delete the actual artifact object from the artifact store but keep the metadata. |
False
|
only_metadata
|
bool
|
If set, only delete metadata and not the actual artifact objects stored in the artifact store. |
False
|
yes
|
bool
|
If set, don't ask for confirmation. |
False
|
ignore_errors
|
bool
|
If set, ignore errors and continue with the next artifact version. |
False
|
Source code in src/zenml/cli/artifact.py
200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 |
|
read_yaml(file_path)
Read YAML on file path and returns contents as dict.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
file_path
|
str
|
Path to YAML file. |
required |
Returns:
Type | Description |
---|---|
Any
|
Contents of the file in a dict. |
Raises:
Type | Description |
---|---|
FileNotFoundError
|
if file does not exist. |
Source code in src/zenml/utils/yaml_utils.py
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
|
refresh_pipeline_run(run_name_or_id)
Refresh the status of a pipeline run.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
run_name_or_id
|
str
|
The name or ID of the pipeline run to refresh. |
required |
Source code in src/zenml/cli/pipeline.py
552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 |
|
register_all_stack_component_cli_commands()
Registers CLI commands for all stack components.
Source code in src/zenml/cli/stack_components.py
1314 1315 1316 1317 1318 1319 |
|
register_annotator_subcommands()
Registers CLI subcommands for the annotator.
Source code in src/zenml/cli/annotator.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 |
|
register_code_repository(name, type_, source_path, description, logo_url, args)
Register a code repository.
Register a code repository with ZenML. This will allow ZenML to pull code from a remote repository and use it when running pipelines remotely. The configuration of the code repository can be different depending on the type of code repository. For more information, please refer to the documentation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
Name of the code repository |
required |
type_
|
str
|
Type of the code repository |
required |
source_path
|
Optional[str]
|
Path to the source module if type is custom |
required |
description
|
Optional[str]
|
The code repository description. |
required |
logo_url
|
Optional[str]
|
URL of a logo (png, jpg or svg) for the code repository. |
required |
args
|
List[str]
|
Additional arguments to be passed to the code repository |
required |
Source code in src/zenml/cli/code_repository.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 |
|
register_feature_store_subcommands()
Registers CLI subcommands for the Feature Store.
Source code in src/zenml/cli/feature.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 |
|
register_model(name, license, description, audience, use_cases, tradeoffs, ethical, limitations, tag, save_models_to_registry)
Register a new model in the Model Control Plane.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
The name of the model. |
required |
license
|
Optional[str]
|
The license model created under. |
required |
description
|
Optional[str]
|
The description of the model. |
required |
audience
|
Optional[str]
|
The target audience of the model. |
required |
use_cases
|
Optional[str]
|
The use cases of the model. |
required |
tradeoffs
|
Optional[str]
|
The tradeoffs of the model. |
required |
ethical
|
Optional[str]
|
The ethical implications of the model. |
required |
limitations
|
Optional[str]
|
The know limitations of the model. |
required |
tag
|
Optional[List[str]]
|
Tags associated with the model. |
required |
save_models_to_registry
|
Optional[bool]
|
Whether to save the model to the registry. |
required |
Source code in src/zenml/cli/model.py
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 |
|
register_model_deployer_subcommands()
Registers CLI subcommands for the Model Deployer.
Source code in src/zenml/cli/served_model.py
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 |
|
register_model_registry_subcommands()
Registers CLI subcommands for the Model Registry.
Source code in src/zenml/cli/model_registry.py
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 |
|
register_pipeline(source, parameters_path=None)
Register a pipeline.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
source
|
str
|
Importable source resolving to a pipeline instance. |
required |
parameters_path
|
Optional[str]
|
Path to pipeline parameters file. |
None
|
Source code in src/zenml/cli/pipeline.py
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
|
register_secrets(skip_existing, stack_name_or_id=None)
Interactively registers all required secrets for a stack.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
skip_existing
|
bool
|
If |
required |
stack_name_or_id
|
Optional[str]
|
Name of the stack for which to register secrets. If empty, the active stack will be used. |
None
|
Source code in src/zenml/cli/stack.py
1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 |
|
register_service_connector(name, args, description=None, connector_type=None, resource_type=None, resource_id=None, auth_method=None, expires_at=None, expires_skew_tolerance=None, expiration_seconds=None, no_verify=False, labels=None, interactive=False, no_docs=False, show_secrets=False, auto_configure=False)
Registers a service connector.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
Optional[str]
|
The name to use for the service connector. |
required |
args
|
List[str]
|
Configuration arguments for the service connector. |
required |
description
|
Optional[str]
|
Short description for the service connector. |
None
|
connector_type
|
Optional[str]
|
The service connector type. |
None
|
resource_type
|
Optional[str]
|
The type of resource to connect to. |
None
|
resource_id
|
Optional[str]
|
The ID of the resource to connect to. |
None
|
auth_method
|
Optional[str]
|
The authentication method to use. |
None
|
expires_at
|
Optional[datetime]
|
The exact UTC date and time when the credentials configured for this connector will expire. |
None
|
expires_skew_tolerance
|
Optional[int]
|
The tolerance, in seconds, allowed when determining when the credentials configured for or generated by this connector will expire. |
None
|
expiration_seconds
|
Optional[int]
|
The duration, in seconds, that the temporary credentials generated by this connector should remain valid. |
None
|
no_verify
|
bool
|
Do not verify the service connector before registering. |
False
|
labels
|
Optional[List[str]]
|
Labels to be associated with the service connector. |
None
|
interactive
|
bool
|
Register a new service connector interactively. |
False
|
no_docs
|
bool
|
Don't show documentation details during the interactive configuration. |
False
|
show_secrets
|
bool
|
Show security sensitive configuration attributes in the terminal. |
False
|
auto_configure
|
bool
|
Auto configure the service connector. |
False
|
Raises:
Type | Description |
---|---|
TypeError
|
If the connector_model does not have the correct type. |
Source code in src/zenml/cli/service_connectors.py
334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 |
|
register_single_stack_component_cli_commands(component_type, parent_group)
Registers all basic stack component CLI commands.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
component_type
|
StackComponentType
|
Type of the component to generate the command for. |
required |
parent_group
|
Group
|
The parent group to register the commands to. |
required |
Source code in src/zenml/cli/stack_components.py
1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 |
|
register_stack(stack_name, artifact_store=None, orchestrator=None, container_registry=None, model_registry=None, step_operator=None, feature_store=None, model_deployer=None, experiment_tracker=None, alerter=None, annotator=None, data_validator=None, image_builder=None, set_stack=False, provider=None, connector=None)
Register a stack.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
stack_name
|
str
|
Unique name of the stack |
required |
artifact_store
|
Optional[str]
|
Name of the artifact store for this stack. |
None
|
orchestrator
|
Optional[str]
|
Name of the orchestrator for this stack. |
None
|
container_registry
|
Optional[str]
|
Name of the container registry for this stack. |
None
|
model_registry
|
Optional[str]
|
Name of the model registry for this stack. |
None
|
step_operator
|
Optional[str]
|
Name of the step operator for this stack. |
None
|
feature_store
|
Optional[str]
|
Name of the feature store for this stack. |
None
|
model_deployer
|
Optional[str]
|
Name of the model deployer for this stack. |
None
|
experiment_tracker
|
Optional[str]
|
Name of the experiment tracker for this stack. |
None
|
alerter
|
Optional[str]
|
Name of the alerter for this stack. |
None
|
annotator
|
Optional[str]
|
Name of the annotator for this stack. |
None
|
data_validator
|
Optional[str]
|
Name of the data validator for this stack. |
None
|
image_builder
|
Optional[str]
|
Name of the new image builder for this stack. |
None
|
set_stack
|
bool
|
Immediately set this stack as active. |
False
|
provider
|
Optional[str]
|
Name of the cloud provider for this stack. |
None
|
connector
|
Optional[str]
|
Name of the service connector for this stack. |
None
|
Source code in src/zenml/cli/stack.py
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 |
|
register_tag(name, color)
Register a new model in the Model Control Plane.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
The name of the tag. |
required |
color
|
Optional[ColorVariants]
|
The color variant for UI. |
required |
Source code in src/zenml/cli/tag.py
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
|
remove_none_values(dict_, recursive=False)
Removes all key-value pairs with None
value.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dict_
|
Dict[str, Any]
|
The dict from which the key-value pairs should be removed. |
required |
recursive
|
bool
|
If |
False
|
Returns:
Type | Description |
---|---|
Dict[str, Any]
|
The updated dictionary. |
Source code in src/zenml/utils/dict_utils.py
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
|
remove_stack_component(stack_name_or_id=None, container_registry_flag=False, step_operator_flag=False, feature_store_flag=False, model_deployer_flag=False, experiment_tracker_flag=False, alerter_flag=False, annotator_flag=False, data_validator_flag=False, image_builder_flag=False, model_registry_flag=None)
Remove stack components from a stack.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
stack_name_or_id
|
Optional[str]
|
Name of the stack to remove components from. |
None
|
container_registry_flag
|
Optional[bool]
|
To remove the container registry from this stack. |
False
|
step_operator_flag
|
Optional[bool]
|
To remove the step operator from this stack. |
False
|
feature_store_flag
|
Optional[bool]
|
To remove the feature store from this stack. |
False
|
model_deployer_flag
|
Optional[bool]
|
To remove the model deployer from this stack. |
False
|
experiment_tracker_flag
|
Optional[bool]
|
To remove the experiment tracker from this stack. |
False
|
alerter_flag
|
Optional[bool]
|
To remove the alerter from this stack. |
False
|
annotator_flag
|
Optional[bool]
|
To remove the annotator from this stack. |
False
|
data_validator_flag
|
Optional[bool]
|
To remove the data validator from this stack. |
False
|
image_builder_flag
|
Optional[bool]
|
To remove the image builder from this stack. |
False
|
model_registry_flag
|
Optional[str]
|
To remove the model registry from this stack. |
None
|
Source code in src/zenml/cli/stack.py
745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 |
|
rename_secret(name_or_id, new_name)
Update a secret for a given name or id.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_or_id
|
str
|
The name or id of the secret to update. |
required |
new_name
|
str
|
The new name of the secret. |
required |
Source code in src/zenml/cli/secret.py
398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 |
|
rename_stack(stack_name_or_id, new_stack_name)
Rename a stack.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
stack_name_or_id
|
str
|
Name of the stack to rename. |
required |
new_stack_name
|
str
|
New name of the stack. |
required |
Source code in src/zenml/cli/stack.py
908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 |
|
restore_database(strategy=None, location=None, cleanup=False)
Restore the ZenML database.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
strategy
|
Optional[str]
|
Custom backup strategy to use. Defaults to whatever is configured in the store config. |
None
|
location
|
Optional[str]
|
Custom location where the backup is stored. Defaults to whatever is configured in the store config. Depending on the strategy, this can be a local path or a database name. |
None
|
cleanup
|
bool
|
Whether to cleanup the backup after restoring. |
False
|
Source code in src/zenml/cli/base.py
763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 |
|
restore_secrets(ignore_errors=False, delete_secrets=False)
Backup all secrets to the backup secrets store.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ignore_errors
|
bool
|
Whether to ignore individual errors when backing up secrets and continue with the backup operation until all secrets have been backed up. |
False
|
delete_secrets
|
bool
|
Whether to delete the secrets that have been successfully restored from the backup secrets store. Setting this flag effectively moves all secrets from the backup secrets store to the primary secrets store. |
False
|
Source code in src/zenml/cli/secret.py
583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 |
|
rotate_api_key(service_account_name_or_id, name_or_id, retain=0, set_key=False, output_file=None)
Rotate an API key.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
service_account_name_or_id
|
str
|
The name or ID of the service account to which the API key belongs. |
required |
name_or_id
|
str
|
The name or ID of the API key to rotate. |
required |
retain
|
int
|
Number of minutes for which the previous key is still valid after it has been rotated. |
0
|
set_key
|
bool
|
Configure the local client with the newly generated key. |
False
|
output_file
|
Optional[str]
|
Output file to write the API key to. |
None
|
Source code in src/zenml/cli/service_accounts.py
464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 |
|
run_pipeline(source, config_path=None, stack_name_or_id=None, build_path_or_id=None, prevent_build_reuse=False)
Run a pipeline.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
source
|
str
|
Importable source resolving to a pipeline instance. |
required |
config_path
|
Optional[str]
|
Path to pipeline configuration file. |
None
|
stack_name_or_id
|
Optional[str]
|
Name or ID of the stack on which the pipeline should run. |
None
|
build_path_or_id
|
Optional[str]
|
ID of file path of the build to use for the pipeline run. |
None
|
prevent_build_reuse
|
bool
|
If True, prevents automatic reusing of previous builds. |
False
|
Source code in src/zenml/cli/pipeline.py
213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 |
|
runs()
Commands for pipeline runs.
Source code in src/zenml/cli/pipeline.py
486 487 488 |
|
schedule()
Commands for pipeline run schedules.
Source code in src/zenml/cli/pipeline.py
427 428 429 |
|
seconds_to_human_readable(time_seconds)
Converts seconds to human-readable format.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
time_seconds
|
int
|
Seconds to convert. |
required |
Returns:
Type | Description |
---|---|
str
|
Human readable string. |
Source code in src/zenml/utils/time_utils.py
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 |
|
secret()
Create, list, update, or delete secrets.
Source code in src/zenml/cli/secret.py
50 51 52 |
|
server()
Commands for managing ZenML servers.
Source code in src/zenml/cli/server.py
505 506 507 |
|
server_list(verbose=False, all=False, pro_api_url=None)
List all ZenML servers that this client is authorized to access.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
verbose
|
bool
|
Whether to show verbose output. |
False
|
all
|
bool
|
Whether to show all ZenML servers. |
False
|
pro_api_url
|
Optional[str]
|
Custom URL for the ZenML Pro API. |
None
|
Source code in src/zenml/cli/server.py
510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 |
|
service_account()
Commands for service account management.
Source code in src/zenml/cli/service_accounts.py
94 95 96 |
|
service_connector()
Configure and manage service connectors.
Source code in src/zenml/cli/service_connectors.py
43 44 45 46 47 48 |
|
set_active_stack_command(stack_name_or_id)
Sets a stack as active.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
stack_name_or_id
|
str
|
Name of the stack to set as active. |
required |
Source code in src/zenml/cli/stack.py
1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 |
|
set_logging_verbosity(verbosity)
Set logging level.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
verbosity
|
str
|
The logging level. |
required |
Raises:
Type | Description |
---|---|
KeyError
|
If the logging level is not supported. |
Source code in src/zenml/cli/config.py
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
|
show(local=False, ngrok_token=None)
Show the ZenML dashboard.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
local
|
bool
|
Whether to show the ZenML dashboard for the local server. |
False
|
ngrok_token
|
Optional[str]
|
An ngrok auth token to use for exposing the ZenML dashboard on a public domain. Primarily used for accessing the local dashboard in Colab. |
None
|
Source code in src/zenml/cli/server.py
745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 |
|
show_dashboard(local=False, ngrok_token=None)
Show the ZenML dashboard.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
local
|
bool
|
Whether to show the dashboard for the local server or the one for the active server. |
False
|
ngrok_token
|
Optional[str]
|
An ngrok auth token to use for exposing the ZenML dashboard on a public domain. Primarily used for accessing the dashboard in Colab. |
None
|
Raises:
Type | Description |
---|---|
RuntimeError
|
If no server is connected. |
Source code in src/zenml/zen_server/utils.py
299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 |
|
stack()
Stacks to define various environments.
Source code in src/zenml/cli/stack.py
89 90 91 92 93 94 |
|
start_local_server(docker=False, ip_address=None, port=None, blocking=False, image=None, ngrok_token=None, restart=False)
Start the ZenML dashboard locally and connect the client to it.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
docker
|
bool
|
Use a docker deployment instead of the local process. |
False
|
ip_address
|
Union[IPv4Address, IPv6Address, None]
|
The IP address to bind the server to. |
None
|
port
|
Optional[int]
|
The port to bind the server to. |
None
|
blocking
|
bool
|
Block the CLI while the server is running. |
False
|
image
|
Optional[str]
|
A custom Docker image to use for the server, when the
|
None
|
ngrok_token
|
Optional[str]
|
An ngrok auth token to use for exposing the ZenML dashboard on a public domain. Primarily used for accessing the dashboard in Colab. |
None
|
restart
|
bool
|
Restart the local ZenML server if it is already running. |
False
|
Source code in src/zenml/cli/login.py
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 |
|
status()
Show details about the current configuration.
Source code in src/zenml/cli/server.py
183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 |
|
tag()
Interact with tags.
Source code in src/zenml/cli/tag.py
37 38 39 |
|
title(text)
Echo a title formatted string on the CLI.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
text
|
str
|
Input text string. |
required |
Source code in src/zenml/cli/utils.py
115 116 117 118 119 120 121 |
|
track_decorator(event)
Decorator to track event.
If the decorated function takes in a AnalyticsTrackedModelMixin
object as
an argument or returns one, it will be called to track the event. The return
value takes precedence over the argument when determining which object is
called to track the event.
If the decorated function is a method of a class that inherits from
AnalyticsTrackerMixin
, the parent object will be used to intermediate
tracking analytics.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
event
|
AnalyticsEvent
|
Event string to stamp with. |
required |
Returns:
Type | Description |
---|---|
Callable[[F], F]
|
A decorator that applies the analytics tracking to a function. |
Source code in src/zenml/analytics/utils.py
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 |
|
uninstall(integrations, force=False, uv=False)
Uninstalls the required packages for a given integration.
If no integration is specified all required packages for all integrations are uninstalled using pip or uv.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
integrations
|
Tuple[str]
|
The name of the integration to uninstall the requirements for. |
required |
force
|
bool
|
Force the uninstallation of the required packages. |
False
|
uv
|
bool
|
Use uv for package uninstallation (experimental). |
False
|
Source code in src/zenml/cli/integration.py
334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 |
|
uninstall_package(package, use_uv=False)
Uninstalls pypi package from the current environment with pip or uv.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
package
|
str
|
The package to uninstall. |
required |
use_uv
|
bool
|
Whether to use uv for package uninstallation. |
False
|
Source code in src/zenml/cli/utils.py
1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 |
|
unlock_authorized_device(id)
Unlock an authorized device.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id
|
str
|
The ID of the authorized device to unlock. |
required |
Source code in src/zenml/cli/authorized_device.py
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
|
up(docker=False, ip_address=None, port=None, blocking=False, image=None, ngrok_token=None)
Start the ZenML dashboard locally and connect the client to it.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
docker
|
bool
|
Use a docker deployment instead of the local process. |
False
|
ip_address
|
Union[IPv4Address, IPv6Address, None]
|
The IP address to bind the server to. |
None
|
port
|
Optional[int]
|
The port to bind the server to. |
None
|
blocking
|
bool
|
Block the CLI while the server is running. |
False
|
image
|
Optional[str]
|
A custom Docker image to use for the server, when the
|
None
|
ngrok_token
|
Optional[str]
|
An ngrok auth token to use for exposing the ZenML dashboard on a public domain. Primarily used for accessing the dashboard in Colab. |
None
|
Source code in src/zenml/cli/server.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
|
update_api_key(service_account_name_or_id, name_or_id, name=None, description=None, active=None)
Update an API key.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
service_account_name_or_id
|
str
|
The name or ID of the service account to which the API key belongs. |
required |
name_or_id
|
str
|
The name or ID of the API key to update. |
required |
name
|
Optional[str]
|
The new name of the API key. |
None
|
description
|
Optional[str]
|
The new description of the API key. |
None
|
active
|
Optional[bool]
|
Set an API key to active/inactive. |
None
|
Source code in src/zenml/cli/service_accounts.py
420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 |
|
update_artifact(artifact_name_or_id, name=None, tag=None, remove_tag=None)
Update an artifact by ID or name.
Usage example:
zenml artifact update <NAME> -n <NEW_NAME> -t <TAG1> -t <TAG2> -r <TAG_TO_REMOVE>
Parameters:
Name | Type | Description | Default |
---|---|---|---|
artifact_name_or_id
|
str
|
Name or ID of the artifact to update. |
required |
name
|
Optional[str]
|
New name of the artifact. |
None
|
tag
|
Optional[List[str]]
|
New tags of the artifact. |
None
|
remove_tag
|
Optional[List[str]]
|
Tags to remove from the artifact. |
None
|
Source code in src/zenml/cli/artifact.py
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
|
update_artifact_version(name_id_or_prefix, version=None, tag=None, remove_tag=None)
Update an artifact version by ID or artifact name.
Usage example:
zenml artifact version update <NAME> -v <VERSION> -t <TAG1> -t <TAG2> -r <TAG_TO_REMOVE>
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
str
|
Either the ID of the artifact version or the name of the artifact. |
required |
version
|
Optional[str]
|
The version of the artifact to get. Only used if
|
None
|
tag
|
Optional[List[str]]
|
Tags to add to the artifact version. |
None
|
remove_tag
|
Optional[List[str]]
|
Tags to remove from the artifact version. |
None
|
Source code in src/zenml/cli/artifact.py
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 |
|
update_code_repository(name_or_id, name, description, logo_url, args)
Update a code repository.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_or_id
|
str
|
Name or ID of the code repository to update. |
required |
name
|
Optional[str]
|
New name of the code repository. |
required |
description
|
Optional[str]
|
New description of the code repository. |
required |
logo_url
|
Optional[str]
|
New logo URL of the code repository. |
required |
args
|
List[str]
|
Code repository configurations. |
required |
Source code in src/zenml/cli/code_repository.py
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 |
|
update_model(model_name_or_id, name, license, description, audience, use_cases, tradeoffs, ethical, limitations, tag, remove_tag, save_models_to_registry)
Register a new model in the Model Control Plane.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model_name_or_id
|
str
|
The name of the model. |
required |
name
|
Optional[str]
|
The name of the model. |
required |
license
|
Optional[str]
|
The license model created under. |
required |
description
|
Optional[str]
|
The description of the model. |
required |
audience
|
Optional[str]
|
The target audience of the model. |
required |
use_cases
|
Optional[str]
|
The use cases of the model. |
required |
tradeoffs
|
Optional[str]
|
The tradeoffs of the model. |
required |
ethical
|
Optional[str]
|
The ethical implications of the model. |
required |
limitations
|
Optional[str]
|
The know limitations of the model. |
required |
tag
|
Optional[List[str]]
|
Tags to be added to the model. |
required |
remove_tag
|
Optional[List[str]]
|
Tags to be removed from the model. |
required |
save_models_to_registry
|
Optional[bool]
|
Whether to save the model to the registry. |
required |
Source code in src/zenml/cli/model.py
228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 |
|
update_model_version(model_name_or_id, model_version_name_or_number_or_id, stage, name, description, tag, remove_tag, force=False)
Update an existing model version stage in the Model Control Plane.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model_name_or_id
|
str
|
The ID or name of the model containing version. |
required |
model_version_name_or_number_or_id
|
str
|
The ID, number or name of the model version. |
required |
stage
|
Optional[str]
|
The stage of the model version to be set. |
required |
name
|
Optional[str]
|
The name of the model version. |
required |
description
|
Optional[str]
|
The description of the model version. |
required |
tag
|
Optional[List[str]]
|
Tags to be added to the model version. |
required |
remove_tag
|
Optional[List[str]]
|
Tags to be removed from the model version. |
required |
force
|
bool
|
Whether existing model version in target stage should be silently archived. |
False
|
Source code in src/zenml/cli/model.py
433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 |
|
update_secret(name_or_id, extra_args, new_scope=None, remove_keys=[], interactive=False, values='')
Update a secret for a given name or id.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_or_id
|
str
|
The name or id of the secret to update. |
required |
new_scope
|
Optional[str]
|
The new scope of the secret. |
None
|
extra_args
|
List[str]
|
The arguments to pass to the secret. |
required |
interactive
|
bool
|
Whether to use interactive mode to update the secret. |
False
|
remove_keys
|
List[str]
|
The keys to remove from the secret. |
[]
|
values
|
str
|
Secret key-value pairs to be passed as JSON or YAML. |
''
|
Source code in src/zenml/cli/secret.py
260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 |
|
update_service_account(service_account_name_or_id, updated_name=None, description=None, active=None)
Update an existing service account.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
service_account_name_or_id
|
str
|
The name or ID of the service account to update. |
required |
updated_name
|
Optional[str]
|
The new name of the service account. |
None
|
description
|
Optional[str]
|
The new API key description. |
None
|
active
|
Optional[bool]
|
Activate or deactivate a service account. |
None
|
Source code in src/zenml/cli/service_accounts.py
215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 |
|
update_service_connector(args, name_id_or_prefix=None, name=None, description=None, connector_type=None, resource_type=None, resource_id=None, auth_method=None, expires_at=None, expires_skew_tolerance=None, expiration_seconds=None, no_verify=False, labels=None, interactive=False, show_secrets=False, remove_attrs=None)
Updates a service connector.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
args
|
List[str]
|
Configuration arguments for the service connector. |
required |
name_id_or_prefix
|
Optional[str]
|
The name or ID of the service connector to update. |
None
|
name
|
Optional[str]
|
New connector name. |
None
|
description
|
Optional[str]
|
Short description for the service connector. |
None
|
connector_type
|
Optional[str]
|
The service connector type. |
None
|
resource_type
|
Optional[str]
|
The type of resource to connect to. |
None
|
resource_id
|
Optional[str]
|
The ID of the resource to connect to. |
None
|
auth_method
|
Optional[str]
|
The authentication method to use. |
None
|
expires_at
|
Optional[datetime]
|
The time at which the credentials configured for this connector will expire. |
None
|
expires_skew_tolerance
|
Optional[int]
|
The tolerance, in seconds, allowed when determining when the credentials configured for or generated by this connector will expire. |
None
|
expiration_seconds
|
Optional[int]
|
The duration, in seconds, that the temporary credentials generated by this connector should remain valid. |
None
|
no_verify
|
bool
|
Do not verify the service connector before updating. |
False
|
labels
|
Optional[List[str]]
|
Labels to be associated with the service connector. |
None
|
interactive
|
bool
|
Register a new service connector interactively. |
False
|
show_secrets
|
bool
|
Show security sensitive configuration attributes in the terminal. |
False
|
remove_attrs
|
Optional[List[str]]
|
Configuration attributes to be removed from the configuration. |
None
|
Source code in src/zenml/cli/service_connectors.py
1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 |
|
update_stack(stack_name_or_id=None, artifact_store=None, orchestrator=None, container_registry=None, step_operator=None, feature_store=None, model_deployer=None, experiment_tracker=None, alerter=None, annotator=None, data_validator=None, image_builder=None, model_registry=None)
Update a stack.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
stack_name_or_id
|
Optional[str]
|
Name or id of the stack to update. |
None
|
artifact_store
|
Optional[str]
|
Name of the new artifact store for this stack. |
None
|
orchestrator
|
Optional[str]
|
Name of the new orchestrator for this stack. |
None
|
container_registry
|
Optional[str]
|
Name of the new container registry for this stack. |
None
|
step_operator
|
Optional[str]
|
Name of the new step operator for this stack. |
None
|
feature_store
|
Optional[str]
|
Name of the new feature store for this stack. |
None
|
model_deployer
|
Optional[str]
|
Name of the new model deployer for this stack. |
None
|
experiment_tracker
|
Optional[str]
|
Name of the new experiment tracker for this stack. |
None
|
alerter
|
Optional[str]
|
Name of the new alerter for this stack. |
None
|
annotator
|
Optional[str]
|
Name of the new annotator for this stack. |
None
|
data_validator
|
Optional[str]
|
Name of the new data validator for this stack. |
None
|
image_builder
|
Optional[str]
|
Name of the new image builder for this stack. |
None
|
model_registry
|
Optional[str]
|
Name of the new model registry for this stack. |
None
|
Source code in src/zenml/cli/stack.py
562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 |
|
update_tag(tag_name_or_id, name, color)
Register a new model in the Model Control Plane.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
tag_name_or_id
|
Union[str, UUID]
|
The name or ID of the tag. |
required |
name
|
Optional[str]
|
The name of the tag. |
required |
color
|
Optional[str]
|
The color variant for UI. |
required |
Source code in src/zenml/cli/tag.py
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
|
update_user(user_name_or_id, updated_name=None, updated_full_name=None, updated_email=None, make_admin=None, make_user=None, active=None)
Update an existing user.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
user_name_or_id
|
str
|
The name of the user to create. |
required |
updated_name
|
Optional[str]
|
The name of the user to create. |
None
|
updated_full_name
|
Optional[str]
|
The name of the user to create. |
None
|
updated_email
|
Optional[str]
|
The name of the user to create. |
None
|
make_admin
|
Optional[bool]
|
Whether the user should be an admin. |
None
|
make_user
|
Optional[bool]
|
Whether the user should be a regular user. |
None
|
active
|
Optional[bool]
|
Use to activate or deactivate a user account. |
None
|
Source code in src/zenml/cli/user_management.py
191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 |
|
upgrade(integrations, force=False, uv=False)
Upgrade the required packages for a given integration.
If no integration is specified all required packages for all integrations are installed using pip or uv.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
integrations
|
Tuple[str]
|
The name of the integration to install the requirements for. |
required |
force
|
bool
|
Force the installation of the required packages. |
False
|
uv
|
bool
|
Use uv for package installation (experimental). |
False
|
Source code in src/zenml/cli/integration.py
415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 |
|
user()
Commands for user management.
Source code in src/zenml/cli/user_management.py
35 36 37 |
|
utc_now(tz_aware=False)
Get the current time in the UTC timezone.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
tz_aware
|
Union[bool, datetime]
|
Use this flag to control whether the returned datetime is timezone-aware or timezone-naive. If a datetime is provided, the returned datetime will be timezone-aware if and only if the input datetime is also timezone-aware. |
False
|
Returns:
Type | Description |
---|---|
datetime
|
The current UTC time. If tz_aware is a datetime, the returned datetime |
datetime
|
will be timezone-aware only if the input datetime is also timezone-aware. |
datetime
|
If tz_aware is a boolean, the returned datetime will be timezone-aware |
datetime
|
if True, and timezone-naive if False. |
Source code in src/zenml/utils/time_utils.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
|
utc_now_tz_aware()
Get the current timezone-aware UTC time.
Returns:
Type | Description |
---|---|
datetime
|
The current UTC time. |
Source code in src/zenml/utils/time_utils.py
47 48 49 50 51 52 53 |
|
validate_keys(key)
Validates key if it is a valid python string.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
key
|
str
|
key to validate |
required |
Source code in src/zenml/cli/utils.py
877 878 879 880 881 882 883 884 |
|
validate_name(ctx, param, value)
Validate the name of the stack.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ctx
|
Context
|
The click context. |
required |
param
|
str
|
The parameter name. |
required |
value
|
str
|
The value of the parameter. |
required |
Returns:
Type | Description |
---|---|
str
|
The validated value. |
Raises:
Type | Description |
---|---|
BadParameter
|
If the name is invalid. |
Source code in src/zenml/cli/stack.py
1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 |
|
verify_service_connector(name_id_or_prefix, resource_type=None, resource_id=None, verify_only=False)
Verifies if a service connector has access to one or more resources.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_id_or_prefix
|
str
|
The name or id of the service connector to verify. |
required |
resource_type
|
Optional[str]
|
The type of resource for which to verify access. |
None
|
resource_id
|
Optional[str]
|
The ID of the resource for which to verify access. |
None
|
verify_only
|
bool
|
Only verify the service connector, do not list resources. |
False
|
Source code in src/zenml/cli/service_connectors.py
1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 |
|
version()
Interact with model versions in the Model Control Plane.
Source code in src/zenml/cli/model.py
396 397 398 |
|
warn_unsupported_non_default_workspace()
Warning for unsupported non-default workspace.
Source code in src/zenml/cli/utils.py
2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 |
|
warning(text, bold=None, italic=None, **kwargs)
Echo a warning string on the CLI.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
text
|
str
|
Input text string. |
required |
bold
|
Optional[bool]
|
Optional boolean to bold the text. |
None
|
italic
|
Optional[bool]
|
Optional boolean to italicize the text. |
None
|
**kwargs
|
Any
|
Optional kwargs to be passed to console.print(). |
{}
|
Source code in src/zenml/cli/utils.py
169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 |
|
web_login(url=None, verify_ssl=None, pro_api_url=None)
Implements the OAuth2 Device Authorization Grant flow.
This function implements the client side of the OAuth2 Device Authorization Grant flow as defined in https://tools.ietf.org/html/rfc8628, with the following customizations:
- the unique ZenML client ID (
user_id
in the global config) is used as the OAuth2 client ID value - additional information is added to the user agent header to be used by users to identify the ZenML client
Upon completion of the flow, the access token is saved in the credentials store.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
url
|
Optional[str]
|
The URL of the OAuth2 server. If not provided, the ZenML Pro API server is used by default. |
None
|
verify_ssl
|
Optional[Union[str, bool]]
|
Whether to verify the SSL certificate of the OAuth2 server. If a string is passed, it is interpreted as the path to a CA bundle file. |
None
|
pro_api_url
|
Optional[str]
|
The URL of the ZenML Pro API server. If not provided, the default ZenML Pro API server URL is used. |
None
|
Returns:
Type | Description |
---|---|
APIToken
|
The response returned by the OAuth2 server. |
Raises:
Type | Description |
---|---|
AuthorizationException
|
If an error occurred during the authorization process. |
Source code in src/zenml/login/web_login.py
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 |
|
workspace()
Commands for workspace management.
Source code in src/zenml/cli/workspace.py
33 34 35 |
|
write_yaml(file_path, contents, sort_keys=True)
Write contents as YAML format to file_path.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
file_path
|
str
|
Path to YAML file. |
required |
contents
|
Union[Dict[Any, Any], List[Any]]
|
Contents of YAML file as dict or list. |
required |
sort_keys
|
bool
|
If |
True
|
Raises:
Type | Description |
---|---|
FileNotFoundError
|
if directory does not exist. |
Source code in src/zenml/utils/yaml_utils.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
|