Skip to content

Commit cfc996e

Browse files
lllilithyangchenyangliao
andauthored
Migrate ComponentOperations from 2022-05-01 API version to 2022-10-01 API version (Azure#28206)
* migrate to 2022-10-01 and update recording * update 2022-05-01 to 2022-10-01 in mock.patch to pass test_load_component_reuse Co-authored-by: chenyangliao <chenyangliao@microsoft.com>
1 parent 1f0a4c0 commit cfc996e

File tree

100 files changed

+89225
-11523
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+89225
-11523
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ def __init__(
394394
self._components = ComponentOperations(
395395
self._operation_scope,
396396
self._operation_config,
397-
self._service_client_10_2021_dataplanepreview if registry_name else self._service_client_05_2022,
397+
self._service_client_10_2021_dataplanepreview if registry_name else self._service_client_10_2022,
398398
self._operation_container,
399399
**ops_kwargs,
400400
)

sdk/ml/azure-ai-ml/azure/ai/ml/operations/_component_operations.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
from azure.ai.ml._restclient.v2021_10_01_dataplanepreview import (
1414
AzureMachineLearningWorkspaces as ServiceClient102021Dataplane,
1515
)
16-
from azure.ai.ml._restclient.v2022_05_01 import AzureMachineLearningWorkspaces as ServiceClient052022
17-
from azure.ai.ml._restclient.v2022_05_01.models import ListViewType
16+
from azure.ai.ml._restclient.v2022_10_01 import AzureMachineLearningWorkspaces as ServiceClient102022
17+
from azure.ai.ml._restclient.v2022_10_01.models import ListViewType
1818
from azure.ai.ml._scope_dependent_operations import (
1919
OperationConfig,
2020
OperationsContainer,
@@ -74,7 +74,7 @@ def __init__(
7474
self,
7575
operation_scope: OperationScope,
7676
operation_config: OperationConfig,
77-
service_client: Union[ServiceClient052022, ServiceClient102021Dataplane],
77+
service_client: Union[ServiceClient102022, ServiceClient102021Dataplane],
7878
all_operations: OperationsContainer,
7979
**kwargs: Dict,
8080
):

sdk/ml/azure-ai-ml/tests/dsl/unittests/test_dsl_pipeline.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,7 @@ def mock_from_rest(*args, **kwargs):
924924
side_effect=mock_arm_id,
925925
):
926926
with mock.patch(
927-
"azure.ai.ml._restclient.v2022_05_01.operations.ComponentVersionsOperations.create_or_update",
927+
"azure.ai.ml._restclient.v2022_10_01.operations.ComponentVersionsOperations.create_or_update",
928928
side_effect=mock_create,
929929
):
930930
with mock.patch.object(Component, "_from_rest_object", side_effect=mock_from_rest):

sdk/ml/azure-ai-ml/tests/recordings/component/e2etests/test_component.pyTestComponenttest_anonymous_registration_from_load_component.json

Lines changed: 55 additions & 99 deletions
Large diffs are not rendered by default.

sdk/ml/azure-ai-ml/tests/recordings/component/e2etests/test_component.pyTestComponenttest_automl_component.json

Lines changed: 108 additions & 132 deletions
Large diffs are not rendered by default.

sdk/ml/azure-ai-ml/tests/recordings/component/e2etests/test_component.pyTestComponenttest_command_component.json

Lines changed: 115 additions & 115 deletions
Large diffs are not rendered by default.

sdk/ml/azure-ai-ml/tests/recordings/component/e2etests/test_component.pyTestComponenttest_command_component_create_input_output_types[input_types_component.yml].json

Lines changed: 51 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@
77
"Accept": "application/json",
88
"Accept-Encoding": "gzip, deflate",
99
"Connection": "keep-alive",
10-
"User-Agent": "azure-ai-ml/1.3.0 azsdk-python-mgmt-machinelearningservices/0.1.0 Python/3.9.13 (Windows-10-10.0.19045-SP0)"
10+
"User-Agent": "azure-ai-ml/1.4.0 azsdk-python-mgmt-machinelearningservices/0.1.0 Python/3.7.13 (Windows-10-10.0.22621-SP0)"
1111
},
1212
"RequestBody": null,
1313
"StatusCode": 200,
1414
"ResponseHeaders": {
1515
"Cache-Control": "no-cache",
1616
"Content-Encoding": "gzip",
1717
"Content-Type": "application/json; charset=utf-8",
18-
"Date": "Mon, 26 Dec 2022 03:27:31 GMT",
18+
"Date": "Thu, 05 Jan 2023 09:40:43 GMT",
1919
"Expires": "-1",
2020
"Pragma": "no-cache",
2121
"Request-Context": "appId=cid-v1:512cc15a-13b5-415b-bfd0-dce7accb6bb1",
22-
"Server-Timing": "traceparent;desc=\u002200-dd2d546d6571aaa79303049ab17270e1-814feb28a9dad0dc-00\u0022",
22+
"Server-Timing": "traceparent;desc=\u002200-8c7b2dea02d500442c3148364a7f626d-56c9cd29c2ee0745-00\u0022",
2323
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
2424
"Transfer-Encoding": "chunked",
2525
"Vary": [
@@ -28,11 +28,11 @@
2828
],
2929
"x-aml-cluster": "vienna-test-westus2-02",
3030
"X-Content-Type-Options": "nosniff",
31-
"x-ms-correlation-request-id": "31aa6a21-4567-4df2-9c2f-60e3427f69d4",
32-
"x-ms-ratelimit-remaining-subscription-reads": "11996",
31+
"x-ms-correlation-request-id": "a4993489-5e29-4a9e-9477-118864349c63",
32+
"x-ms-ratelimit-remaining-subscription-reads": "11985",
3333
"x-ms-response-type": "standard",
34-
"x-ms-routing-request-id": "JAPANEAST:20221226T032732Z:31aa6a21-4567-4df2-9c2f-60e3427f69d4",
35-
"x-request-time": "0.081"
34+
"x-ms-routing-request-id": "JAPANEAST:20230105T094043Z:a4993489-5e29-4a9e-9477-118864349c63",
35+
"x-request-time": "0.087"
3636
},
3737
"ResponseBody": {
3838
"id": "/subscriptions/00000000-0000-0000-0000-000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/datastores/workspaceblobstore",
@@ -71,29 +71,29 @@
7171
"Accept-Encoding": "gzip, deflate",
7272
"Connection": "keep-alive",
7373
"Content-Length": "0",
74-
"User-Agent": "azure-ai-ml/1.3.0 azsdk-python-mgmt-machinelearningservices/0.1.0 Python/3.9.13 (Windows-10-10.0.19045-SP0)"
74+
"User-Agent": "azure-ai-ml/1.4.0 azsdk-python-mgmt-machinelearningservices/0.1.0 Python/3.7.13 (Windows-10-10.0.22621-SP0)"
7575
},
7676
"RequestBody": null,
7777
"StatusCode": 200,
7878
"ResponseHeaders": {
7979
"Cache-Control": "no-cache",
8080
"Content-Encoding": "gzip",
8181
"Content-Type": "application/json; charset=utf-8",
82-
"Date": "Mon, 26 Dec 2022 03:27:32 GMT",
82+
"Date": "Thu, 05 Jan 2023 09:40:43 GMT",
8383
"Expires": "-1",
8484
"Pragma": "no-cache",
8585
"Request-Context": "appId=cid-v1:512cc15a-13b5-415b-bfd0-dce7accb6bb1",
86-
"Server-Timing": "traceparent;desc=\u002200-dbd5fcc1517dabb4b0de088c1ef087f5-acdbf5dfe79e6f8e-00\u0022",
86+
"Server-Timing": "traceparent;desc=\u002200-3f11dbd15eebe5a79ec75843dc6caeed-8fa1bc1f85a7962e-00\u0022",
8787
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
8888
"Transfer-Encoding": "chunked",
8989
"Vary": "Accept-Encoding",
9090
"x-aml-cluster": "vienna-test-westus2-02",
9191
"X-Content-Type-Options": "nosniff",
92-
"x-ms-correlation-request-id": "625b3ba4-19d1-4135-aed3-c75b767e8532",
93-
"x-ms-ratelimit-remaining-subscription-writes": "1196",
92+
"x-ms-correlation-request-id": "1a1dca47-702b-4ac3-b781-d1555ba6cae2",
93+
"x-ms-ratelimit-remaining-subscription-writes": "1189",
9494
"x-ms-response-type": "standard",
95-
"x-ms-routing-request-id": "JAPANEAST:20221226T032732Z:625b3ba4-19d1-4135-aed3-c75b767e8532",
96-
"x-request-time": "0.090"
95+
"x-ms-routing-request-id": "JAPANEAST:20230105T094044Z:1a1dca47-702b-4ac3-b781-d1555ba6cae2",
96+
"x-request-time": "0.109"
9797
},
9898
"ResponseBody": {
9999
"secretsType": "AccountKey",
@@ -107,9 +107,9 @@
107107
"Accept": "application/xml",
108108
"Accept-Encoding": "gzip, deflate",
109109
"Connection": "keep-alive",
110-
"User-Agent": "azsdk-python-storage-blob/12.14.1 Python/3.9.13 (Windows-10-10.0.19045-SP0)",
111-
"x-ms-date": "Mon, 26 Dec 2022 03:27:33 GMT",
112-
"x-ms-version": "2021-08-06"
110+
"User-Agent": "azsdk-python-storage-blob/12.9.0 Python/3.7.13 (Windows-10-10.0.22621-SP0)",
111+
"x-ms-date": "Thu, 05 Jan 2023 09:40:44 GMT",
112+
"x-ms-version": "2020-10-02"
113113
},
114114
"RequestBody": null,
115115
"StatusCode": 200,
@@ -118,7 +118,7 @@
118118
"Content-Length": "35",
119119
"Content-MD5": "L/DnSpFIn\u002BjaQWc\u002BsUQdcw==",
120120
"Content-Type": "application/octet-stream",
121-
"Date": "Mon, 26 Dec 2022 03:27:32 GMT",
121+
"Date": "Thu, 05 Jan 2023 09:40:43 GMT",
122122
"ETag": "\u00220x8DA9D48E17467D7\u0022",
123123
"Last-Modified": "Fri, 23 Sep 2022 09:49:17 GMT",
124124
"Server": [
@@ -136,7 +136,7 @@
136136
"x-ms-meta-upload_status": "completed",
137137
"x-ms-meta-version": "1",
138138
"x-ms-server-encrypted": "true",
139-
"x-ms-version": "2021-08-06"
139+
"x-ms-version": "2020-10-02"
140140
},
141141
"ResponseBody": null
142142
},
@@ -147,22 +147,22 @@
147147
"Accept": "application/xml",
148148
"Accept-Encoding": "gzip, deflate",
149149
"Connection": "keep-alive",
150-
"User-Agent": "azsdk-python-storage-blob/12.14.1 Python/3.9.13 (Windows-10-10.0.19045-SP0)",
151-
"x-ms-date": "Mon, 26 Dec 2022 03:27:33 GMT",
152-
"x-ms-version": "2021-08-06"
150+
"User-Agent": "azsdk-python-storage-blob/12.9.0 Python/3.7.13 (Windows-10-10.0.22621-SP0)",
151+
"x-ms-date": "Thu, 05 Jan 2023 09:40:44 GMT",
152+
"x-ms-version": "2020-10-02"
153153
},
154154
"RequestBody": null,
155155
"StatusCode": 404,
156156
"ResponseHeaders": {
157-
"Date": "Mon, 26 Dec 2022 03:27:32 GMT",
157+
"Date": "Thu, 05 Jan 2023 09:40:43 GMT",
158158
"Server": [
159159
"Windows-Azure-Blob/1.0",
160160
"Microsoft-HTTPAPI/2.0"
161161
],
162162
"Transfer-Encoding": "chunked",
163163
"Vary": "Origin",
164164
"x-ms-error-code": "BlobNotFound",
165-
"x-ms-version": "2021-08-06"
165+
"x-ms-version": "2020-10-02"
166166
},
167167
"ResponseBody": null
168168
},
@@ -175,7 +175,7 @@
175175
"Connection": "keep-alive",
176176
"Content-Length": "288",
177177
"Content-Type": "application/json",
178-
"User-Agent": "azure-ai-ml/1.3.0 azsdk-python-mgmt-machinelearningservices/0.1.0 Python/3.9.13 (Windows-10-10.0.19045-SP0)"
178+
"User-Agent": "azure-ai-ml/1.4.0 azsdk-python-mgmt-machinelearningservices/0.1.0 Python/3.7.13 (Windows-10-10.0.22621-SP0)"
179179
},
180180
"RequestBody": {
181181
"properties": {
@@ -193,11 +193,11 @@
193193
"Cache-Control": "no-cache",
194194
"Content-Encoding": "gzip",
195195
"Content-Type": "application/json; charset=utf-8",
196-
"Date": "Mon, 26 Dec 2022 03:27:33 GMT",
196+
"Date": "Thu, 05 Jan 2023 09:40:44 GMT",
197197
"Expires": "-1",
198198
"Pragma": "no-cache",
199199
"Request-Context": "appId=cid-v1:512cc15a-13b5-415b-bfd0-dce7accb6bb1",
200-
"Server-Timing": "traceparent;desc=\u002200-fb6a4ce65c14850e48c93b3db261211e-b9b17d2497928769-00\u0022",
200+
"Server-Timing": "traceparent;desc=\u002200-1e9d5974070b83799dfef6ec0579521d-8c3863d6991a50e5-00\u0022",
201201
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
202202
"Transfer-Encoding": "chunked",
203203
"Vary": [
@@ -206,11 +206,11 @@
206206
],
207207
"x-aml-cluster": "vienna-test-westus2-02",
208208
"X-Content-Type-Options": "nosniff",
209-
"x-ms-correlation-request-id": "f10875b7-a42d-450f-b37f-30eeaceb05f2",
210-
"x-ms-ratelimit-remaining-subscription-writes": "1193",
209+
"x-ms-correlation-request-id": "aa2a6234-72e6-4b19-ba95-08d4dc023694",
210+
"x-ms-ratelimit-remaining-subscription-writes": "1177",
211211
"x-ms-response-type": "standard",
212-
"x-ms-routing-request-id": "JAPANEAST:20221226T032734Z:f10875b7-a42d-450f-b37f-30eeaceb05f2",
213-
"x-request-time": "0.290"
212+
"x-ms-routing-request-id": "JAPANEAST:20230105T094045Z:aa2a6234-72e6-4b19-ba95-08d4dc023694",
213+
"x-request-time": "0.283"
214214
},
215215
"ResponseBody": {
216216
"id": "/subscriptions/00000000-0000-0000-0000-000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/codes/9c9cfba9-82bd-45db-ad06-07009d1d9672/versions/1",
@@ -231,22 +231,22 @@
231231
"createdAt": "2022-09-23T09:49:20.984936\u002B00:00",
232232
"createdBy": "Ying Chen",
233233
"createdByType": "User",
234-
"lastModifiedAt": "2022-12-26T03:27:34.0770347\u002B00:00",
235-
"lastModifiedBy": "Xingzhi Zhang",
234+
"lastModifiedAt": "2023-01-05T09:40:45.3437829\u002B00:00",
235+
"lastModifiedBy": "Doris Liao",
236236
"lastModifiedByType": "User"
237237
}
238238
}
239239
},
240240
{
241-
"RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/components/test_582801415029/versions/1?api-version=2022-05-01",
241+
"RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/components/test_382959992224/versions/1?api-version=2022-10-01",
242242
"RequestMethod": "PUT",
243243
"RequestHeaders": {
244244
"Accept": "application/json",
245245
"Accept-Encoding": "gzip, deflate",
246246
"Connection": "keep-alive",
247247
"Content-Length": "1696",
248248
"Content-Type": "application/json",
249-
"User-Agent": "azure-ai-ml/1.3.0 azsdk-python-mgmt-machinelearningservices/0.1.0 Python/3.9.13 (Windows-10-10.0.19045-SP0)"
249+
"User-Agent": "azure-ai-ml/1.4.0 azsdk-python-mgmt-machinelearningservices/0.1.0 Python/3.7.13 (Windows-10-10.0.22621-SP0)"
250250
},
251251
"RequestBody": {
252252
"properties": {
@@ -262,7 +262,7 @@
262262
"command": "echo Hello World \u0026 echo ${{inputs.component_in_string}} \u0026 echo ${{inputs.component_in_ranged_integer}} \u0026 echo ${{inputs.component_in_enum}} \u0026 echo ${{inputs.component_in_boolean}} \u0026 echo ${{inputs.component_in_ranged_number}} \u0026",
263263
"code": "azureml:/subscriptions/00000000-0000-0000-0000-000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/codes/9c9cfba9-82bd-45db-ad06-07009d1d9672/versions/1",
264264
"environment": "azureml:AzureML-sklearn-0.24-ubuntu18.04-py37-cpu:1",
265-
"name": "test_582801415029",
265+
"name": "test_382959992224",
266266
"description": "This is the basic command component with several input types",
267267
"tags": {
268268
"tag": "tagvalue",
@@ -315,25 +315,25 @@
315315
"StatusCode": 201,
316316
"ResponseHeaders": {
317317
"Cache-Control": "no-cache",
318-
"Content-Length": "2876",
318+
"Content-Length": "2870",
319319
"Content-Type": "application/json; charset=utf-8",
320-
"Date": "Mon, 26 Dec 2022 03:27:35 GMT",
320+
"Date": "Thu, 05 Jan 2023 09:40:49 GMT",
321321
"Expires": "-1",
322-
"Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/components/test_582801415029/versions/1?api-version=2022-05-01",
322+
"Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/components/test_382959992224/versions/1?api-version=2022-10-01",
323323
"Pragma": "no-cache",
324324
"Request-Context": "appId=cid-v1:512cc15a-13b5-415b-bfd0-dce7accb6bb1",
325-
"Server-Timing": "traceparent;desc=\u002200-214b595a619bade84d1380a982579ba6-d55b6e84af5ee3dd-00\u0022",
325+
"Server-Timing": "traceparent;desc=\u002200-ea7ce24d4347a72cfb164a2c925bcfa5-4b80e20ce81e7747-00\u0022",
326326
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
327327
"x-aml-cluster": "vienna-test-westus2-02",
328328
"X-Content-Type-Options": "nosniff",
329-
"x-ms-correlation-request-id": "a3d3aa7a-ffa2-426c-9454-2ca84f92b27a",
330-
"x-ms-ratelimit-remaining-subscription-writes": "1192",
329+
"x-ms-correlation-request-id": "23161ee2-f83f-4bba-a6fc-734e2ba3556d",
330+
"x-ms-ratelimit-remaining-subscription-writes": "1176",
331331
"x-ms-response-type": "standard",
332-
"x-ms-routing-request-id": "JAPANEAST:20221226T032736Z:a3d3aa7a-ffa2-426c-9454-2ca84f92b27a",
333-
"x-request-time": "1.774"
332+
"x-ms-routing-request-id": "JAPANEAST:20230105T094050Z:23161ee2-f83f-4bba-a6fc-734e2ba3556d",
333+
"x-request-time": "2.046"
334334
},
335335
"ResponseBody": {
336-
"id": "/subscriptions/00000000-0000-0000-0000-000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/components/test_582801415029/versions/1",
336+
"id": "/subscriptions/00000000-0000-0000-0000-000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/components/test_382959992224/versions/1",
337337
"name": "1",
338338
"type": "Microsoft.MachineLearningServices/workspaces/components/versions",
339339
"properties": {
@@ -346,7 +346,7 @@
346346
"isArchived": false,
347347
"isAnonymous": false,
348348
"componentSpec": {
349-
"name": "test_582801415029",
349+
"name": "test_382959992224",
350350
"version": "1",
351351
"display_name": "CommandComponentBasicInputs",
352352
"is_deterministic": "True",
@@ -405,17 +405,17 @@
405405
}
406406
},
407407
"systemData": {
408-
"createdAt": "2022-12-26T03:27:35.7564873\u002B00:00",
409-
"createdBy": "Xingzhi Zhang",
408+
"createdAt": "2023-01-05T09:40:49.7776143\u002B00:00",
409+
"createdBy": "Doris Liao",
410410
"createdByType": "User",
411-
"lastModifiedAt": "2022-12-26T03:27:36.2652759\u002B00:00",
412-
"lastModifiedBy": "Xingzhi Zhang",
411+
"lastModifiedAt": "2023-01-05T09:40:50.3091173\u002B00:00",
412+
"lastModifiedBy": "Doris Liao",
413413
"lastModifiedByType": "User"
414414
}
415415
}
416416
}
417417
],
418418
"Variables": {
419-
"component_name": "test_582801415029"
419+
"component_name": "test_382959992224"
420420
}
421421
}

0 commit comments

Comments
 (0)