Skip to content

Commit

Permalink
Minor Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
JarcauCristian committed Apr 10, 2024
1 parent 8cd18dd commit 9545ea7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mlflow_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,11 @@ def model_parameters(self, name: str) -> Dict[str, Any] | None:
pass
return flatten_dict(parameters)

def model_versions(self, name: str) -> List[str] | None:
def model_versions(self, name: str) -> List[Dict[str, str]] | None:
versions = self.client.search_model_versions(f"name='{name}'")
return [version.version for version in versions]
return [{"version": version.version,
"type": "" if version.tags.get("model_type") is None else version.tags["model_type"]}
for version in versions]

def model_metrics(self, name: str) -> Dict[str, Any] | None:
run_id = self.client.get_registered_model(name).latest_versions[0].run_id
Expand Down

0 comments on commit 9545ea7

Please sign in to comment.