From 21c7ec880a9f0e83f0d345621c7ab65c89fe22c5 Mon Sep 17 00:00:00 2001 From: Nancy Hung Date: Tue, 22 Oct 2024 13:46:35 -0700 Subject: [PATCH] Updated error message for cluster check (#1602) --- llmfoundry/command_utils/data_prep/convert_delta_to_json.py | 3 +++ llmfoundry/utils/exceptions.py | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/llmfoundry/command_utils/data_prep/convert_delta_to_json.py b/llmfoundry/command_utils/data_prep/convert_delta_to_json.py index 000b3eebf2..fb1ee1d0ca 100644 --- a/llmfoundry/command_utils/data_prep/convert_delta_to_json.py +++ b/llmfoundry/command_utils/data_prep/convert_delta_to_json.py @@ -550,6 +550,9 @@ def validate_and_get_cluster_info( ).upper()[len('DATASECURITYMODE.'):] # NONE stands for No Isolation Shared + # This check actually checks for Unity Catalog governance compatibility and does not + # check for invalid cluster access for a particular user. Cluster access controls is + # difficult and there is no single existing API to check this. if data_security_mode == 'NONE': raise ClusterInvalidAccessMode( cluster_id=cluster_id, diff --git a/llmfoundry/utils/exceptions.py b/llmfoundry/utils/exceptions.py index 7f7442ab8f..905a376ef3 100644 --- a/llmfoundry/utils/exceptions.py +++ b/llmfoundry/utils/exceptions.py @@ -322,8 +322,8 @@ class ClusterInvalidAccessMode(UserError): """Error thrown when the cluster does not exist.""" def __init__(self, cluster_id: str, access_mode: str) -> None: - message = f'Cluster with id {cluster_id} has access mode {access_mode}. ' + \ - 'please make sure the cluster used has access mode Shared or Single User!' + message = f'The cluster you have provided: {cluster_id} does not have data governance enabled.' + \ + 'Please use a cluster with a data security mode other than NONE.' super().__init__( message, cluster_id=cluster_id,