From 03f0c791724777b2be5cf7ff3b1a3adca9708c75 Mon Sep 17 00:00:00 2001 From: fpetrini15 Date: Mon, 11 Dec 2023 13:58:07 -0800 Subject: [PATCH 1/2] Mlflow plugin fix --- deploy/mlflow-triton-plugin/mlflow_triton/deployments.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/mlflow-triton-plugin/mlflow_triton/deployments.py b/deploy/mlflow-triton-plugin/mlflow_triton/deployments.py index fb8e72c286..0a2bea05a3 100755 --- a/deploy/mlflow-triton-plugin/mlflow_triton/deployments.py +++ b/deploy/mlflow-triton-plugin/mlflow_triton/deployments.py @@ -338,7 +338,7 @@ def _get_copy_paths(self, artifact_path, name, flavor): # with proper model versions and version strategy, which may differ from # the versioning in MLFlow for file in artifact_path.iterdir(): - if file.name not in ["MLmodel", "conda.yaml"]: + if file.name not in ["MLmodel", "conda.yaml", "registered_model_meta"]: copy_paths["model_path"]["from"] = file copy_paths["model_path"]["to"] = triton_deployment_dir elif flavor == "onnx": From 911b3caf0e4cdda9266d254b77753ad1a054ad92 Mon Sep 17 00:00:00 2001 From: fpetrini15 Date: Tue, 12 Dec 2023 12:07:40 -0800 Subject: [PATCH 2/2] Check if is_dir() --- deploy/mlflow-triton-plugin/mlflow_triton/deployments.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deploy/mlflow-triton-plugin/mlflow_triton/deployments.py b/deploy/mlflow-triton-plugin/mlflow_triton/deployments.py index 0a2bea05a3..bebe559b9e 100755 --- a/deploy/mlflow-triton-plugin/mlflow_triton/deployments.py +++ b/deploy/mlflow-triton-plugin/mlflow_triton/deployments.py @@ -338,8 +338,9 @@ def _get_copy_paths(self, artifact_path, name, flavor): # with proper model versions and version strategy, which may differ from # the versioning in MLFlow for file in artifact_path.iterdir(): - if file.name not in ["MLmodel", "conda.yaml", "registered_model_meta"]: + if file.is_dir(): copy_paths["model_path"]["from"] = file + break copy_paths["model_path"]["to"] = triton_deployment_dir elif flavor == "onnx": # Look for model file via MLModel metadata or iterating dir