Skip to content

Commit

Permalink
support UC directory as meta dataset
Browse files Browse the repository at this point in the history
Signed-off-by: chenmoneygithub <[email protected]>
  • Loading branch information
chenmoneygithub committed Jun 3, 2024
1 parent 72df4a2 commit bf8f964
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion mlflow/data/uc_volume_dataset_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,16 @@ def _verify_uc_path_is_valid(self, path):
return

try:
# Check if path points to a valid UC file.
w.files.get_metadata(path)
return
except Exception:
raise MlflowException(f"{path} does not exist in Databricks Unified Catalog.")
try:
# Check if path points to a valid UC directory.
w.files.get_directory_metadata(path)
except Exception:
# Neither file nor directory exists, we throw an exception.
raise MlflowException(f"{path} does not exist in Databricks Unified Catalog.")

@staticmethod
def _get_source_type() -> str:
Expand Down

0 comments on commit bf8f964

Please sign in to comment.