From 9fa1b56126840775bccdc91f68dd3196b4162281 Mon Sep 17 00:00:00 2001 From: ScR4PP <95632351+JarcauCristian@users.noreply.github.com> Date: Thu, 18 Apr 2024 17:27:09 +0300 Subject: [PATCH] Changed Figures --- mlflow_client.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mlflow_client.py b/mlflow_client.py index a851422..de9c9a3 100644 --- a/mlflow_client.py +++ b/mlflow_client.py @@ -91,12 +91,14 @@ def model_dataset(self, name: str, version: str): def model_images(self, name: str, version: str): run_id = self.client.get_registered_model(name).latest_versions[0].run_id if version is None \ else self.client.get_model_version(name, version).run_id + if not run_id: return None try: - artifacts = self.client.list_artifacts(run_id, path="artifacts") + artifacts = self.client.list_artifacts(run_id, path="figures") images = {} for artifact in artifacts: + print(artifact.path) if ".png" in artifact.path: image = mlflow.artifacts.load_image(f"runs:/{run_id}/{artifact.path}") buffered = BytesIO()