Skip to content

Commit

Permalink
reformat code
Browse files Browse the repository at this point in the history
reformat code
  • Loading branch information
ZhidaLiu committed Jul 25, 2023
1 parent a5773d4 commit d620207
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 6 deletions.
1 change: 1 addition & 0 deletions sdk/ml/azure-ai-ml/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
### Features Added
- Added support to enable gpu access (local_enable_gpu) for local deployment.
- Added support for workspaceHub and Project workspace

### Other Changes

- Improved the output when printing a workspace object to be more clean and readable.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,3 @@ class WorkspaceHubSchema(PathAwareSchema):
existing_workspaces = fields.List(fields.Str())
workspace_hub_config = ExperimentalField(NestedField(WorkspaceHubConfigSchema))
enable_data_isolation = fields.Bool()

Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def __init__(
additional_workspace_storage_accounts: Optional[List[str]] = None,
default_workspace_resource_group: Optional[str] = None,
) -> None:

"""WorkspaceHubConfig.
:param additional_workspace_storage_accounts: A list of resource IDs of existing storage accounts that will be utilized in addition to the default one.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ def _resolve_monitor_schedule_arm_id( # pylint:disable=too-many-branches,too-ma
target=ErrorTarget.SCHEDULE,
error_category=ErrorCategory.USER_ERROR,
)

# resolve ARM id for each signal and populate any defaults if needed
for signal_name, signal in schedule.create_monitor.monitoring_signals.items():
if signal.type == MonitorSignalType.CUSTOM:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,9 @@ def deserialize_callback(rest_obj):

# @monitor_with_activity(logger, "Hub.BeginDelete", ActivityType.PUBLICAPI)
@distributed_trace
def begin_delete(self, name: str, *, delete_dependent_resources: bool, permanently_delete: bool = False, **kwargs: Dict) -> LROPoller:
def begin_delete(
self, name: str, *, delete_dependent_resources: bool, permanently_delete: bool = False, **kwargs: Dict
) -> LROPoller:
"""Delete a WorkspaceHub.
:param name: Name of the WorkspaceHub
Expand All @@ -182,7 +184,9 @@ def begin_delete(self, name: str, *, delete_dependent_resources: bool, permanent
rest_workspace_obj and rest_workspace_obj.kind and rest_workspace_obj.kind.lower() == WORKSPACE_HUB_KIND
):
raise ValidationError("{0} is not a WorkspaceHub".format(name))
if hasattr(rest_workspace_obj, 'workspace_hub_config') and hasattr(rest_workspace_obj.workspace_hub_config, 'additional_workspace_storage_accounts'):
if hasattr(rest_workspace_obj, "workspace_hub_config") and hasattr(
rest_workspace_obj.workspace_hub_config, "additional_workspace_storage_accounts"
):
for storageaccount in rest_workspace_obj.workspace_hub_config.additional_workspace_storage_accounts:
delete_resource_by_arm_id(
self._credentials,
Expand All @@ -191,4 +195,9 @@ def begin_delete(self, name: str, *, delete_dependent_resources: bool, permanent
ArmConstants.AZURE_MGMT_STORAGE_API_VERSION,
)

return super().begin_delete(name=name, delete_dependent_resources=delete_dependent_resources, permanently_delete=permanently_delete, **kwargs)
return super().begin_delete(
name=name,
delete_dependent_resources=delete_dependent_resources,
permanently_delete=permanently_delete,
**kwargs,
)

0 comments on commit d620207

Please sign in to comment.