From 5559721f9d7deecfa932f1f98118857c472e1b02 Mon Sep 17 00:00:00 2001 From: Richard He Date: Mon, 27 Mar 2023 07:24:44 -0700 Subject: [PATCH] Do not raise when model version path is s3 Signed-off-by: Richard He --- mlflow_export_import/model/import_model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mlflow_export_import/model/import_model.py b/mlflow_export_import/model/import_model.py index 9c3957cb..cc3352c7 100644 --- a/mlflow_export_import/model/import_model.py +++ b/mlflow_export_import/model/import_model.py @@ -91,7 +91,7 @@ def _import_version(self, :param sleep_time: Seconds to wait for model version crreation. """ dst_source = dst_source.replace("file://","") # OSS MLflow - if not dst_source.startswith("dbfs:") and not os.path.exists(dst_source): + if not dst_source.startswith("dbfs:") and not dst_source.startswith("s3:") and not os.path.exists(dst_source): raise MlflowExportImportException(f"'source' argument for MLflowClient.create_model_version does not exist: {dst_source}", http_status_code=404) kwargs = {"await_creation_for": self.await_creation_for } if self.await_creation_for else {} tags = src_vr["tags"]