From affa8223b200fa1bb0c5805f772e3b24eaaa258d Mon Sep 17 00:00:00 2001 From: Xiaodong Ye Date: Thu, 11 May 2023 10:55:02 +0800 Subject: [PATCH] Update onnx flavor to support s3 prefix and custom endpoint URL Signed-off-by: Xiaodong Ye --- deploy/mlflow-triton-plugin/mlflow_triton/deployments.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/deploy/mlflow-triton-plugin/mlflow_triton/deployments.py b/deploy/mlflow-triton-plugin/mlflow_triton/deployments.py index 43ed7120cd..aff1475e61 100644 --- a/deploy/mlflow-triton-plugin/mlflow_triton/deployments.py +++ b/deploy/mlflow-triton-plugin/mlflow_triton/deployments.py @@ -388,10 +388,11 @@ def _copy_files_to_triton_repo(self, artifact_path, name, flavor): if flavor == "onnx": s3_path = os.path.join( + self.server_config['s3_prefix'], copy_paths[key]['to'].replace( - self.server_config['triton_model_repo'], ''), + self.server_config['triton_model_repo'], '').replace('/', '', 1), filename, - ).replace('/', '', 1) + ) elif flavor == "triton": rel_path = os.path.relpath(