mlflow / mlflow-export-import

Apache License 2.0
139 stars 87 forks source link

Unity Catalog models export/Import not working #185

Open WAG10 opened 5 months ago

WAG10 commented 5 months ago

Hi team, We are working on UC models export and import from one workspace to another. Export seems somehpow happening but for import we get dbfs path error. command for import : import-model --input-dir --model --experiment-name

Error : 404 Client Error: The specified blob does not exist. for url: https://dbstorageo2kgj4j4r3vkg.blob.core.windows.net/jobs/4431780668092041/mlflow-tracking/997485493456103/8f15851f15dc4ef2834e2aa58db2ede4/artifacts/3dade68ff6b542e68d583338b525578c/artifacts/quality_prediction?sig=WLEZ2LgUdJ%2FcTqrL3CxEKWrwfJ2opzY3ZXlbY7kafUY%3D&se=2024-06-07T12%3A01%3A05Z&sv=2019-02-02&spr=https&sp=r&sr=b. Response text: <?xml version="1.0" encoding="utf-8"?>BlobNotFoundThe specified blob does not exist. RequestId:067b193d-401e-006d-40c9-b86de0000000 Time:2024-06-07T11:01:05.8831272Z

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/usr/local/bin/import-model", line 11, in load_entry_point('mlflow-export-import==1.2.0', 'console_scripts', 'import-model')() File "/usr/lib/python3/dist-packages/click/core.py", line 764, in call return self.main(args, kwargs) File "/usr/lib/python3/dist-packages/click/core.py", line 717, in main rv = self.invoke(ctx) File "/usr/lib/python3/dist-packages/click/core.py", line 956, in invoke return ctx.invoke(self.callback, ctx.params) File "/usr/lib/python3/dist-packages/click/core.py", line 555, in invoke return callback(args, **kwargs) File "/usr/local/lib/python3.8/dist-packages/mlflow_export_import-1.2.0-py3.8.egg/mlflow_export_import/model/import_model.py", line 346, in main import_model( File "/usr/local/lib/python3.8/dist-packages/mlflow_export_import-1.2.0-py3.8.egg/mlflow_export_import/model/import_model.py", line 58, in import_model return importer.import_model( File "/usr/local/lib/python3.8/dist-packages/mlflow_export_import-1.2.0-py3.8.egg/mlflow_export_import/model/import_model.py", line 166, in import_model self.import_version(model_name, vr, run_id) File "/usr/local/lib/python3.8/dist-packages/mlflow_export_import-1.2.0-py3.8.egg/mlflow_export_import/model/import_model.py", line 215, in import_version return _import_model_version( File "/usr/local/lib/python3.8/dist-packages/mlflow_export_import-1.2.0-py3.8.egg/mlflow_export_import/model_version/import_model_version.py", line 119, in _import_model_version dst_vr = mlflow_client.create_model_version( File "/usr/local/lib/python3.8/dist-packages/mlflow/tracking/client.py", line 3687, in create_model_version return self._create_model_version( File "/usr/local/lib/python3.8/dist-packages/mlflow/tracking/client.py", line 3598, in _create_model_version return self._get_registry_client().create_model_version( File "/usr/local/lib/python3.8/dist-packages/mlflow/tracking/_model_registry/client.py", line 215, in create_model_version mv = self.store.create_model_version( File "/usr/local/lib/python3.8/dist-packages/mlflow/store/_unity_catalog/registry/rest_store.py", line 737, in create_model_version with self._local_model_dir(source, local_model_path) as local_model_dir: File "/usr/lib/python3.8/contextlib.py", line 113, in enter return next(self.gen) File "/usr/local/lib/python3.8/dist-packages/mlflow/store/_unity_catalog/registry/rest_store.py", line 672, in _local_model_dir raise MlflowException( mlflow.exceptions.MlflowException: Unable to download model artifacts from source artifact location 'dbfs:/databricks/mlflow-tracking/997485493456103/8f15851f15dc4ef2834e2aa58db2ede4/artifacts/3dade68ff6b542e68d583338b525578c/artifacts/quality_prediction' in order to upload them to Unity Catalog. Please ensure the source artifact location exists and that you can download from it via mlflow.artifacts.download_artifacts()