
    -ji                       S SK Jr  S SKrS SKrS SKJr  S SKJr  S SKJr  S SKrS SK	J
r
  S SKJr  \(       a$  S SKJr  S S	KJr  \" S
5      r\" S5      r\" S5      rSrSS jrSS jrSS jr S     SS jjr S     SS jjrg)    )annotationsN)Any)TYPE_CHECKING)TypeVar)optuna_warn)ExperimentalWarning)Callable)	ParamSpecFTFPCTz

.. note::
    Added in v{ver} as an experimental feature. The interface may change in newer versions
    without prior notice. See https://github.com/optuna/optuna/releases/tag/v{ver}.
c                ,    [        SU  S3[        5        g )NzArgument ``zF`` is an experimental feature. The interface can change in the future.)r   r   )option_names    N/home/james-whalen/.local/lib/python3.13/site-packages/optuna/_experimental.pywarn_experimental_argumentr       s    
k] #3 	3    c                    [        U [        5      (       a  [        U R                  S5      5      S:w  a  [	        SU  S35      eg )N.   z?Invalid version specification. Must follow `x.y.z` format but `z
` is given)
isinstancestrlensplit
ValueError)versions    r   _validate_versionr   (   sD    gs##s7==+='>!'CMgYV`a
 	
 (Dr   c                :    SU ;   a  U R                  S5      S   $ S$ )N
 )r   )	docstrings    r   _get_docstring_indentr"   /   s"    (,	(99??4 $ArAr   c                2   ^ ^ [        T 5        SUU 4S jjnU$ )zDecorate function as experimental.

Args:
    version: The first version that supports the target feature.
    name: The name of the feature. Defaults to fully qualified name of
    the function, i.e. `f"{func.__module__}.{func.__qualname__}"`. Optional.
c                  >^ ^ T R                   c  ST l         [        R                  TS9n[        T R                   5      nT R                   R	                  5       [
        R                  " X5      -   U-   T l         T=(       d    T R                   ST R                   3m[        R                  " T 5      SUU U4S jj5       nU$ )Nr    verr   c                 T   > [         R                  " T ST S3[        SS9  T" U 0 UD6$ Nz" is experimental (supported from vz*). The interface can change in the future.   )
stacklevelwarningswarnr   )argskwargs_namefuncr   s     r   wrapper5experimental_func.<locals>.decorator.<locals>.wrapperK   s>    MM';G9 E: :#	 (((r   )r.   r   r/   r   returnr   )__doc___EXPERIMENTAL_NOTE_TEMPLATEformatr"   striptextwrapindent
__module____qualname__	functoolswraps)r1   noter:   r2   r0   namer   s   `   @r   	decorator$experimental_func.<locals>.decoratorA   s    <<DL*11g1>&t||4||))+hood.KKfT@4??+1T->->,?@			) 	) 
	) r   )r1   Callable[FP, FT]r4   rC   r   r   r@   rA   s   `` r   experimental_funcrF   3   s     g . r   c                2   ^ ^ [        T 5        SUU 4S jjnU$ )zDecorate class as experimental.

Args:
    version: The first version that supports the target feature.
    name: The name of the feature. Defaults to the class name. Optional.
c                &   > SUU4S jjnU" U 5      $ )Nc                  >^^ [        U S5      m[        U S5      m[        R                  " T5      SUUUU4S jj5       n[        U SU5        U R                  c  SU l        [
        R                  TS9n[        U R                  5      nU R                  R                  5       [        R                  " X#5      -   U-   U l        U $ )zhDecorates a class as experimental.

This decorator is supposed to be applied to the experimental class.
__init____name__c                h   > [         R                  " Tb  TOT ST S3[        SS9  T" U /UQ70 UD6  g r(   r+   )selfr.   r/   _original_init_original_namer@   r   s      r   wrapped_initLexperimental_class.<locals>.decorator.<locals>.wrapper.<locals>.wrapped_initq   sN    #/t^D E88?y A>> (  t5d5f5r   r    r%   )rM   r   r.   r   r/   r   r4   None)getattrr=   r>   setattrr5   r6   r7   r"   r8   r9   r:   )clsrP   r?   r:   rN   rO   r@   r   s       @@r   r2   6experimental_class.<locals>.decorator.<locals>.wrapperi   s    
 %S*5N$S*5N__^,	6 	6 -	6 C\2{{" .55'5BD*3;;7F++++-0MMPVVCKJr   rU   r   r4   r    )rU   r2   r@   r   s     r   rA   %experimental_class.<locals>.decoratorh   s    	 	> s|r   rW   rD   rE   s   `` r   experimental_classrZ   [   s      g   D r   )r   r   r4   rR   )r   r   r4   rR   )r!   r   r4   r   )N)r   r   r@   
str | Noner4   z.Callable[[Callable[FP, FT]], Callable[FP, FT]])r   r   r@   r[   r4   zCallable[[CT], CT])
__future__r   r=   r9   typingr   r   r   r,   optuna._warningsr   optuna.exceptionsr   collections.abcr	   typing_extensionsr
   r   r   r   r6   r   r   r"   rF   rZ   rX   r   r   <module>rb      s    "        ( 1 (+	B	4B	B 
B %%
% 4%T //
/ /r   