tccli 3.0.922.1__py2.py3-none-any.whl → 3.0.924.1__py2.py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- tccli/__init__.py +1 -1
- tccli/examples/apigateway/v20180808/DescribeServicesStatus.md +33 -19
- tccli/examples/cdb/v20170320/CreateDBInstance.md +2 -2
- tccli/examples/ckafka/v20190819/CreateAcl.md +4 -1
- tccli/examples/clb/v20180317/CloneLoadBalancer.md +3 -3
- tccli/examples/clb/v20180317/DescribeListeners.md +49 -127
- tccli/examples/clb/v20180317/DescribeLoadBalancers.md +578 -158
- tccli/examples/cls/v20201016/CreateScheduledSql.md +13 -11
- tccli/examples/cls/v20201016/DeleteScheduledSql.md +2 -2
- tccli/examples/cls/v20201016/DescribeConfigs.md +2 -1
- tccli/examples/cls/v20201016/DescribeKafkaConsumer.md +23 -0
- tccli/examples/cls/v20201016/DescribeScheduledSqlInfo.md +22 -19
- tccli/examples/cls/v20201016/ModifyKafkaConsumer.md +21 -0
- tccli/examples/cls/v20201016/ModifyScheduledSql.md +11 -9
- tccli/examples/cynosdb/v20190107/DescribeAccounts.md +10 -10
- tccli/examples/cynosdb/v20190107/DescribeClusterDetail.md +77 -65
- tccli/examples/ess/v20201111/CancelUserAutoSignEnableUrl.md +1 -1
- tccli/examples/ess/v20201111/CreateBatchCancelFlowUrl.md +5 -4
- tccli/examples/ess/v20201111/CreateUserAutoSignEnableUrl.md +2 -2
- tccli/examples/ess/v20201111/DescribeFlowBriefs.md +6 -2
- tccli/examples/ess/v20201111/DescribeFlowEvidenceReport.md +1 -1
- tccli/examples/ess/v20201111/DescribeFlowInfo.md +24 -38
- tccli/examples/ess/v20201111/DescribeUserAutoSignStatus.md +1 -1
- tccli/examples/ess/v20201111/GetTaskResultApi.md +2 -2
- tccli/examples/essbasic/v20210526/ChannelBatchCancelFlows.md +5 -5
- tccli/examples/essbasic/v20210526/ChannelCreateBatchCancelFlowUrl.md +10 -8
- tccli/examples/essbasic/v20210526/ChannelCreateFlowSignUrl.md +9 -8
- tccli/examples/essbasic/v20210526/ChannelCreateWebThemeConfig.md +7 -6
- tccli/examples/essbasic/v20210526/DescribeFlowDetailInfo.md +19 -30
- tccli/examples/essbasic/v20210526/DescribeTemplates.md +13 -4
- tccli/examples/essbasic/v20210526/OperateChannelTemplate.md +2 -2
- tccli/examples/lcic/v20220817/DescribeRoom.md +2 -0
- tccli/examples/mna/v20210119/GetDevices.md +9 -16
- tccli/examples/mna/v20210119/UpdateDevice.md +7 -10
- tccli/examples/ms/v20180408/CreateEncryptInstance.md +30 -30
- tccli/examples/ms/v20180408/CreateOrderInstance.md +2 -2
- tccli/examples/ms/v20180408/DescribeEncryptInstances.md +73 -65
- tccli/examples/ms/v20180408/DescribeEncryptPlan.md +34 -34
- tccli/examples/ms/v20180408/DescribeOrderInstances.md +1 -1
- tccli/examples/oceanus/v20190422/CreateJobConfig.md +1 -1
- tccli/examples/tdmq/v20200217/CreateRocketMQVipInstance.md +28 -0
- tccli/examples/tione/v20211111/CreateNotebook.md +62 -0
- tccli/examples/tione/v20211111/CreateNotebookImage.md +18 -0
- tccli/examples/tione/v20211111/DeleteNotebook.md +20 -0
- tccli/examples/tione/v20211111/DeleteNotebookImageRecord.md +18 -0
- tccli/examples/tione/v20211111/DescribeNotebook.md +70 -0
- tccli/examples/tione/v20211111/DescribeNotebookImageKernels.md +23 -0
- tccli/examples/tione/v20211111/DescribeNotebookImageRecords.md +28 -0
- tccli/examples/tione/v20211111/DescribeNotebooks.md +77 -0
- tccli/examples/tione/v20211111/ModifyNotebook.md +64 -0
- tccli/examples/tione/v20211111/ModifyNotebookTags.md +22 -0
- tccli/examples/tione/v20211111/StartNotebook.md +20 -0
- tccli/examples/tione/v20211111/StopCreatingImage.md +18 -0
- tccli/examples/tione/v20211111/StopNotebook.md +20 -0
- tccli/examples/vpc/v20170312/CreateVpnGateway.md +20 -26
- tccli/examples/waf/v20180125/GetAttackHistogram.md +142 -0
- tccli/services/apigateway/v20180808/api.json +119 -12
- tccli/services/apigateway/v20180808/examples.json +4 -4
- tccli/services/asr/v20190614/api.json +1 -1
- tccli/services/cdb/v20170320/api.json +101 -90
- tccli/services/cdb/v20170320/examples.json +2 -2
- tccli/services/cdn/v20180606/api.json +59 -6
- tccli/services/ckafka/v20190819/api.json +10 -10
- tccli/services/ckafka/v20190819/examples.json +1 -1
- tccli/services/clb/v20180317/api.json +221 -68
- tccli/services/clb/v20180317/examples.json +10 -10
- tccli/services/cls/cls_client.py +110 -4
- tccli/services/cls/v20201016/api.json +330 -115
- tccli/services/cls/v20201016/examples.json +23 -7
- tccli/services/cynosdb/v20190107/api.json +82 -31
- tccli/services/cynosdb/v20190107/examples.json +3 -3
- tccli/services/dlc/v20210125/api.json +11 -11
- tccli/services/emr/v20190103/api.json +10 -0
- tccli/services/ess/v20201111/api.json +519 -142
- tccli/services/ess/v20201111/examples.json +9 -9
- tccli/services/essbasic/v20210526/api.json +195 -126
- tccli/services/essbasic/v20210526/examples.json +13 -13
- tccli/services/faceid/v20180301/api.json +21 -16
- tccli/services/lcic/v20220817/api.json +10 -0
- tccli/services/lcic/v20220817/examples.json +2 -2
- tccli/services/live/v20180801/api.json +42 -22
- tccli/services/mna/v20210119/api.json +11 -12
- tccli/services/mna/v20210119/examples.json +4 -4
- tccli/services/mps/v20190612/api.json +142 -61
- tccli/services/ms/v20180408/api.json +92 -19
- tccli/services/ms/v20180408/examples.json +31 -31
- tccli/services/nlp/v20190408/api.json +2 -1
- tccli/services/oceanus/v20190422/api.json +355 -41
- tccli/services/oceanus/v20190422/examples.json +1 -1
- tccli/services/ocr/ocr_client.py +4 -110
- tccli/services/ocr/v20181119/api.json +0 -315
- tccli/services/ocr/v20181119/examples.json +0 -16
- tccli/services/tdmq/tdmq_client.py +53 -0
- tccli/services/tdmq/v20200217/api.json +126 -0
- tccli/services/tdmq/v20200217/examples.json +8 -0
- tccli/services/teo/v20220901/api.json +18 -18
- tccli/services/tione/tione_client.py +987 -298
- tccli/services/tione/v20211111/api.json +1784 -20
- tccli/services/tione/v20211111/examples.json +104 -0
- tccli/services/tts/v20190823/api.json +1 -1
- tccli/services/vpc/v20170312/api.json +45 -65
- tccli/services/vpc/v20170312/examples.json +3 -3
- tccli/services/waf/v20180125/api.json +111 -0
- tccli/services/waf/v20180125/examples.json +8 -0
- tccli/services/waf/waf_client.py +57 -4
- {tccli-3.0.922.1.dist-info → tccli-3.0.924.1.dist-info}/METADATA +2 -2
- {tccli-3.0.922.1.dist-info → tccli-3.0.924.1.dist-info}/RECORD +110 -93
- {tccli-3.0.922.1.dist-info → tccli-3.0.924.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.922.1.dist-info → tccli-3.0.924.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.922.1.dist-info → tccli-3.0.924.1.dist-info}/license_files/LICENSE +0 -0
@@ -71,7 +71,7 @@ def doDescribeTrainingModelVersion(args, parsed_globals):
|
|
71
71
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
72
72
|
|
73
73
|
|
74
|
-
def
|
74
|
+
def doDescribeModelService(args, parsed_globals):
|
75
75
|
g_param = parse_global_arg(parsed_globals)
|
76
76
|
|
77
77
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -100,11 +100,11 @@ def doDeleteBatchTask(args, parsed_globals):
|
|
100
100
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
101
101
|
client._sdkVersion += ("_CLI_" + __version__)
|
102
102
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
103
|
-
model = models.
|
103
|
+
model = models.DescribeModelServiceRequest()
|
104
104
|
model.from_json_string(json.dumps(args))
|
105
105
|
start_time = time.time()
|
106
106
|
while True:
|
107
|
-
rsp = client.
|
107
|
+
rsp = client.DescribeModelService(model)
|
108
108
|
result = rsp.to_json_string()
|
109
109
|
try:
|
110
110
|
json_obj = json.loads(result)
|
@@ -175,7 +175,7 @@ def doDescribeBillingSpecs(args, parsed_globals):
|
|
175
175
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
176
176
|
|
177
177
|
|
178
|
-
def
|
178
|
+
def doDeleteModelAccelerateTask(args, parsed_globals):
|
179
179
|
g_param = parse_global_arg(parsed_globals)
|
180
180
|
|
181
181
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -204,11 +204,11 @@ def doCreateTrainingModel(args, parsed_globals):
|
|
204
204
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
205
205
|
client._sdkVersion += ("_CLI_" + __version__)
|
206
206
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
207
|
-
model = models.
|
207
|
+
model = models.DeleteModelAccelerateTaskRequest()
|
208
208
|
model.from_json_string(json.dumps(args))
|
209
209
|
start_time = time.time()
|
210
210
|
while True:
|
211
|
-
rsp = client.
|
211
|
+
rsp = client.DeleteModelAccelerateTask(model)
|
212
212
|
result = rsp.to_json_string()
|
213
213
|
try:
|
214
214
|
json_obj = json.loads(result)
|
@@ -227,7 +227,7 @@ def doCreateTrainingModel(args, parsed_globals):
|
|
227
227
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
228
228
|
|
229
229
|
|
230
|
-
def
|
230
|
+
def doDescribeNotebooks(args, parsed_globals):
|
231
231
|
g_param = parse_global_arg(parsed_globals)
|
232
232
|
|
233
233
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -256,11 +256,11 @@ def doDescribeBillingSpecsPrice(args, parsed_globals):
|
|
256
256
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
257
257
|
client._sdkVersion += ("_CLI_" + __version__)
|
258
258
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
259
|
-
model = models.
|
259
|
+
model = models.DescribeNotebooksRequest()
|
260
260
|
model.from_json_string(json.dumps(args))
|
261
261
|
start_time = time.time()
|
262
262
|
while True:
|
263
|
-
rsp = client.
|
263
|
+
rsp = client.DescribeNotebooks(model)
|
264
264
|
result = rsp.to_json_string()
|
265
265
|
try:
|
266
266
|
json_obj = json.loads(result)
|
@@ -279,7 +279,7 @@ def doDescribeBillingSpecsPrice(args, parsed_globals):
|
|
279
279
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
280
280
|
|
281
281
|
|
282
|
-
def
|
282
|
+
def doDescribeDatasetDetailUnstructured(args, parsed_globals):
|
283
283
|
g_param = parse_global_arg(parsed_globals)
|
284
284
|
|
285
285
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -308,11 +308,11 @@ def doDescribeModelServiceCallInfo(args, parsed_globals):
|
|
308
308
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
309
309
|
client._sdkVersion += ("_CLI_" + __version__)
|
310
310
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
311
|
-
model = models.
|
311
|
+
model = models.DescribeDatasetDetailUnstructuredRequest()
|
312
312
|
model.from_json_string(json.dumps(args))
|
313
313
|
start_time = time.time()
|
314
314
|
while True:
|
315
|
-
rsp = client.
|
315
|
+
rsp = client.DescribeDatasetDetailUnstructured(model)
|
316
316
|
result = rsp.to_json_string()
|
317
317
|
try:
|
318
318
|
json_obj = json.loads(result)
|
@@ -331,7 +331,7 @@ def doDescribeModelServiceCallInfo(args, parsed_globals):
|
|
331
331
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
332
332
|
|
333
333
|
|
334
|
-
def
|
334
|
+
def doDeleteNotebook(args, parsed_globals):
|
335
335
|
g_param = parse_global_arg(parsed_globals)
|
336
336
|
|
337
337
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -360,11 +360,11 @@ def doModifyModelServicePartialConfig(args, parsed_globals):
|
|
360
360
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
361
361
|
client._sdkVersion += ("_CLI_" + __version__)
|
362
362
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
363
|
-
model = models.
|
363
|
+
model = models.DeleteNotebookRequest()
|
364
364
|
model.from_json_string(json.dumps(args))
|
365
365
|
start_time = time.time()
|
366
366
|
while True:
|
367
|
-
rsp = client.
|
367
|
+
rsp = client.DeleteNotebook(model)
|
368
368
|
result = rsp.to_json_string()
|
369
369
|
try:
|
370
370
|
json_obj = json.loads(result)
|
@@ -383,7 +383,7 @@ def doModifyModelServicePartialConfig(args, parsed_globals):
|
|
383
383
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
384
384
|
|
385
385
|
|
386
|
-
def
|
386
|
+
def doDescribeTrainingTask(args, parsed_globals):
|
387
387
|
g_param = parse_global_arg(parsed_globals)
|
388
388
|
|
389
389
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -412,11 +412,11 @@ def doCreateOptimizedModel(args, parsed_globals):
|
|
412
412
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
413
413
|
client._sdkVersion += ("_CLI_" + __version__)
|
414
414
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
415
|
-
model = models.
|
415
|
+
model = models.DescribeTrainingTaskRequest()
|
416
416
|
model.from_json_string(json.dumps(args))
|
417
417
|
start_time = time.time()
|
418
418
|
while True:
|
419
|
-
rsp = client.
|
419
|
+
rsp = client.DescribeTrainingTask(model)
|
420
420
|
result = rsp.to_json_string()
|
421
421
|
try:
|
422
422
|
json_obj = json.loads(result)
|
@@ -435,7 +435,7 @@ def doCreateOptimizedModel(args, parsed_globals):
|
|
435
435
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
436
436
|
|
437
437
|
|
438
|
-
def
|
438
|
+
def doDeleteModelServiceGroup(args, parsed_globals):
|
439
439
|
g_param = parse_global_arg(parsed_globals)
|
440
440
|
|
441
441
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -464,11 +464,11 @@ def doUpdateNotebookInstance(args, parsed_globals):
|
|
464
464
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
465
465
|
client._sdkVersion += ("_CLI_" + __version__)
|
466
466
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
467
|
-
model = models.
|
467
|
+
model = models.DeleteModelServiceGroupRequest()
|
468
468
|
model.from_json_string(json.dumps(args))
|
469
469
|
start_time = time.time()
|
470
470
|
while True:
|
471
|
-
rsp = client.
|
471
|
+
rsp = client.DeleteModelServiceGroup(model)
|
472
472
|
result = rsp.to_json_string()
|
473
473
|
try:
|
474
474
|
json_obj = json.loads(result)
|
@@ -487,7 +487,7 @@ def doUpdateNotebookInstance(args, parsed_globals):
|
|
487
487
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
488
488
|
|
489
489
|
|
490
|
-
def
|
490
|
+
def doDescribeBatchTasks(args, parsed_globals):
|
491
491
|
g_param = parse_global_arg(parsed_globals)
|
492
492
|
|
493
493
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -516,11 +516,11 @@ def doDescribeTrainingTasks(args, parsed_globals):
|
|
516
516
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
517
517
|
client._sdkVersion += ("_CLI_" + __version__)
|
518
518
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
519
|
-
model = models.
|
519
|
+
model = models.DescribeBatchTasksRequest()
|
520
520
|
model.from_json_string(json.dumps(args))
|
521
521
|
start_time = time.time()
|
522
522
|
while True:
|
523
|
-
rsp = client.
|
523
|
+
rsp = client.DescribeBatchTasks(model)
|
524
524
|
result = rsp.to_json_string()
|
525
525
|
try:
|
526
526
|
json_obj = json.loads(result)
|
@@ -539,7 +539,7 @@ def doDescribeTrainingTasks(args, parsed_globals):
|
|
539
539
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
540
540
|
|
541
541
|
|
542
|
-
def
|
542
|
+
def doCreateCodeRepository(args, parsed_globals):
|
543
543
|
g_param = parse_global_arg(parsed_globals)
|
544
544
|
|
545
545
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -568,11 +568,11 @@ def doDescribeModelServiceGroup(args, parsed_globals):
|
|
568
568
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
569
569
|
client._sdkVersion += ("_CLI_" + __version__)
|
570
570
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
571
|
-
model = models.
|
571
|
+
model = models.CreateCodeRepositoryRequest()
|
572
572
|
model.from_json_string(json.dumps(args))
|
573
573
|
start_time = time.time()
|
574
574
|
while True:
|
575
|
-
rsp = client.
|
575
|
+
rsp = client.CreateCodeRepository(model)
|
576
576
|
result = rsp.to_json_string()
|
577
577
|
try:
|
578
578
|
json_obj = json.loads(result)
|
@@ -591,7 +591,7 @@ def doDescribeModelServiceGroup(args, parsed_globals):
|
|
591
591
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
592
592
|
|
593
593
|
|
594
|
-
def
|
594
|
+
def doCreateNotebookInstance(args, parsed_globals):
|
595
595
|
g_param = parse_global_arg(parsed_globals)
|
596
596
|
|
597
597
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -620,11 +620,11 @@ def doDescribeNotebookLifecycleScripts(args, parsed_globals):
|
|
620
620
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
621
621
|
client._sdkVersion += ("_CLI_" + __version__)
|
622
622
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
623
|
-
model = models.
|
623
|
+
model = models.CreateNotebookInstanceRequest()
|
624
624
|
model.from_json_string(json.dumps(args))
|
625
625
|
start_time = time.time()
|
626
626
|
while True:
|
627
|
-
rsp = client.
|
627
|
+
rsp = client.CreateNotebookInstance(model)
|
628
628
|
result = rsp.to_json_string()
|
629
629
|
try:
|
630
630
|
json_obj = json.loads(result)
|
@@ -643,7 +643,7 @@ def doDescribeNotebookLifecycleScripts(args, parsed_globals):
|
|
643
643
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
644
644
|
|
645
645
|
|
646
|
-
def
|
646
|
+
def doDescribeTrainingJobs(args, parsed_globals):
|
647
647
|
g_param = parse_global_arg(parsed_globals)
|
648
648
|
|
649
649
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -672,11 +672,11 @@ def doDescribeModelService(args, parsed_globals):
|
|
672
672
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
673
673
|
client._sdkVersion += ("_CLI_" + __version__)
|
674
674
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
675
|
-
model = models.
|
675
|
+
model = models.DescribeTrainingJobsRequest()
|
676
676
|
model.from_json_string(json.dumps(args))
|
677
677
|
start_time = time.time()
|
678
678
|
while True:
|
679
|
-
rsp = client.
|
679
|
+
rsp = client.DescribeTrainingJobs(model)
|
680
680
|
result = rsp.to_json_string()
|
681
681
|
try:
|
682
682
|
json_obj = json.loads(result)
|
@@ -695,7 +695,7 @@ def doDescribeModelService(args, parsed_globals):
|
|
695
695
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
696
696
|
|
697
697
|
|
698
|
-
def
|
698
|
+
def doStopModelAccelerateTask(args, parsed_globals):
|
699
699
|
g_param = parse_global_arg(parsed_globals)
|
700
700
|
|
701
701
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -724,11 +724,11 @@ def doDescribeTrainingFrameworks(args, parsed_globals):
|
|
724
724
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
725
725
|
client._sdkVersion += ("_CLI_" + __version__)
|
726
726
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
727
|
-
model = models.
|
727
|
+
model = models.StopModelAccelerateTaskRequest()
|
728
728
|
model.from_json_string(json.dumps(args))
|
729
729
|
start_time = time.time()
|
730
730
|
while True:
|
731
|
-
rsp = client.
|
731
|
+
rsp = client.StopModelAccelerateTask(model)
|
732
732
|
result = rsp.to_json_string()
|
733
733
|
try:
|
734
734
|
json_obj = json.loads(result)
|
@@ -747,7 +747,7 @@ def doDescribeTrainingFrameworks(args, parsed_globals):
|
|
747
747
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
748
748
|
|
749
749
|
|
750
|
-
def
|
750
|
+
def doDescribeModelServices(args, parsed_globals):
|
751
751
|
g_param = parse_global_arg(parsed_globals)
|
752
752
|
|
753
753
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -776,11 +776,11 @@ def doDeleteDataset(args, parsed_globals):
|
|
776
776
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
777
777
|
client._sdkVersion += ("_CLI_" + __version__)
|
778
778
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
779
|
-
model = models.
|
779
|
+
model = models.DescribeModelServicesRequest()
|
780
780
|
model.from_json_string(json.dumps(args))
|
781
781
|
start_time = time.time()
|
782
782
|
while True:
|
783
|
-
rsp = client.
|
783
|
+
rsp = client.DescribeModelServices(model)
|
784
784
|
result = rsp.to_json_string()
|
785
785
|
try:
|
786
786
|
json_obj = json.loads(result)
|
@@ -799,7 +799,7 @@ def doDeleteDataset(args, parsed_globals):
|
|
799
799
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
800
800
|
|
801
801
|
|
802
|
-
def
|
802
|
+
def doDeleteNotebookLifecycleScript(args, parsed_globals):
|
803
803
|
g_param = parse_global_arg(parsed_globals)
|
804
804
|
|
805
805
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -828,11 +828,11 @@ def doCreateTrainingTask(args, parsed_globals):
|
|
828
828
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
829
829
|
client._sdkVersion += ("_CLI_" + __version__)
|
830
830
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
831
|
-
model = models.
|
831
|
+
model = models.DeleteNotebookLifecycleScriptRequest()
|
832
832
|
model.from_json_string(json.dumps(args))
|
833
833
|
start_time = time.time()
|
834
834
|
while True:
|
835
|
-
rsp = client.
|
835
|
+
rsp = client.DeleteNotebookLifecycleScript(model)
|
836
836
|
result = rsp.to_json_string()
|
837
837
|
try:
|
838
838
|
json_obj = json.loads(result)
|
@@ -851,7 +851,7 @@ def doCreateTrainingTask(args, parsed_globals):
|
|
851
851
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
852
852
|
|
853
853
|
|
854
|
-
def
|
854
|
+
def doDescribeNotebookImageKernels(args, parsed_globals):
|
855
855
|
g_param = parse_global_arg(parsed_globals)
|
856
856
|
|
857
857
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -880,11 +880,11 @@ def doStopBatchTask(args, parsed_globals):
|
|
880
880
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
881
881
|
client._sdkVersion += ("_CLI_" + __version__)
|
882
882
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
883
|
-
model = models.
|
883
|
+
model = models.DescribeNotebookImageKernelsRequest()
|
884
884
|
model.from_json_string(json.dumps(args))
|
885
885
|
start_time = time.time()
|
886
886
|
while True:
|
887
|
-
rsp = client.
|
887
|
+
rsp = client.DescribeNotebookImageKernels(model)
|
888
888
|
result = rsp.to_json_string()
|
889
889
|
try:
|
890
890
|
json_obj = json.loads(result)
|
@@ -903,7 +903,7 @@ def doStopBatchTask(args, parsed_globals):
|
|
903
903
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
904
904
|
|
905
905
|
|
906
|
-
def
|
906
|
+
def doDescribeNotebook(args, parsed_globals):
|
907
907
|
g_param = parse_global_arg(parsed_globals)
|
908
908
|
|
909
909
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -932,11 +932,11 @@ def doDescribeDatasetDetailUnstructured(args, parsed_globals):
|
|
932
932
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
933
933
|
client._sdkVersion += ("_CLI_" + __version__)
|
934
934
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
935
|
-
model = models.
|
935
|
+
model = models.DescribeNotebookRequest()
|
936
936
|
model.from_json_string(json.dumps(args))
|
937
937
|
start_time = time.time()
|
938
938
|
while True:
|
939
|
-
rsp = client.
|
939
|
+
rsp = client.DescribeNotebook(model)
|
940
940
|
result = rsp.to_json_string()
|
941
941
|
try:
|
942
942
|
json_obj = json.loads(result)
|
@@ -955,7 +955,7 @@ def doDescribeDatasetDetailUnstructured(args, parsed_globals):
|
|
955
955
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
956
956
|
|
957
957
|
|
958
|
-
def
|
958
|
+
def doUpdateCodeRepository(args, parsed_globals):
|
959
959
|
g_param = parse_global_arg(parsed_globals)
|
960
960
|
|
961
961
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -984,11 +984,11 @@ def doDescribeTrainingModels(args, parsed_globals):
|
|
984
984
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
985
985
|
client._sdkVersion += ("_CLI_" + __version__)
|
986
986
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
987
|
-
model = models.
|
987
|
+
model = models.UpdateCodeRepositoryRequest()
|
988
988
|
model.from_json_string(json.dumps(args))
|
989
989
|
start_time = time.time()
|
990
990
|
while True:
|
991
|
-
rsp = client.
|
991
|
+
rsp = client.UpdateCodeRepository(model)
|
992
992
|
result = rsp.to_json_string()
|
993
993
|
try:
|
994
994
|
json_obj = json.loads(result)
|
@@ -1007,7 +1007,7 @@ def doDescribeTrainingModels(args, parsed_globals):
|
|
1007
1007
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1008
1008
|
|
1009
1009
|
|
1010
|
-
def
|
1010
|
+
def doDescribeNotebookInstances(args, parsed_globals):
|
1011
1011
|
g_param = parse_global_arg(parsed_globals)
|
1012
1012
|
|
1013
1013
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1036,11 +1036,11 @@ def doDescribeTrainingTaskPods(args, parsed_globals):
|
|
1036
1036
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
1037
1037
|
client._sdkVersion += ("_CLI_" + __version__)
|
1038
1038
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1039
|
-
model = models.
|
1039
|
+
model = models.DescribeNotebookInstancesRequest()
|
1040
1040
|
model.from_json_string(json.dumps(args))
|
1041
1041
|
start_time = time.time()
|
1042
1042
|
while True:
|
1043
|
-
rsp = client.
|
1043
|
+
rsp = client.DescribeNotebookInstances(model)
|
1044
1044
|
result = rsp.to_json_string()
|
1045
1045
|
try:
|
1046
1046
|
json_obj = json.loads(result)
|
@@ -1059,7 +1059,7 @@ def doDescribeTrainingTaskPods(args, parsed_globals):
|
|
1059
1059
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1060
1060
|
|
1061
1061
|
|
1062
|
-
def
|
1062
|
+
def doStopTrainingJob(args, parsed_globals):
|
1063
1063
|
g_param = parse_global_arg(parsed_globals)
|
1064
1064
|
|
1065
1065
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1088,11 +1088,11 @@ def doDescribeModelServiceHotUpdated(args, parsed_globals):
|
|
1088
1088
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
1089
1089
|
client._sdkVersion += ("_CLI_" + __version__)
|
1090
1090
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1091
|
-
model = models.
|
1091
|
+
model = models.StopTrainingJobRequest()
|
1092
1092
|
model.from_json_string(json.dumps(args))
|
1093
1093
|
start_time = time.time()
|
1094
1094
|
while True:
|
1095
|
-
rsp = client.
|
1095
|
+
rsp = client.StopTrainingJob(model)
|
1096
1096
|
result = rsp.to_json_string()
|
1097
1097
|
try:
|
1098
1098
|
json_obj = json.loads(result)
|
@@ -1111,7 +1111,7 @@ def doDescribeModelServiceHotUpdated(args, parsed_globals):
|
|
1111
1111
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1112
1112
|
|
1113
1113
|
|
1114
|
-
def
|
1114
|
+
def doCreateTrainingModel(args, parsed_globals):
|
1115
1115
|
g_param = parse_global_arg(parsed_globals)
|
1116
1116
|
|
1117
1117
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1140,11 +1140,11 @@ def doDescribeModelAccelerateTask(args, parsed_globals):
|
|
1140
1140
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
1141
1141
|
client._sdkVersion += ("_CLI_" + __version__)
|
1142
1142
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1143
|
-
model = models.
|
1143
|
+
model = models.CreateTrainingModelRequest()
|
1144
1144
|
model.from_json_string(json.dumps(args))
|
1145
1145
|
start_time = time.time()
|
1146
1146
|
while True:
|
1147
|
-
rsp = client.
|
1147
|
+
rsp = client.CreateTrainingModel(model)
|
1148
1148
|
result = rsp.to_json_string()
|
1149
1149
|
try:
|
1150
1150
|
json_obj = json.loads(result)
|
@@ -1163,7 +1163,7 @@ def doDescribeModelAccelerateTask(args, parsed_globals):
|
|
1163
1163
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1164
1164
|
|
1165
1165
|
|
1166
|
-
def
|
1166
|
+
def doDescribeBillingSpecsPrice(args, parsed_globals):
|
1167
1167
|
g_param = parse_global_arg(parsed_globals)
|
1168
1168
|
|
1169
1169
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1192,11 +1192,11 @@ def doDescribeTrainingMetrics(args, parsed_globals):
|
|
1192
1192
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
1193
1193
|
client._sdkVersion += ("_CLI_" + __version__)
|
1194
1194
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1195
|
-
model = models.
|
1195
|
+
model = models.DescribeBillingSpecsPriceRequest()
|
1196
1196
|
model.from_json_string(json.dumps(args))
|
1197
1197
|
start_time = time.time()
|
1198
1198
|
while True:
|
1199
|
-
rsp = client.
|
1199
|
+
rsp = client.DescribeBillingSpecsPrice(model)
|
1200
1200
|
result = rsp.to_json_string()
|
1201
1201
|
try:
|
1202
1202
|
json_obj = json.loads(result)
|
@@ -1215,7 +1215,7 @@ def doDescribeTrainingMetrics(args, parsed_globals):
|
|
1215
1215
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1216
1216
|
|
1217
1217
|
|
1218
|
-
def
|
1218
|
+
def doCreateOptimizedModel(args, parsed_globals):
|
1219
1219
|
g_param = parse_global_arg(parsed_globals)
|
1220
1220
|
|
1221
1221
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1244,11 +1244,11 @@ def doDeleteTrainingModel(args, parsed_globals):
|
|
1244
1244
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
1245
1245
|
client._sdkVersion += ("_CLI_" + __version__)
|
1246
1246
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1247
|
-
model = models.
|
1247
|
+
model = models.CreateOptimizedModelRequest()
|
1248
1248
|
model.from_json_string(json.dumps(args))
|
1249
1249
|
start_time = time.time()
|
1250
1250
|
while True:
|
1251
|
-
rsp = client.
|
1251
|
+
rsp = client.CreateOptimizedModel(model)
|
1252
1252
|
result = rsp.to_json_string()
|
1253
1253
|
try:
|
1254
1254
|
json_obj = json.loads(result)
|
@@ -1267,7 +1267,7 @@ def doDeleteTrainingModel(args, parsed_globals):
|
|
1267
1267
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1268
1268
|
|
1269
1269
|
|
1270
|
-
def
|
1270
|
+
def doDescribeNotebookLifecycleScripts(args, parsed_globals):
|
1271
1271
|
g_param = parse_global_arg(parsed_globals)
|
1272
1272
|
|
1273
1273
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1296,11 +1296,11 @@ def doModifyServiceGroupWeights(args, parsed_globals):
|
|
1296
1296
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
1297
1297
|
client._sdkVersion += ("_CLI_" + __version__)
|
1298
1298
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1299
|
-
model = models.
|
1299
|
+
model = models.DescribeNotebookLifecycleScriptsRequest()
|
1300
1300
|
model.from_json_string(json.dumps(args))
|
1301
1301
|
start_time = time.time()
|
1302
1302
|
while True:
|
1303
|
-
rsp = client.
|
1303
|
+
rsp = client.DescribeNotebookLifecycleScripts(model)
|
1304
1304
|
result = rsp.to_json_string()
|
1305
1305
|
try:
|
1306
1306
|
json_obj = json.loads(result)
|
@@ -1319,7 +1319,7 @@ def doModifyServiceGroupWeights(args, parsed_globals):
|
|
1319
1319
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1320
1320
|
|
1321
1321
|
|
1322
|
-
def
|
1322
|
+
def doStopBatchTask(args, parsed_globals):
|
1323
1323
|
g_param = parse_global_arg(parsed_globals)
|
1324
1324
|
|
1325
1325
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1348,11 +1348,11 @@ def doCreateDataset(args, parsed_globals):
|
|
1348
1348
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
1349
1349
|
client._sdkVersion += ("_CLI_" + __version__)
|
1350
1350
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1351
|
-
model = models.
|
1351
|
+
model = models.StopBatchTaskRequest()
|
1352
1352
|
model.from_json_string(json.dumps(args))
|
1353
1353
|
start_time = time.time()
|
1354
1354
|
while True:
|
1355
|
-
rsp = client.
|
1355
|
+
rsp = client.StopBatchTask(model)
|
1356
1356
|
result = rsp.to_json_string()
|
1357
1357
|
try:
|
1358
1358
|
json_obj = json.loads(result)
|
@@ -1371,7 +1371,7 @@ def doCreateDataset(args, parsed_globals):
|
|
1371
1371
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1372
1372
|
|
1373
1373
|
|
1374
|
-
def
|
1374
|
+
def doDescribeModelAccelerateTask(args, parsed_globals):
|
1375
1375
|
g_param = parse_global_arg(parsed_globals)
|
1376
1376
|
|
1377
1377
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1400,11 +1400,11 @@ def doDescribeBatchTaskInstances(args, parsed_globals):
|
|
1400
1400
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
1401
1401
|
client._sdkVersion += ("_CLI_" + __version__)
|
1402
1402
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1403
|
-
model = models.
|
1403
|
+
model = models.DescribeModelAccelerateTaskRequest()
|
1404
1404
|
model.from_json_string(json.dumps(args))
|
1405
1405
|
start_time = time.time()
|
1406
1406
|
while True:
|
1407
|
-
rsp = client.
|
1407
|
+
rsp = client.DescribeModelAccelerateTask(model)
|
1408
1408
|
result = rsp.to_json_string()
|
1409
1409
|
try:
|
1410
1410
|
json_obj = json.loads(result)
|
@@ -1423,7 +1423,7 @@ def doDescribeBatchTaskInstances(args, parsed_globals):
|
|
1423
1423
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1424
1424
|
|
1425
1425
|
|
1426
|
-
def
|
1426
|
+
def doModifyNotebookTags(args, parsed_globals):
|
1427
1427
|
g_param = parse_global_arg(parsed_globals)
|
1428
1428
|
|
1429
1429
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1452,11 +1452,11 @@ def doUpdateCodeRepository(args, parsed_globals):
|
|
1452
1452
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
1453
1453
|
client._sdkVersion += ("_CLI_" + __version__)
|
1454
1454
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1455
|
-
model = models.
|
1455
|
+
model = models.ModifyNotebookTagsRequest()
|
1456
1456
|
model.from_json_string(json.dumps(args))
|
1457
1457
|
start_time = time.time()
|
1458
1458
|
while True:
|
1459
|
-
rsp = client.
|
1459
|
+
rsp = client.ModifyNotebookTags(model)
|
1460
1460
|
result = rsp.to_json_string()
|
1461
1461
|
try:
|
1462
1462
|
json_obj = json.loads(result)
|
@@ -1475,7 +1475,7 @@ def doUpdateCodeRepository(args, parsed_globals):
|
|
1475
1475
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1476
1476
|
|
1477
1477
|
|
1478
|
-
def
|
1478
|
+
def doDescribeBatchTaskInstances(args, parsed_globals):
|
1479
1479
|
g_param = parse_global_arg(parsed_globals)
|
1480
1480
|
|
1481
1481
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1504,11 +1504,11 @@ def doDescribeModelAccEngineVersions(args, parsed_globals):
|
|
1504
1504
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
1505
1505
|
client._sdkVersion += ("_CLI_" + __version__)
|
1506
1506
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1507
|
-
model = models.
|
1507
|
+
model = models.DescribeBatchTaskInstancesRequest()
|
1508
1508
|
model.from_json_string(json.dumps(args))
|
1509
1509
|
start_time = time.time()
|
1510
1510
|
while True:
|
1511
|
-
rsp = client.
|
1511
|
+
rsp = client.DescribeBatchTaskInstances(model)
|
1512
1512
|
result = rsp.to_json_string()
|
1513
1513
|
try:
|
1514
1514
|
json_obj = json.loads(result)
|
@@ -1527,7 +1527,7 @@ def doDescribeModelAccEngineVersions(args, parsed_globals):
|
|
1527
1527
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1528
1528
|
|
1529
1529
|
|
1530
|
-
def
|
1530
|
+
def doCreateNotebook(args, parsed_globals):
|
1531
1531
|
g_param = parse_global_arg(parsed_globals)
|
1532
1532
|
|
1533
1533
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1556,11 +1556,11 @@ def doStartTrainingTask(args, parsed_globals):
|
|
1556
1556
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
1557
1557
|
client._sdkVersion += ("_CLI_" + __version__)
|
1558
1558
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1559
|
-
model = models.
|
1559
|
+
model = models.CreateNotebookRequest()
|
1560
1560
|
model.from_json_string(json.dumps(args))
|
1561
1561
|
start_time = time.time()
|
1562
1562
|
while True:
|
1563
|
-
rsp = client.
|
1563
|
+
rsp = client.CreateNotebook(model)
|
1564
1564
|
result = rsp.to_json_string()
|
1565
1565
|
try:
|
1566
1566
|
json_obj = json.loads(result)
|
@@ -1579,7 +1579,7 @@ def doStartTrainingTask(args, parsed_globals):
|
|
1579
1579
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1580
1580
|
|
1581
1581
|
|
1582
|
-
def
|
1582
|
+
def doDescribeModelServiceGroup(args, parsed_globals):
|
1583
1583
|
g_param = parse_global_arg(parsed_globals)
|
1584
1584
|
|
1585
1585
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1608,11 +1608,11 @@ def doDeleteModelAccelerateTask(args, parsed_globals):
|
|
1608
1608
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
1609
1609
|
client._sdkVersion += ("_CLI_" + __version__)
|
1610
1610
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1611
|
-
model = models.
|
1611
|
+
model = models.DescribeModelServiceGroupRequest()
|
1612
1612
|
model.from_json_string(json.dumps(args))
|
1613
1613
|
start_time = time.time()
|
1614
1614
|
while True:
|
1615
|
-
rsp = client.
|
1615
|
+
rsp = client.DescribeModelServiceGroup(model)
|
1616
1616
|
result = rsp.to_json_string()
|
1617
1617
|
try:
|
1618
1618
|
json_obj = json.loads(result)
|
@@ -1631,7 +1631,7 @@ def doDeleteModelAccelerateTask(args, parsed_globals):
|
|
1631
1631
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1632
1632
|
|
1633
1633
|
|
1634
|
-
def
|
1634
|
+
def doDeleteNotebookInstance(args, parsed_globals):
|
1635
1635
|
g_param = parse_global_arg(parsed_globals)
|
1636
1636
|
|
1637
1637
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1660,11 +1660,11 @@ def doCreatePresignedNotebookInstanceUrl(args, parsed_globals):
|
|
1660
1660
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
1661
1661
|
client._sdkVersion += ("_CLI_" + __version__)
|
1662
1662
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1663
|
-
model = models.
|
1663
|
+
model = models.DeleteNotebookInstanceRequest()
|
1664
1664
|
model.from_json_string(json.dumps(args))
|
1665
1665
|
start_time = time.time()
|
1666
1666
|
while True:
|
1667
|
-
rsp = client.
|
1667
|
+
rsp = client.DeleteNotebookInstance(model)
|
1668
1668
|
result = rsp.to_json_string()
|
1669
1669
|
try:
|
1670
1670
|
json_obj = json.loads(result)
|
@@ -1683,7 +1683,7 @@ def doCreatePresignedNotebookInstanceUrl(args, parsed_globals):
|
|
1683
1683
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1684
1684
|
|
1685
1685
|
|
1686
|
-
def
|
1686
|
+
def doDescribeAPIConfigs(args, parsed_globals):
|
1687
1687
|
g_param = parse_global_arg(parsed_globals)
|
1688
1688
|
|
1689
1689
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1712,11 +1712,11 @@ def doDeleteNotebookInstance(args, parsed_globals):
|
|
1712
1712
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
1713
1713
|
client._sdkVersion += ("_CLI_" + __version__)
|
1714
1714
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1715
|
-
model = models.
|
1715
|
+
model = models.DescribeAPIConfigsRequest()
|
1716
1716
|
model.from_json_string(json.dumps(args))
|
1717
1717
|
start_time = time.time()
|
1718
1718
|
while True:
|
1719
|
-
rsp = client.
|
1719
|
+
rsp = client.DescribeAPIConfigs(model)
|
1720
1720
|
result = rsp.to_json_string()
|
1721
1721
|
try:
|
1722
1722
|
json_obj = json.loads(result)
|
@@ -1735,7 +1735,7 @@ def doDeleteNotebookInstance(args, parsed_globals):
|
|
1735
1735
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1736
1736
|
|
1737
1737
|
|
1738
|
-
def
|
1738
|
+
def doDescribeModelAccelerateTasks(args, parsed_globals):
|
1739
1739
|
g_param = parse_global_arg(parsed_globals)
|
1740
1740
|
|
1741
1741
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1764,11 +1764,11 @@ def doDescribeAPIConfigs(args, parsed_globals):
|
|
1764
1764
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
1765
1765
|
client._sdkVersion += ("_CLI_" + __version__)
|
1766
1766
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1767
|
-
model = models.
|
1767
|
+
model = models.DescribeModelAccelerateTasksRequest()
|
1768
1768
|
model.from_json_string(json.dumps(args))
|
1769
1769
|
start_time = time.time()
|
1770
1770
|
while True:
|
1771
|
-
rsp = client.
|
1771
|
+
rsp = client.DescribeModelAccelerateTasks(model)
|
1772
1772
|
result = rsp.to_json_string()
|
1773
1773
|
try:
|
1774
1774
|
json_obj = json.loads(result)
|
@@ -1787,7 +1787,7 @@ def doDescribeAPIConfigs(args, parsed_globals):
|
|
1787
1787
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1788
1788
|
|
1789
1789
|
|
1790
|
-
def
|
1790
|
+
def doStopTrainingTask(args, parsed_globals):
|
1791
1791
|
g_param = parse_global_arg(parsed_globals)
|
1792
1792
|
|
1793
1793
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1816,11 +1816,11 @@ def doDeleteModelServiceGroup(args, parsed_globals):
|
|
1816
1816
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
1817
1817
|
client._sdkVersion += ("_CLI_" + __version__)
|
1818
1818
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1819
|
-
model = models.
|
1819
|
+
model = models.StopTrainingTaskRequest()
|
1820
1820
|
model.from_json_string(json.dumps(args))
|
1821
1821
|
start_time = time.time()
|
1822
1822
|
while True:
|
1823
|
-
rsp = client.
|
1823
|
+
rsp = client.StopTrainingTask(model)
|
1824
1824
|
result = rsp.to_json_string()
|
1825
1825
|
try:
|
1826
1826
|
json_obj = json.loads(result)
|
@@ -1839,7 +1839,7 @@ def doDeleteModelServiceGroup(args, parsed_globals):
|
|
1839
1839
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1840
1840
|
|
1841
1841
|
|
1842
|
-
def
|
1842
|
+
def doDeleteNotebookImageRecord(args, parsed_globals):
|
1843
1843
|
g_param = parse_global_arg(parsed_globals)
|
1844
1844
|
|
1845
1845
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1868,11 +1868,11 @@ def doDescribeNotebookLifecycleScript(args, parsed_globals):
|
|
1868
1868
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
1869
1869
|
client._sdkVersion += ("_CLI_" + __version__)
|
1870
1870
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1871
|
-
model = models.
|
1871
|
+
model = models.DeleteNotebookImageRecordRequest()
|
1872
1872
|
model.from_json_string(json.dumps(args))
|
1873
1873
|
start_time = time.time()
|
1874
1874
|
while True:
|
1875
|
-
rsp = client.
|
1875
|
+
rsp = client.DeleteNotebookImageRecord(model)
|
1876
1876
|
result = rsp.to_json_string()
|
1877
1877
|
try:
|
1878
1878
|
json_obj = json.loads(result)
|
@@ -1891,7 +1891,7 @@ def doDescribeNotebookLifecycleScript(args, parsed_globals):
|
|
1891
1891
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1892
1892
|
|
1893
1893
|
|
1894
|
-
def
|
1894
|
+
def doCreateBatchTask(args, parsed_globals):
|
1895
1895
|
g_param = parse_global_arg(parsed_globals)
|
1896
1896
|
|
1897
1897
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1920,11 +1920,11 @@ def doPushTrainingMetrics(args, parsed_globals):
|
|
1920
1920
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
1921
1921
|
client._sdkVersion += ("_CLI_" + __version__)
|
1922
1922
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1923
|
-
model = models.
|
1923
|
+
model = models.CreateBatchTaskRequest()
|
1924
1924
|
model.from_json_string(json.dumps(args))
|
1925
1925
|
start_time = time.time()
|
1926
1926
|
while True:
|
1927
|
-
rsp = client.
|
1927
|
+
rsp = client.CreateBatchTask(model)
|
1928
1928
|
result = rsp.to_json_string()
|
1929
1929
|
try:
|
1930
1930
|
json_obj = json.loads(result)
|
@@ -1943,7 +1943,7 @@ def doPushTrainingMetrics(args, parsed_globals):
|
|
1943
1943
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1944
1944
|
|
1945
1945
|
|
1946
|
-
def
|
1946
|
+
def doDeleteCodeRepository(args, parsed_globals):
|
1947
1947
|
g_param = parse_global_arg(parsed_globals)
|
1948
1948
|
|
1949
1949
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1972,11 +1972,11 @@ def doDescribeBatchTasks(args, parsed_globals):
|
|
1972
1972
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
1973
1973
|
client._sdkVersion += ("_CLI_" + __version__)
|
1974
1974
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1975
|
-
model = models.
|
1975
|
+
model = models.DeleteCodeRepositoryRequest()
|
1976
1976
|
model.from_json_string(json.dumps(args))
|
1977
1977
|
start_time = time.time()
|
1978
1978
|
while True:
|
1979
|
-
rsp = client.
|
1979
|
+
rsp = client.DeleteCodeRepository(model)
|
1980
1980
|
result = rsp.to_json_string()
|
1981
1981
|
try:
|
1982
1982
|
json_obj = json.loads(result)
|
@@ -1995,7 +1995,7 @@ def doDescribeBatchTasks(args, parsed_globals):
|
|
1995
1995
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1996
1996
|
|
1997
1997
|
|
1998
|
-
def
|
1998
|
+
def doDescribeNotebookSummary(args, parsed_globals):
|
1999
1999
|
g_param = parse_global_arg(parsed_globals)
|
2000
2000
|
|
2001
2001
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2024,11 +2024,11 @@ def doDescribeTrainingModelVersions(args, parsed_globals):
|
|
2024
2024
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
2025
2025
|
client._sdkVersion += ("_CLI_" + __version__)
|
2026
2026
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2027
|
-
model = models.
|
2027
|
+
model = models.DescribeNotebookSummaryRequest()
|
2028
2028
|
model.from_json_string(json.dumps(args))
|
2029
2029
|
start_time = time.time()
|
2030
2030
|
while True:
|
2031
|
-
rsp = client.
|
2031
|
+
rsp = client.DescribeNotebookSummary(model)
|
2032
2032
|
result = rsp.to_json_string()
|
2033
2033
|
try:
|
2034
2034
|
json_obj = json.loads(result)
|
@@ -2047,7 +2047,7 @@ def doDescribeTrainingModelVersions(args, parsed_globals):
|
|
2047
2047
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2048
2048
|
|
2049
2049
|
|
2050
|
-
def
|
2050
|
+
def doDescribeNotebookInstance(args, parsed_globals):
|
2051
2051
|
g_param = parse_global_arg(parsed_globals)
|
2052
2052
|
|
2053
2053
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2076,11 +2076,11 @@ def doCreateCodeRepository(args, parsed_globals):
|
|
2076
2076
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
2077
2077
|
client._sdkVersion += ("_CLI_" + __version__)
|
2078
2078
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2079
|
-
model = models.
|
2079
|
+
model = models.DescribeNotebookInstanceRequest()
|
2080
2080
|
model.from_json_string(json.dumps(args))
|
2081
2081
|
start_time = time.time()
|
2082
2082
|
while True:
|
2083
|
-
rsp = client.
|
2083
|
+
rsp = client.DescribeNotebookInstance(model)
|
2084
2084
|
result = rsp.to_json_string()
|
2085
2085
|
try:
|
2086
2086
|
json_obj = json.loads(result)
|
@@ -2099,7 +2099,7 @@ def doCreateCodeRepository(args, parsed_globals):
|
|
2099
2099
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2100
2100
|
|
2101
2101
|
|
2102
|
-
def
|
2102
|
+
def doDescribeModelServiceHistory(args, parsed_globals):
|
2103
2103
|
g_param = parse_global_arg(parsed_globals)
|
2104
2104
|
|
2105
2105
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2128,11 +2128,11 @@ def doDescribeModelAccelerateTasks(args, parsed_globals):
|
|
2128
2128
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
2129
2129
|
client._sdkVersion += ("_CLI_" + __version__)
|
2130
2130
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2131
|
-
model = models.
|
2131
|
+
model = models.DescribeModelServiceHistoryRequest()
|
2132
2132
|
model.from_json_string(json.dumps(args))
|
2133
2133
|
start_time = time.time()
|
2134
2134
|
while True:
|
2135
|
-
rsp = client.
|
2135
|
+
rsp = client.DescribeModelServiceHistory(model)
|
2136
2136
|
result = rsp.to_json_string()
|
2137
2137
|
try:
|
2138
2138
|
json_obj = json.loads(result)
|
@@ -2151,7 +2151,7 @@ def doDescribeModelAccelerateTasks(args, parsed_globals):
|
|
2151
2151
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2152
2152
|
|
2153
2153
|
|
2154
|
-
def
|
2154
|
+
def doCreateTrainingJob(args, parsed_globals):
|
2155
2155
|
g_param = parse_global_arg(parsed_globals)
|
2156
2156
|
|
2157
2157
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2180,11 +2180,11 @@ def doCreateModelService(args, parsed_globals):
|
|
2180
2180
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
2181
2181
|
client._sdkVersion += ("_CLI_" + __version__)
|
2182
2182
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2183
|
-
model = models.
|
2183
|
+
model = models.CreateTrainingJobRequest()
|
2184
2184
|
model.from_json_string(json.dumps(args))
|
2185
2185
|
start_time = time.time()
|
2186
2186
|
while True:
|
2187
|
-
rsp = client.
|
2187
|
+
rsp = client.CreateTrainingJob(model)
|
2188
2188
|
result = rsp.to_json_string()
|
2189
2189
|
try:
|
2190
2190
|
json_obj = json.loads(result)
|
@@ -2203,7 +2203,7 @@ def doCreateModelService(args, parsed_globals):
|
|
2203
2203
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2204
2204
|
|
2205
2205
|
|
2206
|
-
def
|
2206
|
+
def doDescribeCodeRepositories(args, parsed_globals):
|
2207
2207
|
g_param = parse_global_arg(parsed_globals)
|
2208
2208
|
|
2209
2209
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2232,11 +2232,11 @@ def doUpdateNotebookLifecycleScript(args, parsed_globals):
|
|
2232
2232
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
2233
2233
|
client._sdkVersion += ("_CLI_" + __version__)
|
2234
2234
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2235
|
-
model = models.
|
2235
|
+
model = models.DescribeCodeRepositoriesRequest()
|
2236
2236
|
model.from_json_string(json.dumps(args))
|
2237
2237
|
start_time = time.time()
|
2238
2238
|
while True:
|
2239
|
-
rsp = client.
|
2239
|
+
rsp = client.DescribeCodeRepositories(model)
|
2240
2240
|
result = rsp.to_json_string()
|
2241
2241
|
try:
|
2242
2242
|
json_obj = json.loads(result)
|
@@ -2255,7 +2255,7 @@ def doUpdateNotebookLifecycleScript(args, parsed_globals):
|
|
2255
2255
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2256
2256
|
|
2257
2257
|
|
2258
|
-
def
|
2258
|
+
def doStopNotebook(args, parsed_globals):
|
2259
2259
|
g_param = parse_global_arg(parsed_globals)
|
2260
2260
|
|
2261
2261
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2284,11 +2284,11 @@ def doDescribeTrainingJob(args, parsed_globals):
|
|
2284
2284
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
2285
2285
|
client._sdkVersion += ("_CLI_" + __version__)
|
2286
2286
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2287
|
-
model = models.
|
2287
|
+
model = models.StopNotebookRequest()
|
2288
2288
|
model.from_json_string(json.dumps(args))
|
2289
2289
|
start_time = time.time()
|
2290
2290
|
while True:
|
2291
|
-
rsp = client.
|
2291
|
+
rsp = client.StopNotebook(model)
|
2292
2292
|
result = rsp.to_json_string()
|
2293
2293
|
try:
|
2294
2294
|
json_obj = json.loads(result)
|
@@ -2307,7 +2307,7 @@ def doDescribeTrainingJob(args, parsed_globals):
|
|
2307
2307
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2308
2308
|
|
2309
2309
|
|
2310
|
-
def
|
2310
|
+
def doDeleteBatchTask(args, parsed_globals):
|
2311
2311
|
g_param = parse_global_arg(parsed_globals)
|
2312
2312
|
|
2313
2313
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2336,11 +2336,11 @@ def doStopNotebookInstance(args, parsed_globals):
|
|
2336
2336
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
2337
2337
|
client._sdkVersion += ("_CLI_" + __version__)
|
2338
2338
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2339
|
-
model = models.
|
2339
|
+
model = models.DeleteBatchTaskRequest()
|
2340
2340
|
model.from_json_string(json.dumps(args))
|
2341
2341
|
start_time = time.time()
|
2342
2342
|
while True:
|
2343
|
-
rsp = client.
|
2343
|
+
rsp = client.DeleteBatchTask(model)
|
2344
2344
|
result = rsp.to_json_string()
|
2345
2345
|
try:
|
2346
2346
|
json_obj = json.loads(result)
|
@@ -2359,7 +2359,7 @@ def doStopNotebookInstance(args, parsed_globals):
|
|
2359
2359
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2360
2360
|
|
2361
2361
|
|
2362
|
-
def
|
2362
|
+
def doDescribeModelServiceCallInfo(args, parsed_globals):
|
2363
2363
|
g_param = parse_global_arg(parsed_globals)
|
2364
2364
|
|
2365
2365
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2388,11 +2388,11 @@ def doStopTrainingTask(args, parsed_globals):
|
|
2388
2388
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
2389
2389
|
client._sdkVersion += ("_CLI_" + __version__)
|
2390
2390
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2391
|
-
model = models.
|
2391
|
+
model = models.DescribeModelServiceCallInfoRequest()
|
2392
2392
|
model.from_json_string(json.dumps(args))
|
2393
2393
|
start_time = time.time()
|
2394
2394
|
while True:
|
2395
|
-
rsp = client.
|
2395
|
+
rsp = client.DescribeModelServiceCallInfo(model)
|
2396
2396
|
result = rsp.to_json_string()
|
2397
2397
|
try:
|
2398
2398
|
json_obj = json.loads(result)
|
@@ -2411,7 +2411,7 @@ def doStopTrainingTask(args, parsed_globals):
|
|
2411
2411
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2412
2412
|
|
2413
2413
|
|
2414
|
-
def
|
2414
|
+
def doDescribeTrainingTasks(args, parsed_globals):
|
2415
2415
|
g_param = parse_global_arg(parsed_globals)
|
2416
2416
|
|
2417
2417
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2440,11 +2440,11 @@ def doDescribeLogs(args, parsed_globals):
|
|
2440
2440
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
2441
2441
|
client._sdkVersion += ("_CLI_" + __version__)
|
2442
2442
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2443
|
-
model = models.
|
2443
|
+
model = models.DescribeTrainingTasksRequest()
|
2444
2444
|
model.from_json_string(json.dumps(args))
|
2445
2445
|
start_time = time.time()
|
2446
2446
|
while True:
|
2447
|
-
rsp = client.
|
2447
|
+
rsp = client.DescribeTrainingTasks(model)
|
2448
2448
|
result = rsp.to_json_string()
|
2449
2449
|
try:
|
2450
2450
|
json_obj = json.loads(result)
|
@@ -2463,7 +2463,7 @@ def doDescribeLogs(args, parsed_globals):
|
|
2463
2463
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2464
2464
|
|
2465
2465
|
|
2466
|
-
def
|
2466
|
+
def doStartNotebook(args, parsed_globals):
|
2467
2467
|
g_param = parse_global_arg(parsed_globals)
|
2468
2468
|
|
2469
2469
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2492,11 +2492,11 @@ def doDeleteModelService(args, parsed_globals):
|
|
2492
2492
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
2493
2493
|
client._sdkVersion += ("_CLI_" + __version__)
|
2494
2494
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2495
|
-
model = models.
|
2495
|
+
model = models.StartNotebookRequest()
|
2496
2496
|
model.from_json_string(json.dumps(args))
|
2497
2497
|
start_time = time.time()
|
2498
2498
|
while True:
|
2499
|
-
rsp = client.
|
2499
|
+
rsp = client.StartNotebook(model)
|
2500
2500
|
result = rsp.to_json_string()
|
2501
2501
|
try:
|
2502
2502
|
json_obj = json.loads(result)
|
@@ -2515,7 +2515,7 @@ def doDeleteModelService(args, parsed_globals):
|
|
2515
2515
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2516
2516
|
|
2517
2517
|
|
2518
|
-
def
|
2518
|
+
def doDescribeTrainingModels(args, parsed_globals):
|
2519
2519
|
g_param = parse_global_arg(parsed_globals)
|
2520
2520
|
|
2521
2521
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2544,11 +2544,11 @@ def doDescribeDatasets(args, parsed_globals):
|
|
2544
2544
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
2545
2545
|
client._sdkVersion += ("_CLI_" + __version__)
|
2546
2546
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2547
|
-
model = models.
|
2547
|
+
model = models.DescribeTrainingModelsRequest()
|
2548
2548
|
model.from_json_string(json.dumps(args))
|
2549
2549
|
start_time = time.time()
|
2550
2550
|
while True:
|
2551
|
-
rsp = client.
|
2551
|
+
rsp = client.DescribeTrainingModels(model)
|
2552
2552
|
result = rsp.to_json_string()
|
2553
2553
|
try:
|
2554
2554
|
json_obj = json.loads(result)
|
@@ -2567,7 +2567,7 @@ def doDescribeDatasets(args, parsed_globals):
|
|
2567
2567
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2568
2568
|
|
2569
2569
|
|
2570
|
-
def
|
2570
|
+
def doDescribeTrainingMetrics(args, parsed_globals):
|
2571
2571
|
g_param = parse_global_arg(parsed_globals)
|
2572
2572
|
|
2573
2573
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2596,11 +2596,11 @@ def doRestartModelAccelerateTask(args, parsed_globals):
|
|
2596
2596
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
2597
2597
|
client._sdkVersion += ("_CLI_" + __version__)
|
2598
2598
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2599
|
-
model = models.
|
2599
|
+
model = models.DescribeTrainingMetricsRequest()
|
2600
2600
|
model.from_json_string(json.dumps(args))
|
2601
2601
|
start_time = time.time()
|
2602
2602
|
while True:
|
2603
|
-
rsp = client.
|
2603
|
+
rsp = client.DescribeTrainingMetrics(model)
|
2604
2604
|
result = rsp.to_json_string()
|
2605
2605
|
try:
|
2606
2606
|
json_obj = json.loads(result)
|
@@ -2619,7 +2619,7 @@ def doRestartModelAccelerateTask(args, parsed_globals):
|
|
2619
2619
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2620
2620
|
|
2621
2621
|
|
2622
|
-
def
|
2622
|
+
def doDeleteTrainingModel(args, parsed_globals):
|
2623
2623
|
g_param = parse_global_arg(parsed_globals)
|
2624
2624
|
|
2625
2625
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2648,11 +2648,11 @@ def doCreateNotebookInstance(args, parsed_globals):
|
|
2648
2648
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
2649
2649
|
client._sdkVersion += ("_CLI_" + __version__)
|
2650
2650
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2651
|
-
model = models.
|
2651
|
+
model = models.DeleteTrainingModelRequest()
|
2652
2652
|
model.from_json_string(json.dumps(args))
|
2653
2653
|
start_time = time.time()
|
2654
2654
|
while True:
|
2655
|
-
rsp = client.
|
2655
|
+
rsp = client.DeleteTrainingModel(model)
|
2656
2656
|
result = rsp.to_json_string()
|
2657
2657
|
try:
|
2658
2658
|
json_obj = json.loads(result)
|
@@ -2671,7 +2671,7 @@ def doCreateNotebookInstance(args, parsed_globals):
|
|
2671
2671
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2672
2672
|
|
2673
2673
|
|
2674
|
-
def
|
2674
|
+
def doStartTrainingTask(args, parsed_globals):
|
2675
2675
|
g_param = parse_global_arg(parsed_globals)
|
2676
2676
|
|
2677
2677
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2700,11 +2700,11 @@ def doDescribeCodeRepository(args, parsed_globals):
|
|
2700
2700
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
2701
2701
|
client._sdkVersion += ("_CLI_" + __version__)
|
2702
2702
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2703
|
-
model = models.
|
2703
|
+
model = models.StartTrainingTaskRequest()
|
2704
2704
|
model.from_json_string(json.dumps(args))
|
2705
2705
|
start_time = time.time()
|
2706
2706
|
while True:
|
2707
|
-
rsp = client.
|
2707
|
+
rsp = client.StartTrainingTask(model)
|
2708
2708
|
result = rsp.to_json_string()
|
2709
2709
|
try:
|
2710
2710
|
json_obj = json.loads(result)
|
@@ -2723,7 +2723,7 @@ def doDescribeCodeRepository(args, parsed_globals):
|
|
2723
2723
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2724
2724
|
|
2725
2725
|
|
2726
|
-
def
|
2726
|
+
def doCreatePresignedNotebookInstanceUrl(args, parsed_globals):
|
2727
2727
|
g_param = parse_global_arg(parsed_globals)
|
2728
2728
|
|
2729
2729
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2752,11 +2752,11 @@ def doDescribeModelServices(args, parsed_globals):
|
|
2752
2752
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
2753
2753
|
client._sdkVersion += ("_CLI_" + __version__)
|
2754
2754
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2755
|
-
model = models.
|
2755
|
+
model = models.CreatePresignedNotebookInstanceUrlRequest()
|
2756
2756
|
model.from_json_string(json.dumps(args))
|
2757
2757
|
start_time = time.time()
|
2758
2758
|
while True:
|
2759
|
-
rsp = client.
|
2759
|
+
rsp = client.CreatePresignedNotebookInstanceUrl(model)
|
2760
2760
|
result = rsp.to_json_string()
|
2761
2761
|
try:
|
2762
2762
|
json_obj = json.loads(result)
|
@@ -2775,7 +2775,7 @@ def doDescribeModelServices(args, parsed_globals):
|
|
2775
2775
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2776
2776
|
|
2777
2777
|
|
2778
|
-
def
|
2778
|
+
def doCreateDataset(args, parsed_globals):
|
2779
2779
|
g_param = parse_global_arg(parsed_globals)
|
2780
2780
|
|
2781
2781
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2804,11 +2804,11 @@ def doModifyModelService(args, parsed_globals):
|
|
2804
2804
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
2805
2805
|
client._sdkVersion += ("_CLI_" + __version__)
|
2806
2806
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2807
|
-
model = models.
|
2807
|
+
model = models.CreateDatasetRequest()
|
2808
2808
|
model.from_json_string(json.dumps(args))
|
2809
2809
|
start_time = time.time()
|
2810
2810
|
while True:
|
2811
|
-
rsp = client.
|
2811
|
+
rsp = client.CreateDataset(model)
|
2812
2812
|
result = rsp.to_json_string()
|
2813
2813
|
try:
|
2814
2814
|
json_obj = json.loads(result)
|
@@ -2827,7 +2827,7 @@ def doModifyModelService(args, parsed_globals):
|
|
2827
2827
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2828
2828
|
|
2829
2829
|
|
2830
|
-
def
|
2830
|
+
def doPushTrainingMetrics(args, parsed_globals):
|
2831
2831
|
g_param = parse_global_arg(parsed_globals)
|
2832
2832
|
|
2833
2833
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2856,11 +2856,11 @@ def doDescribeTrainingTask(args, parsed_globals):
|
|
2856
2856
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
2857
2857
|
client._sdkVersion += ("_CLI_" + __version__)
|
2858
2858
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2859
|
-
model = models.
|
2859
|
+
model = models.PushTrainingMetricsRequest()
|
2860
2860
|
model.from_json_string(json.dumps(args))
|
2861
2861
|
start_time = time.time()
|
2862
2862
|
while True:
|
2863
|
-
rsp = client.
|
2863
|
+
rsp = client.PushTrainingMetrics(model)
|
2864
2864
|
result = rsp.to_json_string()
|
2865
2865
|
try:
|
2866
2866
|
json_obj = json.loads(result)
|
@@ -2879,7 +2879,7 @@ def doDescribeTrainingTask(args, parsed_globals):
|
|
2879
2879
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2880
2880
|
|
2881
2881
|
|
2882
|
-
def
|
2882
|
+
def doDescribeTrainingModelVersions(args, parsed_globals):
|
2883
2883
|
g_param = parse_global_arg(parsed_globals)
|
2884
2884
|
|
2885
2885
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2908,11 +2908,11 @@ def doDescribeNotebookInstances(args, parsed_globals):
|
|
2908
2908
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
2909
2909
|
client._sdkVersion += ("_CLI_" + __version__)
|
2910
2910
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2911
|
-
model = models.
|
2911
|
+
model = models.DescribeTrainingModelVersionsRequest()
|
2912
2912
|
model.from_json_string(json.dumps(args))
|
2913
2913
|
start_time = time.time()
|
2914
2914
|
while True:
|
2915
|
-
rsp = client.
|
2915
|
+
rsp = client.DescribeTrainingModelVersions(model)
|
2916
2916
|
result = rsp.to_json_string()
|
2917
2917
|
try:
|
2918
2918
|
json_obj = json.loads(result)
|
@@ -2931,7 +2931,7 @@ def doDescribeNotebookInstances(args, parsed_globals):
|
|
2931
2931
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2932
2932
|
|
2933
2933
|
|
2934
|
-
def
|
2934
|
+
def doCreateModelService(args, parsed_globals):
|
2935
2935
|
g_param = parse_global_arg(parsed_globals)
|
2936
2936
|
|
2937
2937
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2960,11 +2960,11 @@ def doCreateBatchTask(args, parsed_globals):
|
|
2960
2960
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
2961
2961
|
client._sdkVersion += ("_CLI_" + __version__)
|
2962
2962
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2963
|
-
model = models.
|
2963
|
+
model = models.CreateModelServiceRequest()
|
2964
2964
|
model.from_json_string(json.dumps(args))
|
2965
2965
|
start_time = time.time()
|
2966
2966
|
while True:
|
2967
|
-
rsp = client.
|
2967
|
+
rsp = client.CreateModelService(model)
|
2968
2968
|
result = rsp.to_json_string()
|
2969
2969
|
try:
|
2970
2970
|
json_obj = json.loads(result)
|
@@ -2983,7 +2983,7 @@ def doCreateBatchTask(args, parsed_globals):
|
|
2983
2983
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2984
2984
|
|
2985
2985
|
|
2986
|
-
def
|
2986
|
+
def doStopNotebookInstance(args, parsed_globals):
|
2987
2987
|
g_param = parse_global_arg(parsed_globals)
|
2988
2988
|
|
2989
2989
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3012,11 +3012,11 @@ def doDeleteTrainingTask(args, parsed_globals):
|
|
3012
3012
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
3013
3013
|
client._sdkVersion += ("_CLI_" + __version__)
|
3014
3014
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3015
|
-
model = models.
|
3015
|
+
model = models.StopNotebookInstanceRequest()
|
3016
3016
|
model.from_json_string(json.dumps(args))
|
3017
3017
|
start_time = time.time()
|
3018
3018
|
while True:
|
3019
|
-
rsp = client.
|
3019
|
+
rsp = client.StopNotebookInstance(model)
|
3020
3020
|
result = rsp.to_json_string()
|
3021
3021
|
try:
|
3022
3022
|
json_obj = json.loads(result)
|
@@ -3035,7 +3035,7 @@ def doDeleteTrainingTask(args, parsed_globals):
|
|
3035
3035
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3036
3036
|
|
3037
3037
|
|
3038
|
-
def
|
3038
|
+
def doDescribeLogs(args, parsed_globals):
|
3039
3039
|
g_param = parse_global_arg(parsed_globals)
|
3040
3040
|
|
3041
3041
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3064,11 +3064,11 @@ def doCreateNotebookLifecycleScript(args, parsed_globals):
|
|
3064
3064
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
3065
3065
|
client._sdkVersion += ("_CLI_" + __version__)
|
3066
3066
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3067
|
-
model = models.
|
3067
|
+
model = models.DescribeLogsRequest()
|
3068
3068
|
model.from_json_string(json.dumps(args))
|
3069
3069
|
start_time = time.time()
|
3070
3070
|
while True:
|
3071
|
-
rsp = client.
|
3071
|
+
rsp = client.DescribeLogs(model)
|
3072
3072
|
result = rsp.to_json_string()
|
3073
3073
|
try:
|
3074
3074
|
json_obj = json.loads(result)
|
@@ -3087,7 +3087,7 @@ def doCreateNotebookLifecycleScript(args, parsed_globals):
|
|
3087
3087
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3088
3088
|
|
3089
3089
|
|
3090
|
-
def
|
3090
|
+
def doDescribeDatasets(args, parsed_globals):
|
3091
3091
|
g_param = parse_global_arg(parsed_globals)
|
3092
3092
|
|
3093
3093
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3116,11 +3116,11 @@ def doCreateBatchModelAccTasks(args, parsed_globals):
|
|
3116
3116
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
3117
3117
|
client._sdkVersion += ("_CLI_" + __version__)
|
3118
3118
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3119
|
-
model = models.
|
3119
|
+
model = models.DescribeDatasetsRequest()
|
3120
3120
|
model.from_json_string(json.dumps(args))
|
3121
3121
|
start_time = time.time()
|
3122
3122
|
while True:
|
3123
|
-
rsp = client.
|
3123
|
+
rsp = client.DescribeDatasets(model)
|
3124
3124
|
result = rsp.to_json_string()
|
3125
3125
|
try:
|
3126
3126
|
json_obj = json.loads(result)
|
@@ -3139,7 +3139,7 @@ def doCreateBatchModelAccTasks(args, parsed_globals):
|
|
3139
3139
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3140
3140
|
|
3141
3141
|
|
3142
|
-
def
|
3142
|
+
def doRestartModelAccelerateTask(args, parsed_globals):
|
3143
3143
|
g_param = parse_global_arg(parsed_globals)
|
3144
3144
|
|
3145
3145
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3168,11 +3168,11 @@ def doDeleteCodeRepository(args, parsed_globals):
|
|
3168
3168
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
3169
3169
|
client._sdkVersion += ("_CLI_" + __version__)
|
3170
3170
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3171
|
-
model = models.
|
3171
|
+
model = models.RestartModelAccelerateTaskRequest()
|
3172
3172
|
model.from_json_string(json.dumps(args))
|
3173
3173
|
start_time = time.time()
|
3174
3174
|
while True:
|
3175
|
-
rsp = client.
|
3175
|
+
rsp = client.RestartModelAccelerateTask(model)
|
3176
3176
|
result = rsp.to_json_string()
|
3177
3177
|
try:
|
3178
3178
|
json_obj = json.loads(result)
|
@@ -3191,7 +3191,7 @@ def doDeleteCodeRepository(args, parsed_globals):
|
|
3191
3191
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3192
3192
|
|
3193
3193
|
|
3194
|
-
def
|
3194
|
+
def doModifyModelService(args, parsed_globals):
|
3195
3195
|
g_param = parse_global_arg(parsed_globals)
|
3196
3196
|
|
3197
3197
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3220,11 +3220,11 @@ def doDescribeBatchTask(args, parsed_globals):
|
|
3220
3220
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
3221
3221
|
client._sdkVersion += ("_CLI_" + __version__)
|
3222
3222
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3223
|
-
model = models.
|
3223
|
+
model = models.ModifyModelServiceRequest()
|
3224
3224
|
model.from_json_string(json.dumps(args))
|
3225
3225
|
start_time = time.time()
|
3226
3226
|
while True:
|
3227
|
-
rsp = client.
|
3227
|
+
rsp = client.ModifyModelService(model)
|
3228
3228
|
result = rsp.to_json_string()
|
3229
3229
|
try:
|
3230
3230
|
json_obj = json.loads(result)
|
@@ -3243,7 +3243,7 @@ def doDescribeBatchTask(args, parsed_globals):
|
|
3243
3243
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3244
3244
|
|
3245
3245
|
|
3246
|
-
def
|
3246
|
+
def doDescribeCodeRepository(args, parsed_globals):
|
3247
3247
|
g_param = parse_global_arg(parsed_globals)
|
3248
3248
|
|
3249
3249
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3272,11 +3272,11 @@ def doDescribeTrainingJobs(args, parsed_globals):
|
|
3272
3272
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
3273
3273
|
client._sdkVersion += ("_CLI_" + __version__)
|
3274
3274
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3275
|
-
model = models.
|
3275
|
+
model = models.DescribeCodeRepositoryRequest()
|
3276
3276
|
model.from_json_string(json.dumps(args))
|
3277
3277
|
start_time = time.time()
|
3278
3278
|
while True:
|
3279
|
-
rsp = client.
|
3279
|
+
rsp = client.DescribeCodeRepository(model)
|
3280
3280
|
result = rsp.to_json_string()
|
3281
3281
|
try:
|
3282
3282
|
json_obj = json.loads(result)
|
@@ -3295,7 +3295,7 @@ def doDescribeTrainingJobs(args, parsed_globals):
|
|
3295
3295
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3296
3296
|
|
3297
3297
|
|
3298
|
-
def
|
3298
|
+
def doStopCreatingImage(args, parsed_globals):
|
3299
3299
|
g_param = parse_global_arg(parsed_globals)
|
3300
3300
|
|
3301
3301
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3324,11 +3324,11 @@ def doDeleteNotebookLifecycleScript(args, parsed_globals):
|
|
3324
3324
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
3325
3325
|
client._sdkVersion += ("_CLI_" + __version__)
|
3326
3326
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3327
|
-
model = models.
|
3327
|
+
model = models.StopCreatingImageRequest()
|
3328
3328
|
model.from_json_string(json.dumps(args))
|
3329
3329
|
start_time = time.time()
|
3330
3330
|
while True:
|
3331
|
-
rsp = client.
|
3331
|
+
rsp = client.StopCreatingImage(model)
|
3332
3332
|
result = rsp.to_json_string()
|
3333
3333
|
try:
|
3334
3334
|
json_obj = json.loads(result)
|
@@ -3347,7 +3347,7 @@ def doDeleteNotebookLifecycleScript(args, parsed_globals):
|
|
3347
3347
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3348
3348
|
|
3349
3349
|
|
3350
|
-
def
|
3350
|
+
def doCreateNotebookLifecycleScript(args, parsed_globals):
|
3351
3351
|
g_param = parse_global_arg(parsed_globals)
|
3352
3352
|
|
3353
3353
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3376,11 +3376,11 @@ def doStopTrainingJob(args, parsed_globals):
|
|
3376
3376
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
3377
3377
|
client._sdkVersion += ("_CLI_" + __version__)
|
3378
3378
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3379
|
-
model = models.
|
3379
|
+
model = models.CreateNotebookLifecycleScriptRequest()
|
3380
3380
|
model.from_json_string(json.dumps(args))
|
3381
3381
|
start_time = time.time()
|
3382
3382
|
while True:
|
3383
|
-
rsp = client.
|
3383
|
+
rsp = client.CreateNotebookLifecycleScript(model)
|
3384
3384
|
result = rsp.to_json_string()
|
3385
3385
|
try:
|
3386
3386
|
json_obj = json.loads(result)
|
@@ -3451,7 +3451,7 @@ def doDescribeLatestTrainingMetrics(args, parsed_globals):
|
|
3451
3451
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3452
3452
|
|
3453
3453
|
|
3454
|
-
def
|
3454
|
+
def doModifyNotebook(args, parsed_globals):
|
3455
3455
|
g_param = parse_global_arg(parsed_globals)
|
3456
3456
|
|
3457
3457
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3480,11 +3480,11 @@ def doDescribeNotebookInstance(args, parsed_globals):
|
|
3480
3480
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
3481
3481
|
client._sdkVersion += ("_CLI_" + __version__)
|
3482
3482
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3483
|
-
model = models.
|
3483
|
+
model = models.ModifyNotebookRequest()
|
3484
3484
|
model.from_json_string(json.dumps(args))
|
3485
3485
|
start_time = time.time()
|
3486
3486
|
while True:
|
3487
|
-
rsp = client.
|
3487
|
+
rsp = client.ModifyNotebook(model)
|
3488
3488
|
result = rsp.to_json_string()
|
3489
3489
|
try:
|
3490
3490
|
json_obj = json.loads(result)
|
@@ -3503,7 +3503,7 @@ def doDescribeNotebookInstance(args, parsed_globals):
|
|
3503
3503
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3504
3504
|
|
3505
3505
|
|
3506
|
-
def
|
3506
|
+
def doDescribeBillingResourceGroups(args, parsed_globals):
|
3507
3507
|
g_param = parse_global_arg(parsed_globals)
|
3508
3508
|
|
3509
3509
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3532,11 +3532,11 @@ def doDescribeModelServiceHistory(args, parsed_globals):
|
|
3532
3532
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
3533
3533
|
client._sdkVersion += ("_CLI_" + __version__)
|
3534
3534
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3535
|
-
model = models.
|
3535
|
+
model = models.DescribeBillingResourceGroupsRequest()
|
3536
3536
|
model.from_json_string(json.dumps(args))
|
3537
3537
|
start_time = time.time()
|
3538
3538
|
while True:
|
3539
|
-
rsp = client.
|
3539
|
+
rsp = client.DescribeBillingResourceGroups(model)
|
3540
3540
|
result = rsp.to_json_string()
|
3541
3541
|
try:
|
3542
3542
|
json_obj = json.loads(result)
|
@@ -3555,7 +3555,7 @@ def doDescribeModelServiceHistory(args, parsed_globals):
|
|
3555
3555
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3556
3556
|
|
3557
3557
|
|
3558
|
-
def
|
3558
|
+
def doDescribeModelServiceGroups(args, parsed_globals):
|
3559
3559
|
g_param = parse_global_arg(parsed_globals)
|
3560
3560
|
|
3561
3561
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3584,11 +3584,11 @@ def doDeleteTrainingModelVersion(args, parsed_globals):
|
|
3584
3584
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
3585
3585
|
client._sdkVersion += ("_CLI_" + __version__)
|
3586
3586
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3587
|
-
model = models.
|
3587
|
+
model = models.DescribeModelServiceGroupsRequest()
|
3588
3588
|
model.from_json_string(json.dumps(args))
|
3589
3589
|
start_time = time.time()
|
3590
3590
|
while True:
|
3591
|
-
rsp = client.
|
3591
|
+
rsp = client.DescribeModelServiceGroups(model)
|
3592
3592
|
result = rsp.to_json_string()
|
3593
3593
|
try:
|
3594
3594
|
json_obj = json.loads(result)
|
@@ -3607,7 +3607,7 @@ def doDeleteTrainingModelVersion(args, parsed_globals):
|
|
3607
3607
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3608
3608
|
|
3609
3609
|
|
3610
|
-
def
|
3610
|
+
def doModifyModelServicePartialConfig(args, parsed_globals):
|
3611
3611
|
g_param = parse_global_arg(parsed_globals)
|
3612
3612
|
|
3613
3613
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3636,11 +3636,11 @@ def doDescribeBillingResourceGroups(args, parsed_globals):
|
|
3636
3636
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
3637
3637
|
client._sdkVersion += ("_CLI_" + __version__)
|
3638
3638
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3639
|
-
model = models.
|
3639
|
+
model = models.ModifyModelServicePartialConfigRequest()
|
3640
3640
|
model.from_json_string(json.dumps(args))
|
3641
3641
|
start_time = time.time()
|
3642
3642
|
while True:
|
3643
|
-
rsp = client.
|
3643
|
+
rsp = client.ModifyModelServicePartialConfig(model)
|
3644
3644
|
result = rsp.to_json_string()
|
3645
3645
|
try:
|
3646
3646
|
json_obj = json.loads(result)
|
@@ -3659,7 +3659,7 @@ def doDescribeBillingResourceGroups(args, parsed_globals):
|
|
3659
3659
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3660
3660
|
|
3661
3661
|
|
3662
|
-
def
|
3662
|
+
def doUpdateNotebookInstance(args, parsed_globals):
|
3663
3663
|
g_param = parse_global_arg(parsed_globals)
|
3664
3664
|
|
3665
3665
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3688,11 +3688,11 @@ def doDescribeInferTemplates(args, parsed_globals):
|
|
3688
3688
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
3689
3689
|
client._sdkVersion += ("_CLI_" + __version__)
|
3690
3690
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3691
|
-
model = models.
|
3691
|
+
model = models.UpdateNotebookInstanceRequest()
|
3692
3692
|
model.from_json_string(json.dumps(args))
|
3693
3693
|
start_time = time.time()
|
3694
3694
|
while True:
|
3695
|
-
rsp = client.
|
3695
|
+
rsp = client.UpdateNotebookInstance(model)
|
3696
3696
|
result = rsp.to_json_string()
|
3697
3697
|
try:
|
3698
3698
|
json_obj = json.loads(result)
|
@@ -3711,7 +3711,7 @@ def doDescribeInferTemplates(args, parsed_globals):
|
|
3711
3711
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3712
3712
|
|
3713
3713
|
|
3714
|
-
def
|
3714
|
+
def doDescribeTrainingFrameworks(args, parsed_globals):
|
3715
3715
|
g_param = parse_global_arg(parsed_globals)
|
3716
3716
|
|
3717
3717
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3740,11 +3740,11 @@ def doDescribeModelServiceGroups(args, parsed_globals):
|
|
3740
3740
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
3741
3741
|
client._sdkVersion += ("_CLI_" + __version__)
|
3742
3742
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3743
|
-
model = models.
|
3743
|
+
model = models.DescribeTrainingFrameworksRequest()
|
3744
3744
|
model.from_json_string(json.dumps(args))
|
3745
3745
|
start_time = time.time()
|
3746
3746
|
while True:
|
3747
|
-
rsp = client.
|
3747
|
+
rsp = client.DescribeTrainingFrameworks(model)
|
3748
3748
|
result = rsp.to_json_string()
|
3749
3749
|
try:
|
3750
3750
|
json_obj = json.loads(result)
|
@@ -3763,7 +3763,7 @@ def doDescribeModelServiceGroups(args, parsed_globals):
|
|
3763
3763
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3764
3764
|
|
3765
3765
|
|
3766
|
-
def
|
3766
|
+
def doDeleteDataset(args, parsed_globals):
|
3767
3767
|
g_param = parse_global_arg(parsed_globals)
|
3768
3768
|
|
3769
3769
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3792,11 +3792,11 @@ def doCreateTrainingJob(args, parsed_globals):
|
|
3792
3792
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
3793
3793
|
client._sdkVersion += ("_CLI_" + __version__)
|
3794
3794
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3795
|
-
model = models.
|
3795
|
+
model = models.DeleteDatasetRequest()
|
3796
3796
|
model.from_json_string(json.dumps(args))
|
3797
3797
|
start_time = time.time()
|
3798
3798
|
while True:
|
3799
|
-
rsp = client.
|
3799
|
+
rsp = client.DeleteDataset(model)
|
3800
3800
|
result = rsp.to_json_string()
|
3801
3801
|
try:
|
3802
3802
|
json_obj = json.loads(result)
|
@@ -3815,7 +3815,7 @@ def doCreateTrainingJob(args, parsed_globals):
|
|
3815
3815
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3816
3816
|
|
3817
3817
|
|
3818
|
-
def
|
3818
|
+
def doCreateTrainingTask(args, parsed_globals):
|
3819
3819
|
g_param = parse_global_arg(parsed_globals)
|
3820
3820
|
|
3821
3821
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3844,11 +3844,11 @@ def doDescribeCodeRepositories(args, parsed_globals):
|
|
3844
3844
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
3845
3845
|
client._sdkVersion += ("_CLI_" + __version__)
|
3846
3846
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3847
|
-
model = models.
|
3847
|
+
model = models.CreateTrainingTaskRequest()
|
3848
3848
|
model.from_json_string(json.dumps(args))
|
3849
3849
|
start_time = time.time()
|
3850
3850
|
while True:
|
3851
|
-
rsp = client.
|
3851
|
+
rsp = client.CreateTrainingTask(model)
|
3852
3852
|
result = rsp.to_json_string()
|
3853
3853
|
try:
|
3854
3854
|
json_obj = json.loads(result)
|
@@ -3867,7 +3867,7 @@ def doDescribeCodeRepositories(args, parsed_globals):
|
|
3867
3867
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3868
3868
|
|
3869
3869
|
|
3870
|
-
def
|
3870
|
+
def doStartNotebookInstance(args, parsed_globals):
|
3871
3871
|
g_param = parse_global_arg(parsed_globals)
|
3872
3872
|
|
3873
3873
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3896,11 +3896,11 @@ def doStopModelAccelerateTask(args, parsed_globals):
|
|
3896
3896
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
3897
3897
|
client._sdkVersion += ("_CLI_" + __version__)
|
3898
3898
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3899
|
-
model = models.
|
3899
|
+
model = models.StartNotebookInstanceRequest()
|
3900
3900
|
model.from_json_string(json.dumps(args))
|
3901
3901
|
start_time = time.time()
|
3902
3902
|
while True:
|
3903
|
-
rsp = client.
|
3903
|
+
rsp = client.StartNotebookInstance(model)
|
3904
3904
|
result = rsp.to_json_string()
|
3905
3905
|
try:
|
3906
3906
|
json_obj = json.loads(result)
|
@@ -3919,7 +3919,7 @@ def doStopModelAccelerateTask(args, parsed_globals):
|
|
3919
3919
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3920
3920
|
|
3921
3921
|
|
3922
|
-
def
|
3922
|
+
def doDescribeTrainingTaskPods(args, parsed_globals):
|
3923
3923
|
g_param = parse_global_arg(parsed_globals)
|
3924
3924
|
|
3925
3925
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3948,11 +3948,11 @@ def doDescribeDatasetDetailStructured(args, parsed_globals):
|
|
3948
3948
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
3949
3949
|
client._sdkVersion += ("_CLI_" + __version__)
|
3950
3950
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3951
|
-
model = models.
|
3951
|
+
model = models.DescribeTrainingTaskPodsRequest()
|
3952
3952
|
model.from_json_string(json.dumps(args))
|
3953
3953
|
start_time = time.time()
|
3954
3954
|
while True:
|
3955
|
-
rsp = client.
|
3955
|
+
rsp = client.DescribeTrainingTaskPods(model)
|
3956
3956
|
result = rsp.to_json_string()
|
3957
3957
|
try:
|
3958
3958
|
json_obj = json.loads(result)
|
@@ -3971,7 +3971,7 @@ def doDescribeDatasetDetailStructured(args, parsed_globals):
|
|
3971
3971
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3972
3972
|
|
3973
3973
|
|
3974
|
-
def
|
3974
|
+
def doDescribeModelServiceHotUpdated(args, parsed_globals):
|
3975
3975
|
g_param = parse_global_arg(parsed_globals)
|
3976
3976
|
|
3977
3977
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -4000,11 +4000,11 @@ def doStartNotebookInstance(args, parsed_globals):
|
|
4000
4000
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
4001
4001
|
client._sdkVersion += ("_CLI_" + __version__)
|
4002
4002
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
4003
|
-
model = models.
|
4003
|
+
model = models.DescribeModelServiceHotUpdatedRequest()
|
4004
4004
|
model.from_json_string(json.dumps(args))
|
4005
4005
|
start_time = time.time()
|
4006
4006
|
while True:
|
4007
|
-
rsp = client.
|
4007
|
+
rsp = client.DescribeModelServiceHotUpdated(model)
|
4008
4008
|
result = rsp.to_json_string()
|
4009
4009
|
try:
|
4010
4010
|
json_obj = json.loads(result)
|
@@ -4023,7 +4023,7 @@ def doStartNotebookInstance(args, parsed_globals):
|
|
4023
4023
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4024
4024
|
|
4025
4025
|
|
4026
|
-
def
|
4026
|
+
def doModifyServiceGroupWeights(args, parsed_globals):
|
4027
4027
|
g_param = parse_global_arg(parsed_globals)
|
4028
4028
|
|
4029
4029
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -4052,11 +4052,11 @@ def doDescribeNotebookSummary(args, parsed_globals):
|
|
4052
4052
|
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
4053
4053
|
client._sdkVersion += ("_CLI_" + __version__)
|
4054
4054
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
4055
|
-
model = models.
|
4055
|
+
model = models.ModifyServiceGroupWeightsRequest()
|
4056
4056
|
model.from_json_string(json.dumps(args))
|
4057
4057
|
start_time = time.time()
|
4058
4058
|
while True:
|
4059
|
-
rsp = client.
|
4059
|
+
rsp = client.ModifyServiceGroupWeights(model)
|
4060
4060
|
result = rsp.to_json_string()
|
4061
4061
|
try:
|
4062
4062
|
json_obj = json.loads(result)
|
@@ -4075,97 +4075,786 @@ def doDescribeNotebookSummary(args, parsed_globals):
|
|
4075
4075
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4076
4076
|
|
4077
4077
|
|
4078
|
-
|
4079
|
-
|
4080
|
-
"v20191022": tione_client_v20191022,
|
4078
|
+
def doDescribeModelAccEngineVersions(args, parsed_globals):
|
4079
|
+
g_param = parse_global_arg(parsed_globals)
|
4081
4080
|
|
4082
|
-
|
4081
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
4082
|
+
cred = credential.CVMRoleCredential()
|
4083
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
4084
|
+
cred = credential.STSAssumeRoleCredential(
|
4085
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
4086
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
4087
|
+
)
|
4088
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
4089
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
4090
|
+
else:
|
4091
|
+
cred = credential.Credential(
|
4092
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
4093
|
+
)
|
4094
|
+
http_profile = HttpProfile(
|
4095
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
4096
|
+
reqMethod="POST",
|
4097
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
4098
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
4099
|
+
)
|
4100
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
4101
|
+
if g_param[OptionsDefine.Language]:
|
4102
|
+
profile.language = g_param[OptionsDefine.Language]
|
4103
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
4104
|
+
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
4105
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
4106
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
4107
|
+
model = models.DescribeModelAccEngineVersionsRequest()
|
4108
|
+
model.from_json_string(json.dumps(args))
|
4109
|
+
start_time = time.time()
|
4110
|
+
while True:
|
4111
|
+
rsp = client.DescribeModelAccEngineVersions(model)
|
4112
|
+
result = rsp.to_json_string()
|
4113
|
+
try:
|
4114
|
+
json_obj = json.loads(result)
|
4115
|
+
except TypeError as e:
|
4116
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
4117
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
4118
|
+
break
|
4119
|
+
cur_time = time.time()
|
4120
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
4121
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
4122
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
4123
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
4124
|
+
else:
|
4125
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
4126
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
4127
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4083
4128
|
|
4084
|
-
MODELS_MAP = {
|
4085
|
-
"v20211111": models_v20211111,
|
4086
|
-
"v20191022": models_v20191022,
|
4087
4129
|
|
4088
|
-
|
4130
|
+
def doDescribeNotebookLifecycleScript(args, parsed_globals):
|
4131
|
+
g_param = parse_global_arg(parsed_globals)
|
4089
4132
|
|
4090
|
-
|
4091
|
-
|
4092
|
-
|
4093
|
-
|
4094
|
-
|
4095
|
-
|
4096
|
-
|
4097
|
-
|
4098
|
-
|
4099
|
-
|
4100
|
-
|
4101
|
-
|
4102
|
-
|
4103
|
-
|
4104
|
-
|
4105
|
-
|
4106
|
-
|
4107
|
-
|
4108
|
-
|
4109
|
-
"
|
4110
|
-
|
4111
|
-
|
4112
|
-
|
4113
|
-
|
4114
|
-
"
|
4115
|
-
|
4116
|
-
|
4117
|
-
|
4118
|
-
|
4119
|
-
|
4120
|
-
|
4121
|
-
|
4122
|
-
|
4123
|
-
|
4124
|
-
|
4125
|
-
|
4126
|
-
|
4127
|
-
|
4133
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
4134
|
+
cred = credential.CVMRoleCredential()
|
4135
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
4136
|
+
cred = credential.STSAssumeRoleCredential(
|
4137
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
4138
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
4139
|
+
)
|
4140
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
4141
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
4142
|
+
else:
|
4143
|
+
cred = credential.Credential(
|
4144
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
4145
|
+
)
|
4146
|
+
http_profile = HttpProfile(
|
4147
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
4148
|
+
reqMethod="POST",
|
4149
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
4150
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
4151
|
+
)
|
4152
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
4153
|
+
if g_param[OptionsDefine.Language]:
|
4154
|
+
profile.language = g_param[OptionsDefine.Language]
|
4155
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
4156
|
+
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
4157
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
4158
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
4159
|
+
model = models.DescribeNotebookLifecycleScriptRequest()
|
4160
|
+
model.from_json_string(json.dumps(args))
|
4161
|
+
start_time = time.time()
|
4162
|
+
while True:
|
4163
|
+
rsp = client.DescribeNotebookLifecycleScript(model)
|
4164
|
+
result = rsp.to_json_string()
|
4165
|
+
try:
|
4166
|
+
json_obj = json.loads(result)
|
4167
|
+
except TypeError as e:
|
4168
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
4169
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
4170
|
+
break
|
4171
|
+
cur_time = time.time()
|
4172
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
4173
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
4174
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
4175
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
4176
|
+
else:
|
4177
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
4178
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
4179
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4180
|
+
|
4181
|
+
|
4182
|
+
def doCreateNotebookImage(args, parsed_globals):
|
4183
|
+
g_param = parse_global_arg(parsed_globals)
|
4184
|
+
|
4185
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
4186
|
+
cred = credential.CVMRoleCredential()
|
4187
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
4188
|
+
cred = credential.STSAssumeRoleCredential(
|
4189
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
4190
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
4191
|
+
)
|
4192
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
4193
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
4194
|
+
else:
|
4195
|
+
cred = credential.Credential(
|
4196
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
4197
|
+
)
|
4198
|
+
http_profile = HttpProfile(
|
4199
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
4200
|
+
reqMethod="POST",
|
4201
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
4202
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
4203
|
+
)
|
4204
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
4205
|
+
if g_param[OptionsDefine.Language]:
|
4206
|
+
profile.language = g_param[OptionsDefine.Language]
|
4207
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
4208
|
+
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
4209
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
4210
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
4211
|
+
model = models.CreateNotebookImageRequest()
|
4212
|
+
model.from_json_string(json.dumps(args))
|
4213
|
+
start_time = time.time()
|
4214
|
+
while True:
|
4215
|
+
rsp = client.CreateNotebookImage(model)
|
4216
|
+
result = rsp.to_json_string()
|
4217
|
+
try:
|
4218
|
+
json_obj = json.loads(result)
|
4219
|
+
except TypeError as e:
|
4220
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
4221
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
4222
|
+
break
|
4223
|
+
cur_time = time.time()
|
4224
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
4225
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
4226
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
4227
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
4228
|
+
else:
|
4229
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
4230
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
4231
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4232
|
+
|
4233
|
+
|
4234
|
+
def doUpdateNotebookLifecycleScript(args, parsed_globals):
|
4235
|
+
g_param = parse_global_arg(parsed_globals)
|
4236
|
+
|
4237
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
4238
|
+
cred = credential.CVMRoleCredential()
|
4239
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
4240
|
+
cred = credential.STSAssumeRoleCredential(
|
4241
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
4242
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
4243
|
+
)
|
4244
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
4245
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
4246
|
+
else:
|
4247
|
+
cred = credential.Credential(
|
4248
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
4249
|
+
)
|
4250
|
+
http_profile = HttpProfile(
|
4251
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
4252
|
+
reqMethod="POST",
|
4253
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
4254
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
4255
|
+
)
|
4256
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
4257
|
+
if g_param[OptionsDefine.Language]:
|
4258
|
+
profile.language = g_param[OptionsDefine.Language]
|
4259
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
4260
|
+
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
4261
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
4262
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
4263
|
+
model = models.UpdateNotebookLifecycleScriptRequest()
|
4264
|
+
model.from_json_string(json.dumps(args))
|
4265
|
+
start_time = time.time()
|
4266
|
+
while True:
|
4267
|
+
rsp = client.UpdateNotebookLifecycleScript(model)
|
4268
|
+
result = rsp.to_json_string()
|
4269
|
+
try:
|
4270
|
+
json_obj = json.loads(result)
|
4271
|
+
except TypeError as e:
|
4272
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
4273
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
4274
|
+
break
|
4275
|
+
cur_time = time.time()
|
4276
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
4277
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
4278
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
4279
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
4280
|
+
else:
|
4281
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
4282
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
4283
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4284
|
+
|
4285
|
+
|
4286
|
+
def doDescribeTrainingJob(args, parsed_globals):
|
4287
|
+
g_param = parse_global_arg(parsed_globals)
|
4288
|
+
|
4289
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
4290
|
+
cred = credential.CVMRoleCredential()
|
4291
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
4292
|
+
cred = credential.STSAssumeRoleCredential(
|
4293
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
4294
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
4295
|
+
)
|
4296
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
4297
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
4298
|
+
else:
|
4299
|
+
cred = credential.Credential(
|
4300
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
4301
|
+
)
|
4302
|
+
http_profile = HttpProfile(
|
4303
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
4304
|
+
reqMethod="POST",
|
4305
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
4306
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
4307
|
+
)
|
4308
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
4309
|
+
if g_param[OptionsDefine.Language]:
|
4310
|
+
profile.language = g_param[OptionsDefine.Language]
|
4311
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
4312
|
+
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
4313
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
4314
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
4315
|
+
model = models.DescribeTrainingJobRequest()
|
4316
|
+
model.from_json_string(json.dumps(args))
|
4317
|
+
start_time = time.time()
|
4318
|
+
while True:
|
4319
|
+
rsp = client.DescribeTrainingJob(model)
|
4320
|
+
result = rsp.to_json_string()
|
4321
|
+
try:
|
4322
|
+
json_obj = json.loads(result)
|
4323
|
+
except TypeError as e:
|
4324
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
4325
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
4326
|
+
break
|
4327
|
+
cur_time = time.time()
|
4328
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
4329
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
4330
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
4331
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
4332
|
+
else:
|
4333
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
4334
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
4335
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4336
|
+
|
4337
|
+
|
4338
|
+
def doDeleteModelService(args, parsed_globals):
|
4339
|
+
g_param = parse_global_arg(parsed_globals)
|
4340
|
+
|
4341
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
4342
|
+
cred = credential.CVMRoleCredential()
|
4343
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
4344
|
+
cred = credential.STSAssumeRoleCredential(
|
4345
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
4346
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
4347
|
+
)
|
4348
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
4349
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
4350
|
+
else:
|
4351
|
+
cred = credential.Credential(
|
4352
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
4353
|
+
)
|
4354
|
+
http_profile = HttpProfile(
|
4355
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
4356
|
+
reqMethod="POST",
|
4357
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
4358
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
4359
|
+
)
|
4360
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
4361
|
+
if g_param[OptionsDefine.Language]:
|
4362
|
+
profile.language = g_param[OptionsDefine.Language]
|
4363
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
4364
|
+
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
4365
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
4366
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
4367
|
+
model = models.DeleteModelServiceRequest()
|
4368
|
+
model.from_json_string(json.dumps(args))
|
4369
|
+
start_time = time.time()
|
4370
|
+
while True:
|
4371
|
+
rsp = client.DeleteModelService(model)
|
4372
|
+
result = rsp.to_json_string()
|
4373
|
+
try:
|
4374
|
+
json_obj = json.loads(result)
|
4375
|
+
except TypeError as e:
|
4376
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
4377
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
4378
|
+
break
|
4379
|
+
cur_time = time.time()
|
4380
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
4381
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
4382
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
4383
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
4384
|
+
else:
|
4385
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
4386
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
4387
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4388
|
+
|
4389
|
+
|
4390
|
+
def doDescribeDatasetDetailStructured(args, parsed_globals):
|
4391
|
+
g_param = parse_global_arg(parsed_globals)
|
4392
|
+
|
4393
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
4394
|
+
cred = credential.CVMRoleCredential()
|
4395
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
4396
|
+
cred = credential.STSAssumeRoleCredential(
|
4397
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
4398
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
4399
|
+
)
|
4400
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
4401
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
4402
|
+
else:
|
4403
|
+
cred = credential.Credential(
|
4404
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
4405
|
+
)
|
4406
|
+
http_profile = HttpProfile(
|
4407
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
4408
|
+
reqMethod="POST",
|
4409
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
4410
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
4411
|
+
)
|
4412
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
4413
|
+
if g_param[OptionsDefine.Language]:
|
4414
|
+
profile.language = g_param[OptionsDefine.Language]
|
4415
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
4416
|
+
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
4417
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
4418
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
4419
|
+
model = models.DescribeDatasetDetailStructuredRequest()
|
4420
|
+
model.from_json_string(json.dumps(args))
|
4421
|
+
start_time = time.time()
|
4422
|
+
while True:
|
4423
|
+
rsp = client.DescribeDatasetDetailStructured(model)
|
4424
|
+
result = rsp.to_json_string()
|
4425
|
+
try:
|
4426
|
+
json_obj = json.loads(result)
|
4427
|
+
except TypeError as e:
|
4428
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
4429
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
4430
|
+
break
|
4431
|
+
cur_time = time.time()
|
4432
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
4433
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
4434
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
4435
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
4436
|
+
else:
|
4437
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
4438
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
4439
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4440
|
+
|
4441
|
+
|
4442
|
+
def doDeleteTrainingTask(args, parsed_globals):
|
4443
|
+
g_param = parse_global_arg(parsed_globals)
|
4444
|
+
|
4445
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
4446
|
+
cred = credential.CVMRoleCredential()
|
4447
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
4448
|
+
cred = credential.STSAssumeRoleCredential(
|
4449
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
4450
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
4451
|
+
)
|
4452
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
4453
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
4454
|
+
else:
|
4455
|
+
cred = credential.Credential(
|
4456
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
4457
|
+
)
|
4458
|
+
http_profile = HttpProfile(
|
4459
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
4460
|
+
reqMethod="POST",
|
4461
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
4462
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
4463
|
+
)
|
4464
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
4465
|
+
if g_param[OptionsDefine.Language]:
|
4466
|
+
profile.language = g_param[OptionsDefine.Language]
|
4467
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
4468
|
+
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
4469
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
4470
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
4471
|
+
model = models.DeleteTrainingTaskRequest()
|
4472
|
+
model.from_json_string(json.dumps(args))
|
4473
|
+
start_time = time.time()
|
4474
|
+
while True:
|
4475
|
+
rsp = client.DeleteTrainingTask(model)
|
4476
|
+
result = rsp.to_json_string()
|
4477
|
+
try:
|
4478
|
+
json_obj = json.loads(result)
|
4479
|
+
except TypeError as e:
|
4480
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
4481
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
4482
|
+
break
|
4483
|
+
cur_time = time.time()
|
4484
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
4485
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
4486
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
4487
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
4488
|
+
else:
|
4489
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
4490
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
4491
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4492
|
+
|
4493
|
+
|
4494
|
+
def doDescribeNotebookImageRecords(args, parsed_globals):
|
4495
|
+
g_param = parse_global_arg(parsed_globals)
|
4496
|
+
|
4497
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
4498
|
+
cred = credential.CVMRoleCredential()
|
4499
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
4500
|
+
cred = credential.STSAssumeRoleCredential(
|
4501
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
4502
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
4503
|
+
)
|
4504
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
4505
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
4506
|
+
else:
|
4507
|
+
cred = credential.Credential(
|
4508
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
4509
|
+
)
|
4510
|
+
http_profile = HttpProfile(
|
4511
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
4512
|
+
reqMethod="POST",
|
4513
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
4514
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
4515
|
+
)
|
4516
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
4517
|
+
if g_param[OptionsDefine.Language]:
|
4518
|
+
profile.language = g_param[OptionsDefine.Language]
|
4519
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
4520
|
+
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
4521
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
4522
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
4523
|
+
model = models.DescribeNotebookImageRecordsRequest()
|
4524
|
+
model.from_json_string(json.dumps(args))
|
4525
|
+
start_time = time.time()
|
4526
|
+
while True:
|
4527
|
+
rsp = client.DescribeNotebookImageRecords(model)
|
4528
|
+
result = rsp.to_json_string()
|
4529
|
+
try:
|
4530
|
+
json_obj = json.loads(result)
|
4531
|
+
except TypeError as e:
|
4532
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
4533
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
4534
|
+
break
|
4535
|
+
cur_time = time.time()
|
4536
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
4537
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
4538
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
4539
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
4540
|
+
else:
|
4541
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
4542
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
4543
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4544
|
+
|
4545
|
+
|
4546
|
+
def doCreateBatchModelAccTasks(args, parsed_globals):
|
4547
|
+
g_param = parse_global_arg(parsed_globals)
|
4548
|
+
|
4549
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
4550
|
+
cred = credential.CVMRoleCredential()
|
4551
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
4552
|
+
cred = credential.STSAssumeRoleCredential(
|
4553
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
4554
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
4555
|
+
)
|
4556
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
4557
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
4558
|
+
else:
|
4559
|
+
cred = credential.Credential(
|
4560
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
4561
|
+
)
|
4562
|
+
http_profile = HttpProfile(
|
4563
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
4564
|
+
reqMethod="POST",
|
4565
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
4566
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
4567
|
+
)
|
4568
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
4569
|
+
if g_param[OptionsDefine.Language]:
|
4570
|
+
profile.language = g_param[OptionsDefine.Language]
|
4571
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
4572
|
+
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
4573
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
4574
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
4575
|
+
model = models.CreateBatchModelAccTasksRequest()
|
4576
|
+
model.from_json_string(json.dumps(args))
|
4577
|
+
start_time = time.time()
|
4578
|
+
while True:
|
4579
|
+
rsp = client.CreateBatchModelAccTasks(model)
|
4580
|
+
result = rsp.to_json_string()
|
4581
|
+
try:
|
4582
|
+
json_obj = json.loads(result)
|
4583
|
+
except TypeError as e:
|
4584
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
4585
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
4586
|
+
break
|
4587
|
+
cur_time = time.time()
|
4588
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
4589
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
4590
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
4591
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
4592
|
+
else:
|
4593
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
4594
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
4595
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4596
|
+
|
4597
|
+
|
4598
|
+
def doDescribeBatchTask(args, parsed_globals):
|
4599
|
+
g_param = parse_global_arg(parsed_globals)
|
4600
|
+
|
4601
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
4602
|
+
cred = credential.CVMRoleCredential()
|
4603
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
4604
|
+
cred = credential.STSAssumeRoleCredential(
|
4605
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
4606
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
4607
|
+
)
|
4608
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
4609
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
4610
|
+
else:
|
4611
|
+
cred = credential.Credential(
|
4612
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
4613
|
+
)
|
4614
|
+
http_profile = HttpProfile(
|
4615
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
4616
|
+
reqMethod="POST",
|
4617
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
4618
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
4619
|
+
)
|
4620
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
4621
|
+
if g_param[OptionsDefine.Language]:
|
4622
|
+
profile.language = g_param[OptionsDefine.Language]
|
4623
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
4624
|
+
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
4625
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
4626
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
4627
|
+
model = models.DescribeBatchTaskRequest()
|
4628
|
+
model.from_json_string(json.dumps(args))
|
4629
|
+
start_time = time.time()
|
4630
|
+
while True:
|
4631
|
+
rsp = client.DescribeBatchTask(model)
|
4632
|
+
result = rsp.to_json_string()
|
4633
|
+
try:
|
4634
|
+
json_obj = json.loads(result)
|
4635
|
+
except TypeError as e:
|
4636
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
4637
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
4638
|
+
break
|
4639
|
+
cur_time = time.time()
|
4640
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
4641
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
4642
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
4643
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
4644
|
+
else:
|
4645
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
4646
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
4647
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4648
|
+
|
4649
|
+
|
4650
|
+
def doDeleteTrainingModelVersion(args, parsed_globals):
|
4651
|
+
g_param = parse_global_arg(parsed_globals)
|
4652
|
+
|
4653
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
4654
|
+
cred = credential.CVMRoleCredential()
|
4655
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
4656
|
+
cred = credential.STSAssumeRoleCredential(
|
4657
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
4658
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
4659
|
+
)
|
4660
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
4661
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
4662
|
+
else:
|
4663
|
+
cred = credential.Credential(
|
4664
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
4665
|
+
)
|
4666
|
+
http_profile = HttpProfile(
|
4667
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
4668
|
+
reqMethod="POST",
|
4669
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
4670
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
4671
|
+
)
|
4672
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
4673
|
+
if g_param[OptionsDefine.Language]:
|
4674
|
+
profile.language = g_param[OptionsDefine.Language]
|
4675
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
4676
|
+
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
4677
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
4678
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
4679
|
+
model = models.DeleteTrainingModelVersionRequest()
|
4680
|
+
model.from_json_string(json.dumps(args))
|
4681
|
+
start_time = time.time()
|
4682
|
+
while True:
|
4683
|
+
rsp = client.DeleteTrainingModelVersion(model)
|
4684
|
+
result = rsp.to_json_string()
|
4685
|
+
try:
|
4686
|
+
json_obj = json.loads(result)
|
4687
|
+
except TypeError as e:
|
4688
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
4689
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
4690
|
+
break
|
4691
|
+
cur_time = time.time()
|
4692
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
4693
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
4694
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
4695
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
4696
|
+
else:
|
4697
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
4698
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
4699
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4700
|
+
|
4701
|
+
|
4702
|
+
def doDescribeInferTemplates(args, parsed_globals):
|
4703
|
+
g_param = parse_global_arg(parsed_globals)
|
4704
|
+
|
4705
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
4706
|
+
cred = credential.CVMRoleCredential()
|
4707
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
4708
|
+
cred = credential.STSAssumeRoleCredential(
|
4709
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
4710
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
4711
|
+
)
|
4712
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
4713
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
4714
|
+
else:
|
4715
|
+
cred = credential.Credential(
|
4716
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
4717
|
+
)
|
4718
|
+
http_profile = HttpProfile(
|
4719
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
4720
|
+
reqMethod="POST",
|
4721
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
4722
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
4723
|
+
)
|
4724
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
4725
|
+
if g_param[OptionsDefine.Language]:
|
4726
|
+
profile.language = g_param[OptionsDefine.Language]
|
4727
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
4728
|
+
client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
|
4729
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
4730
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
4731
|
+
model = models.DescribeInferTemplatesRequest()
|
4732
|
+
model.from_json_string(json.dumps(args))
|
4733
|
+
start_time = time.time()
|
4734
|
+
while True:
|
4735
|
+
rsp = client.DescribeInferTemplates(model)
|
4736
|
+
result = rsp.to_json_string()
|
4737
|
+
try:
|
4738
|
+
json_obj = json.loads(result)
|
4739
|
+
except TypeError as e:
|
4740
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
4741
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
4742
|
+
break
|
4743
|
+
cur_time = time.time()
|
4744
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
4745
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
4746
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
4747
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
4748
|
+
else:
|
4749
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
4750
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
4751
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4752
|
+
|
4753
|
+
|
4754
|
+
CLIENT_MAP = {
|
4755
|
+
"v20211111": tione_client_v20211111,
|
4756
|
+
"v20191022": tione_client_v20191022,
|
4757
|
+
|
4758
|
+
}
|
4759
|
+
|
4760
|
+
MODELS_MAP = {
|
4761
|
+
"v20211111": models_v20211111,
|
4762
|
+
"v20191022": models_v20191022,
|
4763
|
+
|
4764
|
+
}
|
4765
|
+
|
4766
|
+
ACTION_MAP = {
|
4767
|
+
"DescribeTrainingModelVersion": doDescribeTrainingModelVersion,
|
4768
|
+
"DescribeModelService": doDescribeModelService,
|
4769
|
+
"DescribeBillingSpecs": doDescribeBillingSpecs,
|
4770
|
+
"DeleteModelAccelerateTask": doDeleteModelAccelerateTask,
|
4771
|
+
"DescribeNotebooks": doDescribeNotebooks,
|
4772
|
+
"DescribeDatasetDetailUnstructured": doDescribeDatasetDetailUnstructured,
|
4773
|
+
"DeleteNotebook": doDeleteNotebook,
|
4774
|
+
"DescribeTrainingTask": doDescribeTrainingTask,
|
4775
|
+
"DeleteModelServiceGroup": doDeleteModelServiceGroup,
|
4128
4776
|
"DescribeBatchTasks": doDescribeBatchTasks,
|
4129
|
-
"DescribeTrainingModelVersions": doDescribeTrainingModelVersions,
|
4130
4777
|
"CreateCodeRepository": doCreateCodeRepository,
|
4778
|
+
"CreateNotebookInstance": doCreateNotebookInstance,
|
4779
|
+
"DescribeTrainingJobs": doDescribeTrainingJobs,
|
4780
|
+
"StopModelAccelerateTask": doStopModelAccelerateTask,
|
4781
|
+
"DescribeModelServices": doDescribeModelServices,
|
4782
|
+
"DeleteNotebookLifecycleScript": doDeleteNotebookLifecycleScript,
|
4783
|
+
"DescribeNotebookImageKernels": doDescribeNotebookImageKernels,
|
4784
|
+
"DescribeNotebook": doDescribeNotebook,
|
4785
|
+
"UpdateCodeRepository": doUpdateCodeRepository,
|
4786
|
+
"DescribeNotebookInstances": doDescribeNotebookInstances,
|
4787
|
+
"StopTrainingJob": doStopTrainingJob,
|
4788
|
+
"CreateTrainingModel": doCreateTrainingModel,
|
4789
|
+
"DescribeBillingSpecsPrice": doDescribeBillingSpecsPrice,
|
4790
|
+
"CreateOptimizedModel": doCreateOptimizedModel,
|
4791
|
+
"DescribeNotebookLifecycleScripts": doDescribeNotebookLifecycleScripts,
|
4792
|
+
"StopBatchTask": doStopBatchTask,
|
4793
|
+
"DescribeModelAccelerateTask": doDescribeModelAccelerateTask,
|
4794
|
+
"ModifyNotebookTags": doModifyNotebookTags,
|
4795
|
+
"DescribeBatchTaskInstances": doDescribeBatchTaskInstances,
|
4796
|
+
"CreateNotebook": doCreateNotebook,
|
4797
|
+
"DescribeModelServiceGroup": doDescribeModelServiceGroup,
|
4798
|
+
"DeleteNotebookInstance": doDeleteNotebookInstance,
|
4799
|
+
"DescribeAPIConfigs": doDescribeAPIConfigs,
|
4131
4800
|
"DescribeModelAccelerateTasks": doDescribeModelAccelerateTasks,
|
4801
|
+
"StopTrainingTask": doStopTrainingTask,
|
4802
|
+
"DeleteNotebookImageRecord": doDeleteNotebookImageRecord,
|
4803
|
+
"CreateBatchTask": doCreateBatchTask,
|
4804
|
+
"DeleteCodeRepository": doDeleteCodeRepository,
|
4805
|
+
"DescribeNotebookSummary": doDescribeNotebookSummary,
|
4806
|
+
"DescribeNotebookInstance": doDescribeNotebookInstance,
|
4807
|
+
"DescribeModelServiceHistory": doDescribeModelServiceHistory,
|
4808
|
+
"CreateTrainingJob": doCreateTrainingJob,
|
4809
|
+
"DescribeCodeRepositories": doDescribeCodeRepositories,
|
4810
|
+
"StopNotebook": doStopNotebook,
|
4811
|
+
"DeleteBatchTask": doDeleteBatchTask,
|
4812
|
+
"DescribeModelServiceCallInfo": doDescribeModelServiceCallInfo,
|
4813
|
+
"DescribeTrainingTasks": doDescribeTrainingTasks,
|
4814
|
+
"StartNotebook": doStartNotebook,
|
4815
|
+
"DescribeTrainingModels": doDescribeTrainingModels,
|
4816
|
+
"DescribeTrainingMetrics": doDescribeTrainingMetrics,
|
4817
|
+
"DeleteTrainingModel": doDeleteTrainingModel,
|
4818
|
+
"StartTrainingTask": doStartTrainingTask,
|
4819
|
+
"CreatePresignedNotebookInstanceUrl": doCreatePresignedNotebookInstanceUrl,
|
4820
|
+
"CreateDataset": doCreateDataset,
|
4821
|
+
"PushTrainingMetrics": doPushTrainingMetrics,
|
4822
|
+
"DescribeTrainingModelVersions": doDescribeTrainingModelVersions,
|
4132
4823
|
"CreateModelService": doCreateModelService,
|
4133
|
-
"UpdateNotebookLifecycleScript": doUpdateNotebookLifecycleScript,
|
4134
|
-
"DescribeTrainingJob": doDescribeTrainingJob,
|
4135
4824
|
"StopNotebookInstance": doStopNotebookInstance,
|
4136
|
-
"StopTrainingTask": doStopTrainingTask,
|
4137
4825
|
"DescribeLogs": doDescribeLogs,
|
4138
|
-
"DeleteModelService": doDeleteModelService,
|
4139
4826
|
"DescribeDatasets": doDescribeDatasets,
|
4140
4827
|
"RestartModelAccelerateTask": doRestartModelAccelerateTask,
|
4141
|
-
"CreateNotebookInstance": doCreateNotebookInstance,
|
4142
|
-
"DescribeCodeRepository": doDescribeCodeRepository,
|
4143
|
-
"DescribeModelServices": doDescribeModelServices,
|
4144
4828
|
"ModifyModelService": doModifyModelService,
|
4145
|
-
"
|
4146
|
-
"
|
4147
|
-
"CreateBatchTask": doCreateBatchTask,
|
4148
|
-
"DeleteTrainingTask": doDeleteTrainingTask,
|
4829
|
+
"DescribeCodeRepository": doDescribeCodeRepository,
|
4830
|
+
"StopCreatingImage": doStopCreatingImage,
|
4149
4831
|
"CreateNotebookLifecycleScript": doCreateNotebookLifecycleScript,
|
4150
|
-
"CreateBatchModelAccTasks": doCreateBatchModelAccTasks,
|
4151
|
-
"DeleteCodeRepository": doDeleteCodeRepository,
|
4152
|
-
"DescribeBatchTask": doDescribeBatchTask,
|
4153
|
-
"DescribeTrainingJobs": doDescribeTrainingJobs,
|
4154
|
-
"DeleteNotebookLifecycleScript": doDeleteNotebookLifecycleScript,
|
4155
|
-
"StopTrainingJob": doStopTrainingJob,
|
4156
4832
|
"DescribeLatestTrainingMetrics": doDescribeLatestTrainingMetrics,
|
4157
|
-
"
|
4158
|
-
"DescribeModelServiceHistory": doDescribeModelServiceHistory,
|
4159
|
-
"DeleteTrainingModelVersion": doDeleteTrainingModelVersion,
|
4833
|
+
"ModifyNotebook": doModifyNotebook,
|
4160
4834
|
"DescribeBillingResourceGroups": doDescribeBillingResourceGroups,
|
4161
|
-
"DescribeInferTemplates": doDescribeInferTemplates,
|
4162
4835
|
"DescribeModelServiceGroups": doDescribeModelServiceGroups,
|
4163
|
-
"
|
4164
|
-
"
|
4165
|
-
"
|
4166
|
-
"
|
4836
|
+
"ModifyModelServicePartialConfig": doModifyModelServicePartialConfig,
|
4837
|
+
"UpdateNotebookInstance": doUpdateNotebookInstance,
|
4838
|
+
"DescribeTrainingFrameworks": doDescribeTrainingFrameworks,
|
4839
|
+
"DeleteDataset": doDeleteDataset,
|
4840
|
+
"CreateTrainingTask": doCreateTrainingTask,
|
4167
4841
|
"StartNotebookInstance": doStartNotebookInstance,
|
4168
|
-
"
|
4842
|
+
"DescribeTrainingTaskPods": doDescribeTrainingTaskPods,
|
4843
|
+
"DescribeModelServiceHotUpdated": doDescribeModelServiceHotUpdated,
|
4844
|
+
"ModifyServiceGroupWeights": doModifyServiceGroupWeights,
|
4845
|
+
"DescribeModelAccEngineVersions": doDescribeModelAccEngineVersions,
|
4846
|
+
"DescribeNotebookLifecycleScript": doDescribeNotebookLifecycleScript,
|
4847
|
+
"CreateNotebookImage": doCreateNotebookImage,
|
4848
|
+
"UpdateNotebookLifecycleScript": doUpdateNotebookLifecycleScript,
|
4849
|
+
"DescribeTrainingJob": doDescribeTrainingJob,
|
4850
|
+
"DeleteModelService": doDeleteModelService,
|
4851
|
+
"DescribeDatasetDetailStructured": doDescribeDatasetDetailStructured,
|
4852
|
+
"DeleteTrainingTask": doDeleteTrainingTask,
|
4853
|
+
"DescribeNotebookImageRecords": doDescribeNotebookImageRecords,
|
4854
|
+
"CreateBatchModelAccTasks": doCreateBatchModelAccTasks,
|
4855
|
+
"DescribeBatchTask": doDescribeBatchTask,
|
4856
|
+
"DeleteTrainingModelVersion": doDeleteTrainingModelVersion,
|
4857
|
+
"DescribeInferTemplates": doDescribeInferTemplates,
|
4169
4858
|
|
4170
4859
|
}
|
4171
4860
|
|