Model Version API
- pydantic model mlopus.mlflow.ModelVersionApi[source]
Bases:
ModelVersion
,EntityApi
Model version metadata with MLflow API handle.
- field model: ModelApi [Required]
Parent model.
- field path_in_run: str [Required]
Path inside run artifacts.
- field run: RunApi [Required]
Parent run.
- field tags: Dict[str, Any] [Required]
Nested tags dict with JSON-serializable leaf-values and keys in the pattern: [w-/]+
- field version: str [Required]
Model version in the pattern [w-.]+
- class Config
Bases:
object
Pydantic class config.
- cache_artifact()[source]
Pull artifact of this model version from MLflow server to local cache.
- Return type:
Path
- cache_meta()[source]
Fetch latest metadata for this model version and save it to cache.
- Return type:
- export_meta(target)[source]
Export model version metadata cache to target.
- Parameters:
- Return type:
- list_artifacts(path_suffix='')[source]
List artifacts in this model version.
- Parameters:
path_suffix¶ (
str
) – Plain relative path inside model artifact dir (e.g.: a/b/c).- Return type:
Union
[List
[ObjMeta
],ObjMeta
]
- place_artifact(target, overwrite=False, link=True)[source]
Place model version artifact on target path.
- set_tags(tags)[source]
Set tags on this model version.
- Parameters:
tags¶ (
Mapping
) – Seeschema.Model.tags
.- Return type:
- update()
Use API to get latest data for this entity and update this entity in place.
- Return type:
EntityApi
- property url: str
Get model version URL.