Generic (no server)

pydantic model mlopus.mlflow.providers.generic.GenericMlflowApi[source]

Bases: BaseMlflowApi

MLflow API provider without any implementation of client-server exchange, meant for offline mode only.

Plugin name: generic

Requires extras: None

Default cache dir: None (no fall back, must be provided)

Example 1: Using cached metadata and artifacts

# At build time
api = mlopus.mlflow.get_api(plugin="mlflow", ...)
api.get_model(...).get_version(...).export("build/mlflow-cache")  # Export metadata and artifacts

# At runtime (no internet access required)
api = mlopus.mlflow.get_api(plugin="generic", conf={"cache_dir": "build/mlflow-cache"})
api.get_model(...).get_version(...).load(...)

Example 2: Using cached metadata and pulling artifacts at runtime

# At build time
api = mlopus.mlflow.get_api(plugin="mlflow", ...)
api.get_model(...).get_version(...).export_meta("build/mlflow-cache")  # Export metadata only

# At runtime (no access to MLFlow server required)
api = mlopus.mlflow.get_api(plugin="generic", conf={"cache_dir": "build/mlflow-cache", "pull_artifacts_in_offline_mode": True})
api.get_model(...).get_version(...).load(...)  # Triggers artifact pull
field cache_dir: Path [Required]
field offline_mode: bool = True