+
    &j6                        R t ^ RIHt ^ RIt^ RIHt ^ RIHt ^RIH	t	H
t
Ht ^RIHt ]! RR7      t]! R	R7      t]]]P"                  ! R
R7      3,          t]]R,          ]P&                  ! R
R7      3,          t]]R,          ]P&                  ! RR7      3,          t]P-                  RRR.R7      R<R R ll4       t]P-                  RR.R7      RRRRRRR^R^RRRRRR/R R ll4       t]P-                  RR.R7      R=R  R! ll4       tR>R" R# llt]P-                  RR$.R7      ! ]4       ]P-                  R%R&R'7      ! ]4       ]P7                  ]R(R)7       ]P-                  R*.R7      R<R+ R, ll4       t]P-                  R-.R7      R?R. R/ ll4       t]P-                  R0.R7      R@R1 R2 ll4       t]P-                  R3.R7      R<R4 R5 ll4       t]P-                  R6.R7      R@R7 R8 ll4       t ]P-                  R9.R7      R<R: R; ll4       t!R# )Az2CLI commands for Hugging Face Inference Endpoints.)	AnnotatedN)InferenceEndpointScalingMetric)HfHubHTTPError)TokenOpt
get_hf_apityper_factory)outz(Manage Hugging Face Inference Endpoints.helpz.Interact with the Inference Endpoints catalog.zEndpoint name.z_The namespace associated with the Inference Endpoint. Defaults to the current user's namespace.z	list | lszhf endpoints lsz"hf endpoints ls --namespace my-org)examplesc                4    V ^8  d   QhR\         R\        RR/# )   	namespacetokenreturnN)NamespaceOptr   )formats   "/Users/jameslopez/projects/CWCArchive/cwc-podcast/.venv/lib/python3.14/site-packages/huggingface_hub/cli/inference_endpoints.py__annotate__r   %   s&     & &&& 
&    c                x   \        VR7      p VP                  WR7      p. pT EF  pTP                  pTP                  R/ 4      pTP                  R/ 4      p	TP                  R/ 4      p
TP                  R	/ 4      pTP                  R
TP                  R
R4      R\        T	\        4      '       d   T	P                  RR4      MRR\        T\        4      '       d   TP                  RR4      MRR\        T	\        4      '       d   T	P                  RR4      MRR\        T	\        4      '       d   T	P                  RR4      MRR\        T
\        4      '       d   T
P                  RR4      MRR\        T\        4      '       d   TP                  RR4      MRR\        T\        4      '       d   TP                  RR4      MR/4       EK  	  \        P                  ! TR
R7       R#   \         dK   p\        P                  ! RT 24       \
        P                  ! TP                  P                  R7      ThRp?ii ; i)z6Lists all Inference Endpoints for the given namespace.r   )r   r   zListing failed: codeNstatusmodelcomputeprovidername 
repositorystatetask	frameworkinstanceinstanceTypevendorregion)id_key)r   list_inference_endpointsr   r   errortyperExitresponsestatus_coderawgetappend
isinstancedicttable)r   r   api	endpointsr*   resultsendpointr/   r   r   r   r   s   &&          r   lsr9   $   s    5
!CE0090R	
 Gll2&$'')R(77:r*+
5$8O8O<4UWZ5M5M&**Wb1SUE41H1H		&"-b:eT;R;RUYY{B7XZz'SW?X?XGKK;^`
8T8R8R(,,x4XZ
8T8R8R(,,x4XZ		
 $ IIgf%/  E		$UG,-jjenn889uDEs   G$ $H9/AH44H9deployzChf endpoints deploy my-endpoint --repo gpt2 --framework pytorch ...)r   r   r   r"   r   min_replicamax_replicascale_to_zero_timeoutscaling_metricscaling_thresholdc          %         V ^8  d   QhR\         R\        \        \        P                  ! RR7      3,          R\        \        \        P                  ! RR7      3,          R\        \        \        P                  ! RR7      3,          R	\        \        \        P                  ! R
R7      3,          R\        \        \        P                  ! RR7      3,          R\        \        \        P                  ! RR7      3,          R\        \        \        P                  ! RR7      3,          R\
        R\        \        R,          \        P                  ! RR7      3,          R\        R\        \        \        P                  ! RR7      3,          R\        \        \        P                  ! RR7      3,          R\        \        R,          \        P                  ! RR7      3,          R\        \        R,          \        P                  ! RR7      3,          R\        \        R,          \        P                  ! RR7      3,          R R/# )!r   r   repoeThe name of the model repository associated with the Inference Endpoint (e.g. 'openai/gpt-oss-120b').r	   r#   z@The machine learning framework used for the model (e.g. 'vllm').accelerator?The hardware accelerator to be used for inference (e.g. 'cpu').instance_sizeNThe size or type of the instance to be used for hosting the model (e.g. 'x4').instance_typeYThe cloud instance type where the Inference Endpoint will be deployed (e.g. 'intel-icl').r'   zTThe cloud region in which the Inference Endpoint will be created (e.g. 'us-east-1').r&   zVThe cloud provider or vendor where the Inference Endpoint will be hosted (e.g. 'aws').r   r"   NCThe task on which to deploy the model (e.g. 'text-classification').r   r;   VThe minimum number of replicas (instances) to keep running for the Inference Endpoint.r<   RThe maximum number of replicas (instances) to scale to for the Inference Endpoint.r=   FThe duration in minutes before an inactive endpoint is scaled to zero.r>   !The metric reference for scaling.r?   eThe scaling metric threshold used to trigger a scale up. Ignored when scaling metric is not provided.r   )
NameArgr   strr+   Optionr   r   intr   float)r   s   "r   r   r   H   sX    h h
h
x	
	h S	
	h R	
	h( a	
	)h4 l	
	5h@ g	
	AhL i	
	MhZ [h\ d
V	
	]hh ihj i	
	khv e	
	whB %d
Y	
	ChN &-4	
	OhZ !x	
	[hf 
ghr   c                   \        V
R7      pVP                  V VVVVVVVVV	V
VVVVVR7      p\        P                  ! VP                  4       R# )z3Deploy an Inference Endpoint from a Hub repository.r   )r   r    r#   rC   rE   rG   r'   r&   r   r"   r   r;   r<   r>   r?   r=   N)r   create_inference_endpointr   r3   r/   )r   rA   r#   rC   rE   rG   r'   r&   r   r"   r   r;   r<   r=   r>   r?   r5   r8   s   &&&&&&&&$$$$$$$$  r   r:   r:   G   sf    l 5
!C,,##%+3! - H$ HHX\\r   zChf endpoints catalog deploy --repo meta-llama/Llama-3.2-1B-Instructc                    V ^8  d   QhR\         \        \        P                  ! RR7      3,          R\        R\         \        R,          \        P                  ! RR7      3,          R\
        R	\        R
R/# )r   rA   rB   r	   r   rC   NzPThe hardware accelerator to be used for inference (e.g. 'cpu', 'gpu', 'neuron').r   r   r   )r   rP   r+   rQ   NameOptr   r   )r   s   "r   r   r      s      
x	
	  d
c	
	    
!r   c                <   \        VR7      p VP                  V VVVVR7      p\        P                  ! TP                  4       R#   \         dK   p\        P                  ! RT 24       \
        P                  ! TP                  P                  R7      ThRp?ii ; i)z4Deploy an Inference Endpoint from the Model Catalog.r   )repo_idr   rC   r   r   zDeployment failed: r   N)r   &create_inference_endpoint_from_catalogr   r   r*   r+   r,   r-   r.   r3   r/   )rA   r   rC   r   r   r5   r8   r*   s   &&&&&   r   deploy_from_catalogr[      s    & 5
!C
E==# > 
 HHX\\	  E		'w/0jjenn889uDEs   A BABBc                (    V ^8  d   QhR\         RR/# )r   r   r   N)r   )r   s   "r   r   r      s     ! !!	!r   c                $   \        V R7      p VP                  V R7      p\        P                  ! RT/4       R#   \         dK   p\        P                  ! RT 24       \
        P                  ! TP                  P                  R7      ThRp?ii ; i)zList available Catalog models.r   zCatalog fetch failed: r   Nmodels)
r   list_inference_catalogr   r   r*   r+   r,   r-   r.   r3   )r   r5   r^   r*   s   &   r   list_catalogr`      s}     5
!CE++%+8
 HHh 	  E		*5'23jjenn889uDEs   : BAB

Bzhf endpoints catalog lszlist-catalogT)r   hiddencatalogr   z!hf endpoints describe my-endpointc                @    V ^8  d   QhR\         R\        R\        RR/# r   r   r   r   r   NrO   r   r   )r   s   "r   r   r      0      
  
	r   c                6   \        VR7      p VP                  WVR7      p\        P                  ! TP                  4       R#   \         dK   p\        P                  ! RT 24       \
        P                  ! TP                  P                  R7      ThRp?ii ; i)z+Get information about an existing endpoint.r   r   r   r   zFetch failed: r   N)r   get_inference_endpointr   r   r*   r+   r,   r-   r.   r3   r/   r   r   r   r5   r8   r*   s   &&&   r   describerl      s~     5
!CE--4TY-Z
 HHX\\	  E		N5'*+jjenn889uDE   A BABBz/hf endpoints update my-endpoint --min-replica 2c          !         V ^8  d   QhR\         R\        R\        \        R,          \        P
                  ! RR7      3,          R\        \        R,          \        P
                  ! RR7      3,          R	\        \        R,          \        P
                  ! R
R7      3,          R\        \        R,          \        P
                  ! RR7      3,          R\        \        R,          \        P
                  ! RR7      3,          R\        \        R,          \        P
                  ! RR7      3,          R\        \        R,          \        P
                  ! RR7      3,          R\        \        R,          \        P
                  ! RR7      3,          R\        \        R,          \        P
                  ! RR7      3,          R\        \        R,          \        P
                  ! RR7      3,          R\        \        R,          \        P
                  ! RR7      3,          R\        \        R,          \        P
                  ! RR7      3,          R\        RR/# )r   r   r   rA   NrB   r	   rC   rD   rE   rF   rG   rH   r#   zBThe machine learning framework used for the model (e.g. 'custom').revisionzrThe specific model revision to deploy on the Inference Endpoint (e.g. '6c0e6080953db56375760c0471a8c5f2929baf11').r"   rI   r;   rJ   r<   rK   r=   rL   r>   rM   r?   rN   r   r   )
rO   r   r   rP   r+   rQ   rR   r   rS   r   )r   s   "r   r   r      sP    d d
dd d
x	
	d d
R	
	d d
a	
	d* d
l	
	+d6 d
U	
	7dB d
 F	
	CdN d
V	
	OdZ d
i	
	[df d
e	
	gdr %d
Y	
	sd~ &-4	
	dJ !x	
	KdV WdX 
Ydr   c                P   \        VR7      p VP                  V VVVVVVVVV	V
VVVVR7      p\        P                  ! TP                  4       R#   \         dK   p\        P                  ! RT 24       \
        P                  ! TP                  P                  R7      ThRp?ii ; i)zUpdate an existing endpoint.r   )r   r   r    r#   ro   r"   rC   rE   rG   r;   r<   r=   r>   r?   r   zUpdate failed: r   N)r   update_inference_endpointr   r   r*   r+   r,   r-   r.   r3   r/   )r   r   rA   rC   rE   rG   r#   ro   r"   r;   r<   r=   r>   r?   r   r5   r8   r*   s   &&&&&&&&&&&&&&&   r   updaterr      s    ^ 5
!CE00#''##"7)/ 1 
( HHX\\  E		OE7+,jjenn889uDEs    A B%AB  B%zhf endpoints delete my-endpointc                    V ^8  d   QhR\         R\        R\        \        \        P
                  ! RRR7      3,          R\        RR	/# )
r   r   r   yesz--yeszSkip confirmation prompts.r	   r   r   NrO   r   r   boolr+   rQ   r   )r   s   "r   r   r   e  sW     0 0
00 
W#?@	B
0 0 
0r   c                f   \         P                  ! RV  R2VR7       \        VR7      p VP                  WVR7       \         P                  ! R	T  R
2T R7       R#   \         dK   p\         P
                  ! RT 24       \        P                  ! TP                  P                  R7      ThRp?ii ; i)z)Delete an Inference Endpoint permanently.zDelete endpoint 'z'?)rt   r   ri   zDelete failed: r   Nz	Deleted 'z'.rc   )r   confirmr   delete_inference_endpointr   r*   r+   r,   r-   r.   result)r   r   rt   r   r5   r*   s   &&&&  r   deleter{   d  s     KK#D6,#6
5
!CE%%4E%R
 JJ4&#$/	  E		OE7+,jjenn889uDEs   A B0&AB++B0zhf endpoints pause my-endpointc                @    V ^8  d   QhR\         R\        R\        RR/# re   rf   )r   s   "r   r   r   |  rg   r   c                6   \        VR7      p VP                  WVR7      p\        P                  ! TP                  4       R#   \         dK   p\        P                  ! RT 24       \
        P                  ! TP                  P                  R7      ThRp?ii ; i)zPause an Inference Endpoint.r   ri   zPause failed: r   N)r   pause_inference_endpointr   r   r*   r+   r,   r-   r.   r3   r/   rk   s   &&&   r   pauser   {  s~     5
!CE//TV[/\
 HHX\\	  E		N5'*+jjenn889uDErm   zhf endpoints resume my-endpointc                    V ^8  d   QhR\         R\        R\        \        \        P
                  ! RRR7      3,          R\        RR	/# )
r   r   r   fail_if_already_runningz--fail-if-already-runningzWIf `True`, the method will raise an error if the Inference Endpoint is already running.r	   r   r   Nru   )r   s   "r   r   r     sY      
 ''j	
	  
r   c                D   \        VR7      p VP                  V VVV'       * R7      p\        P                  ! TP                  4       R#   \         dK   p\        P                  ! RT 24       \
        P                  ! TP                  P                  R7      ThRp?ii ; i)zResume an Inference Endpoint.r   )r   r   r   
running_okzResume failed: r   N)r   resume_inference_endpointr   r   r*   r+   r,   r-   r.   r3   r/   )r   r   r   r   r5   r8   r*   s   &&&&   r   resumer     s     5
!C	E0022	 1 
 HHX\\  E		OE7+,jjenn889uDEs   A
 
BABBz&hf endpoints scale-to-zero my-endpointc                @    V ^8  d   QhR\         R\        R\        RR/# re   rf   )r   s   "r   r   r     rg   r   c                6   \        VR7      p VP                  WVR7      p\        P                  ! TP                  4       R#   \         dK   p\        P                  ! RT 24       \
        P                  ! TP                  P                  R7      ThRp?ii ; i)z$Scale an Inference Endpoint to zero.r   ri   zScale To Zero failed: r   N)r    scale_to_zero_inference_endpointr   r   r*   r+   r,   r-   r.   r3   r/   rk   s   &&&   r   scale_to_zeror     s     5
!CE77T^c7d
 HHX\\	  E		*5'23jjenn889uDErm   )NN)NNNN)N)NNNNNNNNNNNNNN)NFN)"__doc__typingr   r+   $huggingface_hub._inference_endpointsr   huggingface_hub.errorsr   
_cli_utilsr   r   r   _outputr   ie_clicatalog_apprP   ArgumentrO   rQ   rW   r   commandr9   r:   r[   r`   	add_typerrl   rr   r{   r   r   r    r   r   <module>r      s   8   O 1 ; ;  
F	G!QR 	NN()+ $J	LL&')
 $J	LLn '8:^&_`& a&D X)n(ophZ #[hf 	ghh iht 	
uh@ 	
AhL 	MhX 	Yhd 	eh qhV (.s-tu vD!   0I/J  KL Y N4 0 >   9  - =>? @  KLMd NdN ;<=0 >0, :;< =  ;<= >6 BCD Er   