Ë
    ÿÿæibO  ã            	      ó   — d dl mZ d dlmZ d dlmZ d dlZd dlZd dlmZ d dlm	Z	 d dlm
Z
 d dlmZ d d	lmZ d d
lmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dl m!Z!  ejD                  e#«      Z$dZ% G d„ de«      Z&e!jN                  ddddddddœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd„Z(y)é    )Úannotations)ÚMapping)ÚSequenceN)ÚAny)Úcast)Úoverload)Údistributions)Úlogging)Úconvert_positional_args)Údeprecated_func)ÚJSONSerializable)Úoptuna_warn)Ú-_convert_old_distribution_to_new_distribution)ÚBaseDistribution)ÚCategoricalChoiceType)ÚCategoricalDistribution)ÚFloatDistribution)ÚIntDistribution)Ú_SUGGEST_INT_POSITIONAL_ARGS)Ú	BaseTrial)Ú
TrialStatez Use suggest_float{args} instead.c                  óN  — e Zd ZdZddœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d<d„Zd=d„Zd=d„Zd=d„Zd>d„Zd?d	„Z	dd
dœ	 	 	 	 	 	 	 	 	 	 	 d@d„Z
 eddej                  d¬«      ¬«      dAd„«       Z eddej                  d¬«      ¬«      dAd„«       Z eddej                  d¬«      ¬«      dBd„«       Z eedd¬«      dd
dœ	 	 	 	 	 	 	 	 	 	 	 dCd„«       ZedDd„«       ZedEd„«       ZedFd„«       ZedGd„«       ZedHd „«       Ze	 	 	 	 	 	 dId!„«       Z	 	 	 	 	 	 dId"„ZdJd#„ZdKd$„ZdLd%„Z ed&d«      dLd'„«       ZdMd(„ZdNd)„Zed>d*„«       Zej<                  dOd+„«       ZedPd,„«       Zej<                  dQd-„«       ZdRd.„Z dSd/„Z! ee e!«      Z"edTd0„«       Z#e#j<                  dUd1„«       Z#edVd2„«       Z$e$j<                  dWd3„«       Z$edXd4„«       Z%e%j<                  dYd5„«       Z%edVd6„«       Z&e&j<                  dZd7„«       Z&edVd8„«       Z'e'j<                  d[d9„«       Z'ed\d:„«       Z(ed]d;„«       Z)y)^ÚFrozenTrialaÒ  Status and results of a :class:`~optuna.trial.Trial`.

    An object of this class has the same methods as :class:`~optuna.trial.Trial`, but is not
    associated with, nor has any references to a :class:`~optuna.study.Study`.

    It is therefore not possible to make persistent changes to a storage from this object by
    itself, for instance by using :func:`~optuna.trial.FrozenTrial.set_user_attr`.

    It will suggest the parameter values stored in :attr:`params` and will not sample values from
    any distributions.

    It can be passed to objective functions (see :func:`~optuna.study.Study.optimize`) and is
    useful for deploying optimization results.

    Example:

        Re-evaluate an objective function with parameter values optimized study.

        .. testcode::

            import optuna


            def objective(trial):
                x = trial.suggest_float("x", -1, 1)
                return x**2


            study = optuna.create_study()
            study.optimize(objective, n_trials=3)

            assert objective(study.best_trial) == study.best_value

    .. note::
        Instances are mutable, despite the name.
        For instance, :func:`~optuna.trial.FrozenTrial.set_user_attr` will update user attributes
        of objects in-place.


        Example:

            Overwritten attributes.

            .. testcode::

                import copy
                import datetime

                import optuna


                def objective(trial):
                    x = trial.suggest_float("x", -1, 1)

                    # this user attribute always differs
                    trial.set_user_attr("evaluation time", datetime.datetime.now())

                    return x**2


                study = optuna.create_study()
                study.optimize(objective, n_trials=3)

                best_trial = study.best_trial
                best_trial_copy = copy.deepcopy(best_trial)

                # re-evaluate
                objective(best_trial)

                # the user attribute is overwritten by re-evaluation
                assert best_trial.user_attrs != best_trial_copy.user_attrs

    .. note::
        Please refer to :class:`~optuna.trial.Trial` for details of methods and properties.


    Attributes:
        number:
            Unique and consecutive number of :class:`~optuna.trial.Trial` for each
            :class:`~optuna.study.Study`. Note that this field uses zero-based numbering.
        state:
            :class:`TrialState` of the :class:`~optuna.trial.Trial`.
        value:
            Objective value of the :class:`~optuna.trial.Trial`.
            ``value`` and ``values`` must not be specified at the same time.
        values:
            Sequence of objective values of the :class:`~optuna.trial.Trial`.
            The length is greater than 1 if the problem is multi-objective optimization.
            ``value`` and ``values`` must not be specified at the same time.
        datetime_start:
            Datetime where the :class:`~optuna.trial.Trial` started.
        datetime_complete:
            Datetime where the :class:`~optuna.trial.Trial` finished.
        params:
            Dictionary that contains suggested parameters.
        distributions:
            Dictionary that contains the distributions of :attr:`params`.
        user_attrs:
            Dictionary that contains the attributes of the :class:`~optuna.trial.Trial` set with
            :func:`optuna.trial.Trial.set_user_attr`.
        system_attrs:
            Dictionary that contains the attributes of the :class:`~optuna.trial.Trial` set with
            :func:`optuna.trial.Trial.set_system_attr`.
        intermediate_values:
            Intermediate objective values set with :func:`optuna.trial.Trial.report`.
    N)Úvaluesc               óö   — || _         || _        d | _        |�|�t        d«      ‚|�	|g| _        n|�t	        |«      | _        || _        || _        || _        || _        |	| _	        |
| _
        || _        || _        y )Nz)Specify only one of `value` and `values`.)Ú_numberÚstateÚ_valuesÚ
ValueErrorÚlistÚ_datetime_startÚdatetime_completeÚ_paramsÚ_user_attrsÚ_system_attrsÚintermediate_valuesÚ_distributionsÚ	_trial_id)ÚselfÚnumberr   ÚvalueÚdatetime_startr"   Úparamsr	   Ú
user_attrsÚsystem_attrsr&   Útrial_idr   s                úi/Volumes/fast/ai/experiments/voice-extract-mac/.venv/lib/python3.12/site-packages/optuna/trial/_frozen.pyÚ__init__zFrozenTrial.__init__Œ   sŽ   € ð  ˆŒØˆŒ
Ø+/ˆŒØÐ Ð!3ÜÐHÓIÐIØÐØ!˜7ˆD�LØÐÜ ›<ˆDŒLØ-ˆÔØ!2ˆÔØˆŒØ%ˆÔØ)ˆÔØ#6ˆÔ Ø+ˆÔØ!ˆ�ó    c                ó`   — t        |t        «      st        S |j                  | j                  k(  S ©N)Ú
isinstancer   ÚNotImplementedÚ__dict__©r)   Úothers     r1   Ú__eq__zFrozenTrial.__eq__®   s%   € Ü˜%¤Ô-Ü!Ð!Ø�~‰~ §¡Ñ.Ð.r3   c                ó`   — t        |t        «      st        S | j                  |j                  k  S r5   ©r6   r   r7   r*   r9   s     r1   Ú__lt__zFrozenTrial.__lt__³   s%   € Ü˜%¤Ô-Ü!Ð!à�{‰{˜UŸ\™\Ñ)Ð)r3   c                ó`   — t        |t        «      st        S | j                  |j                  k  S r5   r=   r9   s     r1   Ú__le__zFrozenTrial.__le__¹   s%   € Ü˜%¤Ô-Ü!Ð!à�{‰{˜eŸl™lÑ*Ð*r3   c                óR   ‡ — t        t        ˆ fd„‰ j                  D «       «      «      S )Nc              3  ó6   •K  — | ]  }t        ‰|«      –— Œ y ­wr5   )Úgetattr©Ú.0Úfieldr)   s     €r1   Ú	<genexpr>z'FrozenTrial.__hash__.<locals>.<genexpr>À   s   øè ø€ ÐJ¹M°5œ' $¨×.¹Mùs   ƒ)ÚhashÚtupler8   ©r)   s   `r1   Ú__hash__zFrozenTrial.__hash__¿   s   ø€ Ü”EÓJ¸D¿MºMÓJÓJÓKÐKr3   c                óŽ   ‡ — ‰ j                   j                  }dj                  ˆ fd„‰ j                  D «       «      dz   }|› d|› d�S )Nz, c           	   3  ó~   •K  — | ]4  }|j                  d «      s|n|dd › dt        t        ‰|«      «      › �–— Œ6 y­w)Ú_é   NÚ=)Ú
startswithÚreprrC   rD   s     €r1   rG   z'FrozenTrial.__repr__.<locals>.<genexpr>Å   sI   øè ø€ ð á*�Eð !&× 0Ñ 0°Ô 5‘5¸5ÀÀ¸9ÐEÀQÄtÌGÐTXÐZ_ÓL`ÓGaÐFbÔcÙ*ùs   ƒ:=z, value=NoneÚ(Ú))Ú	__class__Ú__name__Újoinr8   )r)   ÚclsÚkwargss   `  r1   Ú__repr__zFrozenTrial.__repr__Â   sS   ø€ Ø�n‰n×%Ñ%ˆà�I‰Ió à!Ÿ]š]óó ð ñ	ð 	ð ��a˜�x˜qÐ!Ð!r3   F)ÚstepÚlogc          	     ó@   — | j                  |t        ||||¬«      «      S ©N)r\   r[   )Ú_suggestr   ©r)   ÚnameÚlowÚhighr[   r\   s         r1   Úsuggest_floatzFrozenTrial.suggest_floatÍ   s!   € ð �}‰}˜TÔ#4°S¸$ÀCÈdÔ#SÓTÐTr3   z3.0.0z6.0.0Ú )Úargs)Útextc                ó(   — | j                  |||«      S r5   ©rd   ©r)   ra   rb   rc   s       r1   Úsuggest_uniformzFrozenTrial.suggest_uniformØ   s   € à×!Ñ! $¨¨TÓ2Ð2r3   z(..., log=True)c                ó,   — | j                  |||d¬«      S )NT)r\   ri   rj   s       r1   Úsuggest_loguniformzFrozenTrial.suggest_loguniformÜ   s   € à×!Ñ! $¨¨T°tÐ!Ó<Ð<r3   z(..., step=...)c                ó,   — | j                  ||||¬«      S )N)r[   ri   )r)   ra   rb   rc   Úqs        r1   Úsuggest_discrete_uniformz$FrozenTrial.suggest_discrete_uniformà   s   € à×!Ñ! $¨¨T¸Ð!Ó:Ð:r3   z3.5.0z5.0.0)Úprevious_positional_arg_namesÚdeprecated_versionÚremoved_versionrO   c               óR   — t        | j                  |t        ||||¬«      «      «      S r^   )Úintr_   r   r`   s         r1   Úsuggest_intzFrozenTrial.suggest_intä   s&   € ô �4—=‘= ¤°s¸DÀcÐPTÔ'UÓVÓWÐWr3   c                 ó   — y r5   © ©r)   ra   Úchoicess      r1   Úsuggest_categoricalzFrozenTrial.suggest_categoricalî   ó   € ØORr3   c                 ó   — y r5   rx   ry   s      r1   r{   zFrozenTrial.suggest_categoricalñ   r|   r3   c                 ó   — y r5   rx   ry   s      r1   r{   zFrozenTrial.suggest_categoricalô   ó   € ØMPr3   c                 ó   — y r5   rx   ry   s      r1   r{   zFrozenTrial.suggest_categorical÷   s   € ØQTr3   c                 ó   — y r5   rx   ry   s      r1   r{   zFrozenTrial.suggest_categoricalú   r   r3   c                 ó   — y r5   rx   ry   s      r1   r{   zFrozenTrial.suggest_categoricalý   s   € ð !$r3   c                ó:   — | j                  |t        |¬«      «      S )N)rz   )r_   r   ry   s      r1   r{   zFrozenTrial.suggest_categorical  s   € ð �}‰}˜TÔ#:À7Ô#KÓLÐLr3   c                 ó   — y)aŸ  Interface of report function.

        Since :class:`~optuna.trial.FrozenTrial` is not pruned,
        this report function does nothing.

        .. seealso::
            Please refer to :func:`~optuna.trial.FrozenTrial.should_prune`.

        Args:
            value:
                A value returned from the objective function.
            step:
                Step of the trial (e.g., Epoch of neural network training). Note that pruners
                assume that ``step`` starts at zero. For example,
                :class:`~optuna.pruners.MedianPruner` simply checks if ``step`` is less than
                ``n_warmup_steps`` as the warmup mechanism.
        Nrx   )r)   r+   r[   s      r1   ÚreportzFrozenTrial.report  s   € ð& 	r3   c                 ó   — y)a'  Suggest whether the trial should be pruned or not.

        The suggestion is always :obj:`False` regardless of a pruning algorithm.

        .. note::
            :class:`~optuna.trial.FrozenTrial` only samples one combination of parameters.

        Returns:
            :obj:`False`.
        Frx   rJ   s    r1   Úshould_prunezFrozenTrial.should_prune  s   € ð r3   c                ó"   — || j                   |<   y r5   ©r$   ©r)   Úkeyr+   s      r1   Úset_user_attrzFrozenTrial.set_user_attr*  s   € Ø %ˆ×Ñ˜Òr3   z3.1.0c                ó"   — || j                   |<   y r5   ©r%   rŠ   s      r1   Úset_system_attrzFrozenTrial.set_system_attr-  s   € à"'ˆ×Ñ˜3Òr3   c           
     ó<  — | j                   t        j                  k7  r| j                  €t	        d«      ‚| j                   j                  «       r| j                  €"t	        d«      ‚| j                  �t	        d«      ‚| j                   t        j                  k(  r%| j                  �t	        d| j                  › d�«      ‚| j                   t        j                  k(  r>| j                  €t	        d«      ‚t        d„ | j                  D «       «      rt	        d«      ‚t        | j                  j                  «       «      t        | j                  j                  «       «      k7  rTt	        d	t        | j                  j                  «       «      › d
t        | j                  j                  «       «      › d�«      ‚| j                  j                  «       D ]K  \  }}| j                  |   }|j!                  |«      }|j#                  |«      rŒ8t	        d|› d|› d|› d�«      ‚ y )NzK`datetime_start` is supposed to be set when the trial state is not waiting.z?`datetime_complete` is supposed to be set for a finished trial.zC`datetime_complete` is supposed to be None for an unfinished trial.z2values should be None for a failed trial, but got Ú.z*values should be set for a complete trial.c              3  óF   K  — | ]  }t        j                  |«      –— Œ y ­wr5   )ÚmathÚisnan)rE   Úxs     r1   rG   z(FrozenTrial._validate.<locals>.<genexpr>E  s   è ø€ Ð9©L q”T—Z‘Z —]©Lùs   ‚!zvalues should not contain NaN.zInconsistent parameters z and distributions ú
The value z of parameter 'z&' isn't contained in the distribution )r   r   ÚWAITINGr,   r   Úis_finishedr"   ÚFAILr   ÚCOMPLETEÚanyÚsetr-   Úkeysr	   ÚitemsÚto_internal_reprÚ	_contains)r)   Ú
param_nameÚparam_valueÚdistributionÚparam_value_in_internal_reprs        r1   Ú	_validatezFrozenTrial._validate1  së  € Ø�:‰:œ×+Ñ+Ò+°×0CÑ0CÐ0KÜØ]óð ð �:‰:×!Ñ!Ô#Ø×%Ñ%Ð-Ü Ð!bÓcÐcà×%Ñ%Ð1Ü ØYóð ð �:‰:œŸ™Ò(¨T¯\©\Ð-EÜÐQÐRV×R^ÑR^ÐQ_Ð_`ÐaÓbÐbØ�:‰:œ×,Ñ,Ò,Ø�|‰|Ð#Ü Ð!MÓNÐNÜÑ9¨D¯LªLÓ9Ô9Ü Ð!AÓBÐBäˆt�{‰{×ÑÓ!Ó"¤c¨$×*<Ñ*<×*AÑ*AÓ*CÓ&DÒDÜØ*¬3¨t¯{©{×/?Ñ/?Ó/AÓ+BÐ*Cð D!Ü!$ T×%7Ñ%7×%<Ñ%<Ó%>Ó!?Ð @ÀðCóð ð
 (,§{¡{×'8Ñ'8Ö':Ñ#ˆJ˜Ø×-Ñ-¨jÑ9ˆLà+7×+HÑ+HÈÓ+UÐ(Ø×)Ñ)Ð*FÕGÜ Ø   ¨_¸Z¸Lð I(Ø(4 ~°Qð8óð ñ (;r3   c           	     óL  — || j                   vrt        d|› d�«      ‚| j                   |   }|j                  |«      }|j                  |«      st	        d|› d|› d|› d�«       || j
                  v r#t        j                  | j
                  |   |«       || j
                  |<   |S )NzThe value of the parameter 'zL' is not found. Please set it at the construction of the FrozenTrial object.r–   z of the parameter 'z*' is out of the range of the distribution r‘   )r#   r   rŸ   r    r   r'   r	   Ú check_distribution_compatibility)r)   ra   r£   r+   r¤   s        r1   r_   zFrozenTrial._suggestX  sÇ   € Ø�t—|‘|Ñ#ÜØ.¨t¨fð 5Oð Póð ð
 —‘˜TÑ"ˆØ'3×'DÑ'DÀUÓ'KÐ$Ø×%Ñ%Ð&BÔCÜØ˜U˜GÐ#6°t°fð =1Ø1=°¸aðAôð
 �4×&Ñ&Ñ&Ü×:Ñ:¸4×;NÑ;NÈtÑ;TÐVbÔcà$0ˆ×Ñ˜DÑ!àˆr3   c                ó   — | j                   S r5   ©r   rJ   s    r1   r*   zFrozenTrial.numbern  ó   € à�|‰|Ðr3   c                ó   — || _         y r5   r©   ©r)   r+   s     r1   r*   zFrozenTrial.numberr  s	   € àˆ�r3   c                ó€   — | j                   �2t        | j                   «      dkD  rt        d«      ‚| j                   d   S y )NrO   úDThis attribute is not available during multi-objective optimization.r   ©r   ÚlenÚRuntimeErrorrJ   s    r1   r+   zFrozenTrial.valuev  s@   € à�<‰<Ð#Ü�4—<‘<Ó  1Ò$Ü"ØZóð ð —<‘< ‘?Ð"Ør3   c                ó†   — | j                   �#t        | j                   «      dkD  rt        d«      ‚|�	|g| _         y d | _         y )NrO   r®   r¯   ©r)   Úvs     r1   r+   zFrozenTrial.value€  sD   € à�<‰<Ð#Ü�4—<‘<Ó  1Ò$Ü"ØZóð ð ˆ=Ø˜3ˆD�LàˆD�Lr3   c                ó   — | j                   S r5   )r   rJ   s    r1   Ú_get_valueszFrozenTrial._get_values�  s   € Ø�|‰|Ðr3   c                ó8   — |�t        |«      | _        y d | _        y r5   )r    r   r³   s     r1   Ú_set_valueszFrozenTrial._set_values“  s   € Øˆ=Ü ›7ˆD�LàˆD�Lr3   c                ó   — | j                   S r5   ©r!   rJ   s    r1   r,   zFrozenTrial.datetime_start›  s   € à×#Ñ#Ð#r3   c                ó   — || _         y r5   rº   r¬   s     r1   r,   zFrozenTrial.datetime_startŸ  s
   € à$ˆÕr3   c                ó   — | j                   S r5   ©r#   rJ   s    r1   r-   zFrozenTrial.params£  rª   r3   c                ó   — || _         y r5   r½   )r)   r-   s     r1   r-   zFrozenTrial.params§  s	   € àˆ�r3   c                ó   — | j                   S r5   ©r'   rJ   s    r1   r	   zFrozenTrial.distributions«  s   € à×"Ñ"Ð"r3   c                ó   — || _         y r5   rÀ   r¬   s     r1   r	   zFrozenTrial.distributions¯  s
   € à#ˆÕr3   c                ó   — | j                   S r5   r‰   rJ   s    r1   r.   zFrozenTrial.user_attrs³  s   € à×ÑÐr3   c                ó   — || _         y r5   r‰   r¬   s     r1   r.   zFrozenTrial.user_attrs·  s
   € à ˆÕr3   c                ó   — | j                   S r5   rŽ   rJ   s    r1   r/   zFrozenTrial.system_attrs»  s   € à×!Ñ!Ð!r3   c                óH   — t        t        t        t        f   |«      | _        y r5   )r   ÚdictÚstrr   r%   r¬   s     r1   r/   zFrozenTrial.system_attrs¿  s   € ä!¤$¤s¬C x¡.°%Ó8ˆÕr3   c                óz   — t        | j                  «      dk(  ryt        | j                  j                  «       «      S )zŽReturn the maximum step of :attr:`intermediate_values` in the trial.

        Returns:
            The maximum step of intermediates.
        r   N)r°   r&   Úmaxr�   rJ   s    r1   Ú	last_stepzFrozenTrial.last_stepÃ  s4   € ô ˆt×'Ñ'Ó(¨AÒ-Øä�t×/Ñ/×4Ñ4Ó6Ó7Ð7r3   c                óf   — | j                   r%| j                  r| j                  | j                   z
  S y)ziReturn the elapsed time taken to complete the trial.

        Returns:
            The duration.
        N)r,   r"   rJ   s    r1   ÚdurationzFrozenTrial.durationÐ  s/   € ð ×Ò 4×#9Ò#9Ø×)Ñ)¨D×,?Ñ,?Ñ?Ð?àr3   )r*   ru   r   r   r+   úfloat | Noner,   údatetime.datetime | Noner"   rÎ   r-   údict[str, Any]r	   údict[str, BaseDistribution]r.   rÏ   r/   rÏ   r&   zdict[int, float]r0   ru   r   úSequence[float] | NoneÚreturnÚNone)r:   r   rÒ   Úbool)rÒ   ru   )rÒ   rÇ   )ra   rÇ   rb   Úfloatrc   rÕ   r[   rÍ   r\   rÔ   rÒ   rÕ   )ra   rÇ   rb   rÕ   rc   rÕ   rÒ   rÕ   )
ra   rÇ   rb   rÕ   rc   rÕ   ro   rÕ   rÒ   rÕ   )ra   rÇ   rb   ru   rc   ru   r[   ru   r\   rÔ   rÒ   ru   )ra   rÇ   rz   zSequence[None]rÒ   rÓ   )ra   rÇ   rz   zSequence[bool]rÒ   rÔ   )ra   rÇ   rz   zSequence[int]rÒ   ru   )ra   rÇ   rz   zSequence[float]rÒ   rÕ   )ra   rÇ   rz   zSequence[str]rÒ   rÇ   )ra   rÇ   rz   zSequence[CategoricalChoiceType]rÒ   r   )r+   rÕ   r[   ru   rÒ   rÓ   )rÒ   rÔ   )r‹   rÇ   r+   r   rÒ   rÓ   )rÒ   rÓ   )ra   rÇ   r£   r   rÒ   r   )r+   ru   rÒ   rÓ   )rÒ   rÍ   )r´   rÍ   rÒ   rÓ   )rÒ   zlist[float] | None)r´   rÑ   rÒ   rÓ   )rÒ   rÎ   )r+   rÎ   rÒ   rÓ   )rÒ   rÏ   )r-   rÏ   rÒ   rÓ   )rÒ   rÐ   )r+   rÐ   rÒ   rÓ   )r+   rÏ   rÒ   rÓ   )r+   zMapping[str, JSONSerializable]rÒ   rÓ   )rÒ   z
int | None)rÒ   zdatetime.timedelta | None)*rV   Ú
__module__Ú__qualname__Ú__doc__r2   r;   r>   r@   rK   rZ   rd   r   Ú_suggest_deprecated_msgÚformatrk   rm   rp   r   r   rv   r   r{   r…   r‡   rŒ   r�   r¥   r_   Úpropertyr*   Úsetterr+   r¶   r¸   r   r,   r-   r	   r.   r/   rÊ   rÌ   rx   r3   r1   r   r       s)  „ ñiðr *.ñ "àð "ð ð "ð ð	 "ð
 1ð "ð 4ð "ð ð "ð 3ð "ð #ð "ð %ð "ð .ð "ð ð "ð 'ð "ð 
ó "óD/ó
*ó+óLó	"ð" "Øñ	Uàð	Uð ð	Uð ð		Uð ð	Uð ð	Uð 
ó	Uñ �W˜gÐ,C×,JÑ,JÐPRÐ,JÓ,SÔTò3ó Uð3ñ �W˜gÐ,C×,JÑ,JÐPaÐ,JÓ,bÔcò=ó dð=ñ �W˜gÐ,C×,JÑ,JÐPaÐ,JÓ,bÔcò;ó dð;ñ Ø&BØ"Øôð >?ÈEñXØðXØ!ðXØ),ðXØ7:ðXØEIðXà	òXóð
Xð
 ÚRó ØRàÚRó ØRàÚPó ØPàÚTó ØTàÚPó ØPàð$Øð$Ø"Að$à	ò$ó ð$ðMØðMØ"AðMà	óMó
ó*ó&ñ �W˜gÓ&ò(ó 'ð(ó%óNð, òó ðð ‡]�]òó ðð òó ðð ‡\�\ò
 ó ð
 óó ñ �k ;Ó/€Fàò$ó ð$ð ×Ñò%ó ð%ð òó ðð ‡]�]òó ðð ò#ó ð#ð ×Ñò$ó ð$ð ò ó ð ð ×Ñò!ó ð!ð ò"ó ð"ð ×Ñò9ó ð9ð ò
8ó ð
8ð ò
ó ñ
r3   r   )r   r+   r   r-   r	   r.   r/   r&   c                óˆ  — |xs i }|xs i } |j                   «       D ��	ci c]  \  }}	|t        |	«      “Œ }}}	|xs i }|xs i }|xs i }| t        j                  k(  rd}
nt        j                  j                  «       }
| j                  «       r|
}nd}t        dd| |||
||||||¬«      }|j                  «        |S c c}	}w )aæ  Create a new :class:`~optuna.trial.FrozenTrial`.

    Example:

        .. testcode::

            import optuna
            from optuna.distributions import CategoricalDistribution
            from optuna.distributions import FloatDistribution

            trial = optuna.trial.create_trial(
                params={"x": 1.0, "y": 0},
                distributions={
                    "x": FloatDistribution(0, 10),
                    "y": CategoricalDistribution([-1, 0, 1]),
                },
                value=5.0,
            )

            assert isinstance(trial, optuna.trial.FrozenTrial)
            assert trial.value == 5.0
            assert trial.params == {"x": 1.0, "y": 0}

    .. seealso::

        See :func:`~optuna.study.Study.add_trial` for how this function can be used to create a
        study from existing trials.

    .. note::

        Please note that this is a low-level API. In general, trials that are passed to objective
        functions are created inside :func:`~optuna.study.Study.optimize`.

    .. note::
        When ``state`` is :class:`TrialState.COMPLETE`, the following parameters are
        required:

        * ``params``
        * ``distributions``
        * ``value`` or ``values``

    Args:
        state:
            Trial state.
        value:
            Trial objective value. Must be specified if ``state`` is :class:`TrialState.COMPLETE`.
            ``value`` and ``values`` must not be specified at the same time.
        values:
            Sequence of the trial objective values. The length is greater than 1 if the problem is
            multi-objective optimization.
            Must be specified if ``state`` is :class:`TrialState.COMPLETE`.
            ``value`` and ``values`` must not be specified at the same time.
        params:
            Dictionary with suggested parameters of the trial.
        distributions:
            Dictionary with parameter distributions of the trial.
        user_attrs:
            Dictionary with user attributes.
        system_attrs:
            Dictionary with system attributes. Should not have to be used for most users.
        intermediate_values:
            Dictionary with intermediate objective values of the trial.

    Returns:
        Created trial.
    Néÿÿÿÿ)r*   r0   r   r+   r   r,   r"   r-   r	   r.   r/   r&   )	rž   r   r   r—   ÚdatetimeÚnowr˜   r   r¥   )r   r+   r   r-   r	   r.   r/   r&   r‹   Údistr,   r"   Útrials                r1   Úcreate_trialrã   Þ  sù   € ð\ Š\�r€FØ!Ò' R€Mð -˜×,Ñ,Ô.ôá.‰IˆC�ð 	Ô:¸4Ó@Ñ@Ø.ð ñ ð Ò!˜r€JØÒ% 2€LØ-Ò3°Ðà”
×"Ñ"Ò"Ø‰ä!×*Ñ*×.Ñ.Ó0ˆà×ÑÔØ6DÑà ÐäØØØØØØ%Ø+ØØ#ØØ!Ø/ô€Eð 
‡O�OÔà€LùóGs   ¡B>)r   r   r+   rÍ   r   rÑ   r-   údict[str, Any] | Noner	   z"dict[str, BaseDistribution] | Noner.   rä   r/   rä   r&   zdict[int, float] | NonerÒ   r   ))Ú
__future__r   Úcollections.abcr   r   rß   r“   Útypingr   r   r   Úoptunar	   r
   Úoptuna._convert_positional_argsr   Úoptuna._deprecatedr   Úoptuna._typingr   Úoptuna._warningsr   Úoptuna.distributionsr   r   r   r   r   r   Úoptuna.trial._baser   r   Úoptuna.trial._stater   Ú
get_loggerrV   Ú_loggerrÙ   r   rš   rã   rx   r3   r1   Ú<module>rò      sú   ðÝ "å #Ý $Û Û Ý Ý Ý å  Ý Ý CÝ .Ý +Ý (Ý NÝ 1Ý 6Ý 8Ý 2Ý 0Ý ;Ý (Ý *ð ˆ'×
Ñ
˜XÓ
&€Ø<Ð ô{�)ô {ð@ #×+Ñ+ØØ%)Ø$(Ø8<Ø(,Ø*.Ø37ñsàðsð ðsð #ð	sð
 "ðsð 6ðsð &ðsð (ðsð 1ðsð ôsr3   