MlflowArtifacts
- pydantic model mlopus.kedro.MlflowArtifacts[source]
Bases:
MlflowRunMixin,HookWithFactoryHook to set up inputs and collect outputs using MLflow artifacts.
Find here a fully commented example covering all settings that can be customized in this hook.
-
field collect_on_error:
bool= False Collect available outputs if pipeline fails.
-
field inputs:
Dict[str,PipelineInput] [Optional] Configure inputs.
-
field outputs:
Dict[str,PipelineOutput] [Optional] Configure outputs.
- class Config
Bases:
objectPydantic class config.
- field run_manager: MlflowRunManager | None [Required] (alias 'mlflow')
Instance or dict to be parsed into instance of
MlflowRunManager
-
field collect_on_error:
- pydantic model mlopus.kedro.hooks.mlflow_artifacts.PipelineInput[source]
Bases:
LoadArtifactSpec,EmptyStrAsMissingSpecification of an artifact to be fetched from MLFlow and placed before a pipeline runs.
See also
If
schema_is specified, it is used to verify the artifact after placing it.subjectandskip_reqs_checkare used ifschema_is an alias.
-
field path:
Path[Required] Local path to place the artifact file or dir.
-
field link:
bool= True Place artifact file or dir as a symbolic link to the artifacts cache. If
false, make a copy instead.
-
field enabled:
bool= True Enable this input.
-
field log_lineage:
bool= True Log lineage info in MLFlow run. See also
mlopus.lineage.Lineage.
-
field pipelines:
Optional[List[str]] = None If specified, enable input for these pipelines only.
- class Config
Bases:
objectPydantic class config.
- property entity_api: T
Entity metadata with MLFlow API handle.
- place(target, **kwargs)
Place artifact on target path.
New in version 1.3.
- field schema_: Schema[A, D, L] | Type[Schema[A, D, L]] | str | None [Optional] (alias 'schema')
See
schema
- field skip_reqs_check: bool = False
See
skip_reqs_check
- field subject: ArtifactSubject[T, LA] [Required]
Instance (or dict to be parsed into instance) of
RunArtifactorModelVersionArtifact. See also:subject.
- field export_opts: ExportOptions [Optional]
Options for exporting artifact cache.
New in version 1.4.
- field mlflow_api: BaseMlflowApi = None
Instance of
BaseMlflowApior a dict of keyword arguments formlopus.mlflow.get_api().
- pydantic model mlopus.kedro.hooks.mlflow_artifacts.PipelineOutput[source]
Bases:
LogArtifactSpec,EmptyStrAsMissingSpecification of an artifact to be collected and published to MLFlow after a pipeline runs.
See also
If
schema_is specified, it is used to verify the artifact before collecting it.subjectandskip_reqs_checkare used ifschema_is an alias.
-
field path:
Path[Required] Path to collect the artifact file or dir from.
-
field enabled:
bool= True Enable this output.
-
field log_lineage:
bool= True Log lineage info in MLFlow run. See also
mlopus.lineage.Lineage.
-
field pipelines:
Optional[List[str]] = None If specified, enable output for these pipelines only.
-
field skip_if_missing:
bool= False Skip output if missing.
- class Config
Bases:
objectPydantic class config.
- field schema_: Schema[A, D, L] | Type[Schema[A, D, L]] | str | None [Optional] (alias 'schema')
See
schema
- field skip_reqs_check: bool = False
See
skip_reqs_check
- field auto_register: bool | Dict[str, Any] = False
See
mlopus.artschema.log_run_artifact.auto_registerandmlopus.artschema.log_model_version.auto_register
- field keep_the_source: bool | None = None
See
keep_the_source
- field allow_duplication: bool | None = None
- field subject: ArtifactSubject[T, LA] [Required]
Instance (or dict to be parsed into instance) of
RunArtifactorModelVersionArtifact. See also:subject.
- field mlflow_api: BaseMlflowApi = None
Instance of
BaseMlflowApior a dict of keyword arguments formlopus.mlflow.get_api().