L iddlmZddlZddlZddlmZddlmZddlmZddlZddl m Z er$ddl m Z ddl mZed Zed Zed Zd Zdd ZddZddZ d ddZ d ddZy)) annotationsN)Any) TYPE_CHECKING)TypeVar)ExperimentalWarning)Callable) ParamSpecFTFPCTz .. 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@tjd|dty)Nz Argument ``zF`` is an experimental feature. The interface can change in the future.)warningswarnr) option_names Z/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/optuna/_experimental.pywarn_experimental_argumentrs" MM k]#3 3ct|trt|jddk7rt dj |y)N.zKInvalid version specification. Must follow `x.y.z` format but `{}` is given) isinstancestrlensplit ValueErrorformat)versions r_validate_versionr'sE gs #s7==+='>!'C Y ` `   (Drc6d|vr|jddSdS)N )r) docstrings r_get_docstring_indentr$0s"(, (99??4  $ArArc.tdfd }|S)aDecorate 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. cxjd_tj}tj}jj t j ||z|z_xsjdjtjdfd }|S)Nr"verrcltjdjtd|i|SNzP{} is experimental (supported from v{}). The interface can change in the future.) stacklevelrrrr)argskwargs_namefuncrs rwrapperz5experimental_func..decorator..wrapperLs8 MM::@&:P#  (( (r)r.rr/rreturnr ) __doc___EXPERIMENTAL_NOTE_TEMPLATErr$striptextwrapindent __module__ __qualname__ functoolswraps)r1noter8r2r0namers` @r decoratorz$experimental_func..decoratorBs << DL*11g1>&t||4||))+hoodF.KKfT @4??+1T->->,?@   )  )r)r1Callable[FP, FT]r3r@rrr>r?s`` rexperimental_funcrC4sg. rc.tdfd }|S)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"dfd }||S)Nct|dt|dtjdfd }t|d||jd|_t j }t|j}|jjtj||z|z|_|S)zDecorates a class as experimental. This decorator is supposed to be applied to the experimental class. __init____name__c~tjdjntd|g|i|yr*r-)selfr.r/_original_init_original_namer>rs r wrapped_initzLexperimental_class..decorator..wrapper..wrapped_initrsF >>Df $ 0ng?( t5d5f5rr"r')rJrr.rr/rr3None) getattrr;r<setattrr4r5rr$r6r7r8)clsrMr=r8rKrLr>rs @@rr2z6experimental_class..decorator..wrapperjs %S*5N$S*5N __^ , 6- 6 C\ 2{{"  .55'5BD*3;;7F++++-f0MMPVVCKJrrQr r3r )rQr2r>rs rr?z%experimental_class..decoratoris @s|rrRrArBs`` rexperimental_classrT\sg!F r)rrr3rN)rrr3rN)r#rr3r)N)rrr> str | Noner3z.Callable[[Callable[FP, FT]], Callable[FP, FT]])rrr>rUr3zCallable[[CT], CT]) __future__rr;r7typingrrrroptuna.exceptionsrcollections.abcrtyping_extensionsr r r r r5rrr$rCrTrSrrr[s" 1(+ B 4B B B % % %4%T0 0 00r