
    4                     `   S r SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSK	J
r
  SSK	Jr  SS	K	Jr  SS
KJr  SSKJr  SSKJr  Sr\R&                  " \R(                  R*                  \R(                  R,                  \R(                  R.                  5       " S S\R0                  5      5       rg)z;Command to cancel a hyperparameter tuning job in Vertex AI.    )absolute_import)division)unicode_literals)client)base)	constants)endpoint_util)
validation)flags)hp_tuning_jobs_util)logzRequest to cancel hyperparameter tuning job [{id}] has been sent.

You may view the status of your job with the command

  $ gcloud{command_version} ai hp-tuning-jobs describe {id} --region={region}
c                   .    \ rS rSrSr\S 5       rS rSrg)Cancel'   a  Cancel a running hyperparameter tuning job.

If the job is already finished, the command will not perform any operation.

## EXAMPLES

To cancel a job ``123'' under project ``example'' in region
``us-central1'', run:

  $ {command} 123 --project=example --region=us-central1
c                 2    [         R                  " U S5        g )Nz	to cancel)r   AddHptuningJobResourceArg)parsers    'lib/surface/ai/hp_tuning_jobs/cancel.pyArgsCancel.Args6   s    	##FK8    c           
         UR                   R                  R                  5       nUR                  5       S   n[        R
                  " U[        R                  S9  U R                  5       [        R                  R                  :X  a  [        R                  O[        R                  n[        R                  " XCS9   [        R                   " US9R#                  UR%                  5       5      n[&        R(                  R+                  [,        R/                  UR1                  5       [2        R4                  " U R                  5       5      US95        UsS S S 5        $ ! , (       d  f       g = f)NlocationsId)available_regions)versionregion)r   )idcommand_versionr   )CONCEPTShptuning_jobParseAsDictr
   ValidateRegionr   SUPPORTED_TRAINING_REGIONSReleaseTrackr   GA
GA_VERSIONBETA_VERSIONr	   AiplatformEndpointOverridesr   HpTuningJobsClientr   RelativeNamer   statusPrint$_HPTUNING_JOB_CANCEL_DISPLAY_MESSAGEformatNamer   OutputCommandVersion)selfargshptuning_job_refr   r   responses         r   Run
Cancel.Run:   s   }}11779$$&}5F)"F"FH '+&7&7 '					'i""#,#9#9 		2	2
(**7;BB

'
'
)+h 
jj
.
5
5!&&(1FF##%'	 6  
( 
( 
(s   ;BE
E( N)	__name__
__module____qualname____firstlineno____doc__staticmethodr   r6   __static_attributes__r8   r   r   r   r   '   s     
 9 9r   r   N)r=   
__future__r   r   r   (googlecloudsdk.api_lib.ai.hp_tuning_jobsr   googlecloudsdk.callioper   googlecloudsdk.command_lib.air   r	   r
   ,googlecloudsdk.command_lib.ai.hp_tuning_jobsr   r   googlecloudsdk.corer   r.   ReleaseTracksr%   r&   BETAALPHASilentCommandr   r8   r   r   <module>rJ      s    B &  ' ; ( 3 7 4 > L #( $ D%%(($*;*;*@*@%%++-$T $-$r   