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

Handle Missing Properties from Workspace Operations Classes #36461

Merged
merged 2 commits into from
Jul 15, 2024
Merged
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
12 changes: 10 additions & 2 deletions sdk/ml/azure-ai-ml/azure/ai/ml/entities/_workspace/workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,14 @@ def _from_rest_object(cls, rest_obj: RestWorkspace) -> Optional["Workspace"]:
if hasattr(rest_obj, "ml_flow_tracking_uri"):
mlflow_tracking_uri = rest_obj.ml_flow_tracking_uri

# TODO: Remove once Online Endpoints updates API version to at least 2023-08-01
allow_roleassignment_on_rg = None
if hasattr(rest_obj, "allow_roleassignment_on_rg"):
allow_roleassignment_on_rg = rest_obj.allow_roleassignment_on_rg
system_datastores_auth_mode = None
if hasattr(rest_obj, "system_datastores_auth_mode"):
system_datastores_auth_mode = rest_obj.system_datastores_auth_mode

# TODO: remove this once it is included in API response
managed_network = None
if hasattr(rest_obj, "managed_network"):
Expand Down Expand Up @@ -386,10 +394,10 @@ def _from_rest_object(cls, rest_obj: RestWorkspace) -> Optional["Workspace"]:
identity=identity,
primary_user_assigned_identity=rest_obj.primary_user_assigned_identity,
managed_network=managed_network,
system_datastores_auth_mode=rest_obj.system_datastores_auth_mode,
system_datastores_auth_mode=system_datastores_auth_mode,
feature_store_settings=feature_store_settings,
enable_data_isolation=rest_obj.enable_data_isolation,
allow_roleassignment_on_rg=rest_obj.allow_roleassignment_on_rg,
allow_roleassignment_on_rg=allow_roleassignment_on_rg,
hub_id=rest_obj.hub_resource_id,
workspace_id=rest_obj.workspace_id,
serverless_compute=serverless_compute,
Expand Down