Module core.pipelines.base_pipeline

Base High-level ZenML Pipeline definition

Classes

BasePipeline(name: str, enable_cache: Union[bool, NoneType] = True, steps_dict: Dict[str, zenml.core.steps.base_step.BaseStep] = None, backends_dict: Dict[str, zenml.core.backends.base_backend.BaseBackend] = None, metadata_store: Union[zenml.core.metadata.metadata_wrapper.ZenMLMetadataStore, NoneType] = None, artifact_store: Union[zenml.core.repo.artifact_store.ArtifactStore, NoneType] = None, datasource: Union[zenml.core.datasources.base_datasource.BaseDatasource, NoneType] = None, pipeline_name: Union[str, NoneType] = None, *args, **kwargs) : Base class for all ZenML pipelines.

Every ZenML pipeline should override this class.

Construct a base pipeline. This is a base interface that is meant
to be overridden in multiple other pipeline use cases.

Args:
    name: Outward-facing name of the pipeline.
    pipeline_name: A unique name that identifies the pipeline after
     it is run.
    enable_cache: Boolean, indicates whether or not caching
     should be used.
    steps_dict: Optional dict of steps.
    backends_dict: Optional dict of backends
    metadata_store: Configured metadata store. If None,
     the default metadata store is used.
    artifact_store: Configured artifact store. If None,
     the default artifact store is used.

### Class variables

`PIPELINE_TYPE`
:

### Static methods

`from_config(config: Dict)`
:   Convert from pipeline config to ZenML Pipeline object.
    
    All steps are also populated and configuration set to parameters set
    in the config file.
    
    Args:
        config: a ZenML config in dict-form (probably loaded from YAML).

`get_name_from_pipeline_name(pipeline_name: str)`
:   Gets name from pipeline name.
    
    Args:
        pipeline_name (str): simple string name.

`get_type_from_file_name(file_name: str)`
:   Gets type of pipeline from file name.
    
    Args:
        file_name: YAML file name of pipeline.

`get_type_from_pipeline_name(pipeline_name: str)`
:   Gets type from pipeline name.
    
    Args:
        pipeline_name (str): simple string name.

### Instance variables

`is_executed_in_metadata_store`
:

### Methods

`add_datasource(self, datasource: zenml.core.datasources.base_datasource.BaseDatasource)`
:   Add datasource to pipeline.
    
    Args:
        datasource: class of type BaseDatasource

`copy(self, new_name: str)`
:   Deep copy the pipeline and therefore remove mutability requirement.
    
    Args:
        new_name (str): New name for copied pipeline.

`create_pipeline_name_from_name(self)`
:   Creates a unique pipeline name from user-provided name.

`get_artifacts_uri_by_component(*args, **kwargs)`
:

`get_default_backends(self) ‑> Dict`
:   Gets list of default backends for this pipeline.

`get_environment(self) ‑> Dict`
:   Get environment as a dict.

`get_status(self) ‑> str`
:   Get status of pipeline.

`get_steps_config(self) ‑> Dict`
:   Convert Step classes to steps config dict.

`get_tfx_component_list(self, config: Dict[str, Any]) ‑> List`
:   Converts config to TFX components list. This is the point in the
    framework where ZenML Steps get translated into TFX pipelines.
    
    Args:
        config: dict of ZenML config.

`load_config(self) ‑> Dict[str, Any]`
:   Loads a config dict from yaml file.

`register_pipeline(self, config: Dict[str, Any])`
:   Registers a pipeline in the artifact store as a YAML file.
    
    Args:
        config: dict representation of ZenML config.

`run(*args, **kwargs)`
:

`run_config(self, config: Dict[str, Any])`
:   Gets TFX pipeline from config.
    
    Args:
        config: dict of ZenML config.

`steps_completed(self) ‑> bool`
:   Returns True if all steps complete, else raises exception

`to_config(self) ‑> Dict`
:   Converts pipeline to ZenML config.