Skip to content

Commit

Permalink
fix(artschema.spec): fix entity api property in LoadArtifactSpec
Browse files Browse the repository at this point in the history
  • Loading branch information
lariel-fernandes committed Oct 23, 2024
1 parent e5012fe commit 75fa4e5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/mlopus/artschema/specs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 75fa4e5

Please sign in to comment.