Module core.pipelines.training_pipeline

Training pipeline step to create a pipeline that trains on data.

Classes

TrainingPipeline(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) : Definition of the Training Pipeline class.

TrainingPipeline is a general-purpose training pipeline for most ML
training runs. One pipeline runs one experiment on a single datasource.

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.

### Ancestors (in MRO)

* zenml.core.pipelines.base_pipeline.BasePipeline

### Class variables

`PIPELINE_TYPE`
:

### Methods

`add_deployment(self, deployment_step: zenml.core.steps.deployer.gcaip_deployer.GCAIPDeployer)`
:

`add_evaluator(self, evaluator_step: zenml.core.steps.evaluator.tfma_evaluator.TFMAEvaluator)`
:

`add_preprocesser(self, preprocessor_step: zenml.core.steps.preprocesser.base_preprocesser.BasePreprocesserStep)`
:

`add_sequencer(self, sequencer_step: zenml.core.steps.sequencer.base_sequencer.BaseSequencerStep)`
:

`add_split(self, split_step: zenml.core.steps.split.base_split_step.BaseSplit)`
:

`add_trainer(self, trainer_step: zenml.core.steps.trainer.base_trainer.BaseTrainerStep)`
:

`download_model(self, out_path: str = None, overwrite: bool = False)`
:   Download model to out_path

`evaluate(self, magic: bool = False)`
:   Evaluate pipeline from the evaluator steps artifacts.
    
    Args:
        magic: Creates new window if False, else creates notebook cells.

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

`get_hyperparameters(self) ‑> Dict`
:   Gets all hyperparameters of pipeline

`get_tfx_component_list(self, config: Dict[str, Any]) ‑> List`
:   Builds the training pipeline as a series of TFX components.
    
    Args:
        config: A ZenML configuration in dictionary format.
    
    Returns:
        A chronological list of TFX components making up the training
         pipeline.

`sample_transformed_data(self, split_name: str = 'eval', sample_size: int = 100000)`
:   Samples transformed data as a pandas DataFrame.
    
    Args:
        split_name: name of split to see
        sample_size: # of rows to sample.

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

`view_anomalies(self, split_name='eval')`
:   View schema of data flowing in pipeline.
    
    Args:
        split_name: name of split to detect anomalies on

`view_schema(self)`
:   View schema of data flowing in pipeline.

`view_statistics(self, magic: bool = False)`
:   View statistics for training pipeline in HTML.
    
    Args:
        magic (bool): Creates HTML page if False, else
        creates a notebook cell.