diff --git a/src/mlopus/artschema/specs.py b/src/mlopus/artschema/specs.py index bd2c37e..aa8a1d3 100644 --- a/src/mlopus/artschema/specs.py +++ b/src/mlopus/artschema/specs.py @@ -199,6 +199,11 @@ class LoadArtifactSpec(MlflowApiMixin, Generic[T, LA]): _parse_subject = pydantic.validator("subject", pre=True, allow_reuse=True)(_parse_subject) + @property + def entity_api(self) -> T: + """Entity metadata with MLFlow API handle.""" + return self.subject.using(self.mlflow_api).entity_api + def download(self) -> Path: """Cache subject metadata and artifact. @@ -314,11 +319,6 @@ class LogArtifactSpec(MlflowApiMixin, Generic[T, LA]): _parse_subject = pydantic.validator("subject", pre=True, allow_reuse=True)(_parse_subject) - @property - def entity_api(self) -> T: - """Entity metadata with MLFlow API handle.""" - return self.subject.using(self.mlflow_api).entity_api - def log(self, artifact: A | dict | Path, schema: Schema[A, D, L] | Type[Schema[A, D, L]] | str | None = None) -> T: """Log artifact. diff --git a/uv.lock b/uv.lock index 53db29a..fe2cd8f 100644 --- a/uv.lock +++ b/uv.lock @@ -1408,7 +1408,7 @@ wheels = [ [[package]] name = "mlopus" -version = "1.0.3" +version = "1.0.4" source = { editable = "." } dependencies = [ { name = "dacite" },