Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated error message for cluster check #1602

Merged
merged 2 commits into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions llmfoundry/command_utils/data_prep/convert_delta_to_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions llmfoundry/utils/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Loading