@@ -233,42 +233,29 @@ def init_vscode(**kwargs):
233233 type = click .Choice (["api_key" , "resource_principal" ]),
234234 default = None ,
235235 ),
236+ ]
237+
238+ _model_deployment_options = [
236239 click .option (
237240 "--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 " ,
239242 is_flag = True ,
240243 required = False ,
241244 ),
242245 click .option (
243246 "--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 " ,
245248 type = int ,
246249 required = False ,
247250 default = 1200 ,
248251 ),
249252 click .option (
250253 "--poll-interval" ,
251- help = "poll interval in seconds" ,
254+ help = "poll interval in seconds for model deployment " ,
252255 type = int ,
253256 required = False ,
254257 default = 10 ,
255258 ),
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- ),
272259]
273260
274261
@@ -464,21 +451,46 @@ def init_operator(**kwargs):
464451
465452@commands .command ()
466453@click .argument ("ocid" , nargs = 1 )
467- @add_options (_options )
454+ @add_options (_model_deployment_options )
468455def delete (** kwargs ):
469456 suppress_traceback (kwargs ["debug" ])(delete_cmd )(** kwargs )
470457
471458
472459@commands .command ()
473460@click .argument ("ocid" , nargs = 1 )
474- @add_options (_options )
461+ @add_options (_model_deployment_options )
475462def cancel (** kwargs ):
476463 suppress_traceback (kwargs ["debug" ])(cancel_cmd )(** kwargs )
477464
478465
479466@commands .command ()
480467@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+ )
482494def watch (** kwargs ):
483495 """
484496 ``tail`` logs form a job run, dataflow run or pipeline run.
@@ -489,7 +501,7 @@ def watch(**kwargs):
489501
490502@commands .command ()
491503@click .argument ("ocid" , nargs = 1 )
492- @add_options (_options )
504+ @add_options (_model_deployment_options )
493505def activate (** kwargs ):
494506 """
495507 Activates a data science service.
@@ -499,7 +511,7 @@ def activate(**kwargs):
499511
500512@commands .command ()
501513@click .argument ("ocid" , nargs = 1 )
502- @add_options (_options )
514+ @add_options (_model_deployment_options )
503515def deactivate (** kwargs ):
504516 """
505517 Deactivates a data science service.
0 commit comments