Skip to content

Commit dd43b13

Browse files
authored
Initial WorkspaceHub change for ML SDK (Azure#29842)
* template and base operation contract temp change Update schema and entities Update template1 * update operation * finished most operations * template fixs * Update Hub name to wprkspaceHub update update restclient add kind support for 2023-02-01 update 2023-02-01-preview swagger and regenerate rest update on parameter name, still need move change to febpreview and regenerate client * remove lean workspace type and schema remove lean operation update template small fix update name and remove lean type * revert workspace operation Revert "revert workspace operation" This reverts commit 10a74ab365de8356831f250130e2c5179ffd045e. Revert "update name and remove lean type" This reverts commit 598a1fd2f71416ede63a4c4b3e190cab34acf589. Revert "Revert "update name and remove lean type"" This reverts commit f09898cdd542a0ac47940b10184111c83b090c2c. Revert "Revert "revert workspace operation"" This reverts commit e654d146886b590b76468a83c39123b8a268c2a0. revert change related to 02-01-preview update to user 04-01-preview client user 04-01-preview client for hub operation fix lint error lint error fix diagnose related package to 04-01-preview * reformat code update test client small fix fix ut format fix * prevent CMK update for lean workspace * resolve rebase issue Resolve merge conflict issue * Update Hub related test code * Update E2E test and configs * Update model version for workspace * rename workspacehub path fix * Update names Update format * Remove WorkspaceHub properties from workspace * remove workspaceHub properties from workspace remove workspacehub properties from workspace * Fix import issue and tests * Fix tests * move dependent delete to workspacehub operation * reformat code and fix feature store tests fix * Update YAMLRefDocLinks for workspaceHub * format code * rename workspace_hub and update creation flow * fix format fix * associated_workspace and add support operation. * Update template for project workspace * reformat code * fix format and code * use different template for project workspace * fix template bug * Stop create LA workspace for workspacehub * Update using new schema * Update tests Update tests fix format update format Update more entity to 06-01 preview fix tests Fixed some tests bug fixing * Update docstring * reflect comments * Add missing changes
1 parent 6ed3e15 commit dd43b13

36 files changed

+15005
-34
lines changed

sdk/ml/azure-ai-ml/azure/ai/ml/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
load_registry,
3333
load_workspace,
3434
load_workspace_connection,
35+
load_workspace_hub,
3536
)
3637

3738
module_logger = logging.getLogger(__name__)
@@ -65,6 +66,7 @@
6566
"load_workspace",
6667
"load_registry",
6768
"load_workspace_connection",
69+
"load_workspace_hub",
6870
"load_model_package",
6971
]
7072

sdk/ml/azure-ai-ml/azure/ai/ml/_arm_deployments/arm_helper.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
ArmConstants.UPDATE_ONLINE_ENDPOINT_TYPE: "update_online_endpoint.json",
2222
ArmConstants.WORKSPACE_BASE: "workspace_base.json",
2323
ArmConstants.WORKSPACE_PARAM: "workspace_param.json",
24+
ArmConstants.WORKSPACE_PROJECT: "workspace_project.json",
2425
}
2526

2627

sdk/ml/azure-ai-ml/azure/ai/ml/_arm_deployments/arm_templates/workspace_base.json

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,27 @@
486486
"metadata": {
487487
"description": "A flag to determine if workspace has data isolation enabled. The flag can only be set at the creation phase, it can't be updated."
488488
}
489+
},
490+
"workspace_hub_config" : {
491+
"type": "object",
492+
"defaultValue": {},
493+
"metadata": {
494+
"description": "Additional configuration for WorkspaceHub."
495+
}
496+
},
497+
"existing_workspaces" : {
498+
"type": "array",
499+
"defaultValue": [],
500+
"metadata": {
501+
"description": "A list of existing workspaces used by Hub to perform convert."
502+
}
503+
},
504+
"workspace_hub" : {
505+
"type": "string",
506+
"defaultValue": "",
507+
"metadata": {
508+
"description": "Resource Id of Hub used for lean workspace."
509+
}
489510
}
490511
},
491512
"variables": {
@@ -518,7 +539,8 @@
518539
"defaultPEConnections": "[array(variables('privateEndpointSettings'))]",
519540
"privateEndpointDeploymentName": "[concat('DeployPrivateEndpoint-', uniqueString(parameters('privateEndpointName')))]",
520541
"offlineStoreConnectionName": "[if(equals(parameters('offline_store_connection_name'), ''), 'OfflineStoreConnectionName', parameters('offline_store_connection_name'))]",
521-
"onlineStoreConnectionName": "[if(equals(parameters('online_store_connection_name'), ''), 'OnlineStoreConnectionName', parameters('online_store_connection_name'))]"
542+
"onlineStoreConnectionName": "[if(equals(parameters('online_store_connection_name'), ''), 'OnlineStoreConnectionName', parameters('online_store_connection_name'))]",
543+
"isWorkspaceHub": "[equals(parameters('kind'), 'hub')]"
522544
},
523545
"resources": [
524546
{
@@ -631,7 +653,7 @@
631653
}
632654
},
633655
{
634-
"condition": "[and(variables('enablePE'), equals(parameters('applicationInsightsOption'), 'new'))]",
656+
"condition": "[and(variables('enablePE'), equals(parameters('applicationInsightsOption'), 'new'), not(variables('isWorkspaceHub')))]",
635657
"type": "Microsoft.OperationalInsights/workspaces",
636658
"tags": "[parameters('tagValues')]",
637659
"apiVersion": "2020-08-01",
@@ -643,7 +665,7 @@
643665
}
644666
},
645667
{
646-
"condition": "[and(variables('enablePE'), equals(parameters('applicationInsightsOption'), 'new'))]",
668+
"condition": "[and(variables('enablePE'), equals(parameters('applicationInsightsOption'), 'new'), not(variables('isWorkspaceHub')))]",
647669
"type": "Microsoft.Insights/components",
648670
"tags": "[parameters('tagValues')]",
649671
"apiVersion": "2020-02-02-preview",
@@ -678,7 +700,7 @@
678700
"description": "[parameters('description')]",
679701
"storageAccount": "[variables('storageAccount')]",
680702
"keyVault": "[variables('keyVault')]",
681-
"applicationInsights": "[variables('applicationInsights')]",
703+
"applicationInsights": "[if(variables('isWorkspaceHub'), json('null'), variables('applicationInsights'))]",
682704
"containerRegistry": "[if(not(equals(parameters('containerRegistryOption'), 'none')), variables('containerRegistry'), json('null'))]",
683705
"hbiWorkspace": "[parameters('confidential_data')]",
684706
"imageBuildCompute": "[parameters('imageBuildCompute')]",
@@ -704,7 +726,9 @@
704726
"offlinestoreconnectionname": "[parameters('offline_store_connection_name')]",
705727
"onlinestoreconnectionname": "[parameters('online_store_connection_name')]"
706728
},
707-
"enableDataIsolation": "[parameters('enable_data_isolation')]"
729+
"enableDataIsolation": "[parameters('enable_data_isolation')]",
730+
"workspaceHubConfig": "[parameters('workspace_hub_config')]",
731+
"existingWorkspaces": "[parameters('existing_workspaces')]"
708732
}
709733
},
710734
{

sdk/ml/azure-ai-ml/azure/ai/ml/_arm_deployments/arm_templates/workspace_param.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,15 @@
152152
"online_store_connection_target" : {
153153
"value": ""
154154
},
155+
"workspace_hub_config" : {
156+
"value": {}
157+
},
158+
"existing_workspaces" : {
159+
"value": []
160+
},
161+
"workspace_hub" : {
162+
"value": ""
163+
},
155164
"enable_data_isolation": {
156165
"value": "false"
157166
}

0 commit comments

Comments
 (0)