@@ -233,42 +233,29 @@ def init_vscode(**kwargs):
233
233
type = click .Choice (["api_key" , "resource_principal" ]),
234
234
default = None ,
235
235
),
236
+ ]
237
+
238
+ _model_deployment_options = [
236
239
click .option (
237
240
"--wait-for-completion" ,
238
- help = "either to wait for process to complete or not" ,
241
+ help = "either to wait for process to complete or not for model deployment " ,
239
242
is_flag = True ,
240
243
required = False ,
241
244
),
242
245
click .option (
243
246
"--max-wait-time" ,
244
- help = "maximum wait time in seconds for progress to complete" ,
247
+ help = "maximum wait time in seconds for progress to complete for model deployment " ,
245
248
type = int ,
246
249
required = False ,
247
250
default = 1200 ,
248
251
),
249
252
click .option (
250
253
"--poll-interval" ,
251
- help = "poll interval in seconds" ,
254
+ help = "poll interval in seconds for model deployment " ,
252
255
type = int ,
253
256
required = False ,
254
257
default = 10 ,
255
258
),
256
- click .option (
257
- "--log-type" , help = "the type of logging." , required = False , default = None
258
- ),
259
- click .option (
260
- "--log-filter" ,
261
- help = "expression for filtering the logs." ,
262
- required = False ,
263
- default = None ,
264
- ),
265
- click .option (
266
- "--interval" ,
267
- help = "log interval in seconds" ,
268
- type = int ,
269
- required = False ,
270
- default = 3 ,
271
- ),
272
259
]
273
260
274
261
@@ -464,21 +451,46 @@ def init_operator(**kwargs):
464
451
465
452
@commands .command ()
466
453
@click .argument ("ocid" , nargs = 1 )
467
- @add_options (_options )
454
+ @add_options (_model_deployment_options )
468
455
def delete (** kwargs ):
469
456
suppress_traceback (kwargs ["debug" ])(delete_cmd )(** kwargs )
470
457
471
458
472
459
@commands .command ()
473
460
@click .argument ("ocid" , nargs = 1 )
474
- @add_options (_options )
461
+ @add_options (_model_deployment_options )
475
462
def cancel (** kwargs ):
476
463
suppress_traceback (kwargs ["debug" ])(cancel_cmd )(** kwargs )
477
464
478
465
479
466
@commands .command ()
480
467
@click .argument ("ocid" , nargs = 1 )
481
- @add_options (_options )
468
+ @click .option (
469
+ "--log-type" ,
470
+ help = "the type of logging. Allowed value: `custom_log` and `service_log` for pipeline, `access` and `predict` for model deployment." ,
471
+ required = False ,
472
+ default = None
473
+ )
474
+ @click .option (
475
+ "--log-filter" ,
476
+ help = "expression for filtering the logs for model deployment." ,
477
+ required = False ,
478
+ default = None ,
479
+ )
480
+ @click .option (
481
+ "--interval" ,
482
+ help = "log interval in seconds" ,
483
+ type = int ,
484
+ required = False ,
485
+ default = 3 ,
486
+ )
487
+ @click .option (
488
+ "--wait" ,
489
+ help = "time in seconds to keep updating the logs after the job run finished for job." ,
490
+ type = int ,
491
+ required = False ,
492
+ default = 90
493
+ )
482
494
def watch (** kwargs ):
483
495
"""
484
496
``tail`` logs form a job run, dataflow run or pipeline run.
@@ -489,7 +501,7 @@ def watch(**kwargs):
489
501
490
502
@commands .command ()
491
503
@click .argument ("ocid" , nargs = 1 )
492
- @add_options (_options )
504
+ @add_options (_model_deployment_options )
493
505
def activate (** kwargs ):
494
506
"""
495
507
Activates a data science service.
@@ -499,7 +511,7 @@ def activate(**kwargs):
499
511
500
512
@commands .command ()
501
513
@click .argument ("ocid" , nargs = 1 )
502
- @add_options (_options )
514
+ @add_options (_model_deployment_options )
503
515
def deactivate (** kwargs ):
504
516
"""
505
517
Deactivates a data science service.
0 commit comments