o
    /wÖi[  ã                   @  st   d dl mZ d dlmZ d dlZd dlmZ d dlZd dlm	Z	 d dlm
Z
 d dlmZ e	 e¡ZG dd	„ d	ƒZdS )
é    )Úannotations)ÚSequenceN)ÚAny)Úlogging)Útrial)ÚStudyDirectionc                   @  sh   e Zd ZdZddœd(dd„Zd)dd„Zd)dd„Zd)dd„Zed*d!d"„ƒZ	ed+d$d%„ƒZ
ed,d&d'„ƒZdS )-ÚStudySummaryaë  Basic attributes and aggregated results of a :class:`~optuna.study.Study`.

    See also :func:`optuna.study.get_all_study_summaries`.

    Attributes:
        study_name:
            Name of the :class:`~optuna.study.Study`.
        direction:
            :class:`~optuna.study.StudyDirection` of the :class:`~optuna.study.Study`.

            .. note::
                This attribute is only available during single-objective optimization.
        directions:
            A sequence of :class:`~optuna.study.StudyDirection` objects.
        best_trial:
            :class:`optuna.trial.FrozenTrial` with best objective value in the
            :class:`~optuna.study.Study`.
        user_attrs:
            Dictionary that contains the attributes of the :class:`~optuna.study.Study` set with
            :func:`optuna.study.Study.set_user_attr`.
        system_attrs:
            Dictionary that contains the attributes of the :class:`~optuna.study.Study` internally
            set by Optuna.

            .. warning::
                Deprecated in v3.1.0. ``system_attrs`` argument will be removed in the future.
                The removal of this feature is currently scheduled for v5.0.0,
                but this schedule is subject to change.
                See https://github.com/optuna/optuna/releases/tag/v3.1.0.
        n_trials:
            The number of trials ran in the :class:`~optuna.study.Study`.
        datetime_start:
            Datetime where the :class:`~optuna.study.Study` started.

    N)Ú
directionsÚ
study_nameÚstrÚ	directionúStudyDirection | NoneÚ
best_trialútrial.FrozenTrial | NoneÚ
user_attrsúdict[str, Any]Úsystem_attrsÚn_trialsÚintÚdatetime_startúdatetime.datetime | NoneÚstudy_idr	   úSequence[StudyDirection] | Nonec	          
      C  st   || _ |d u r|	d u rtdƒ‚|	d urt|	ƒ| _n|d ur"|g| _ntdƒ‚|| _|| _|| _|| _|| _|| _	d S )Nz,Specify one of `direction` and `directions`.z1Specify only one of `direction` and `directions`.)
r
   Ú
ValueErrorÚlistÚ_directionsr   r   Ú_system_attrsr   r   Ú	_study_id)
Úselfr
   r   r   r   r   r   r   r   r	   © r   úX/home/ubuntu/sommelier/.venv/lib/python3.10/site-packages/optuna/study/_study_summary.pyÚ__init__5   s   

zStudySummary.__init__Úotherr   ÚreturnÚboolc                 C  s   t |tƒstS |j| jkS ©N)Ú
isinstancer   ÚNotImplementedÚ__dict__©r   r"   r   r   r    Ú__eq__R   ó   
zStudySummary.__eq__c                 C  s   t |tƒstS | j|jk S r%   ©r&   r   r'   r   r)   r   r   r    Ú__lt__X   r+   zStudySummary.__lt__c                 C  s   t |tƒstS | j|jkS r%   r,   r)   r   r   r    Ú__le__^   r+   zStudySummary.__le__r   c                 C  s    t | jƒdkrtdƒ‚| jd S )Né   zDThis attribute is not available during multi-objective optimization.r   )Úlenr   ÚRuntimeError©r   r   r   r    r   d   s
   ÿ
zStudySummary.directionúSequence[StudyDirection]c                 C  s   | j S r%   )r   r2   r   r   r    r	   m   s   zStudySummary.directionsc                 C  s   t  dt¡ | jS )NzÎ`system_attrs` has been deprecated in v3.1.0. The removal of this feature is currently scheduled for v5.0.0, but this schedule is subject to change. See https://github.com/optuna/optuna/releases/tag/v3.1.0.)ÚwarningsÚwarnÚFutureWarningr   r2   r   r   r    r   q   s
   ûzStudySummary.system_attrs)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#   r3   )r#   r   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r!   r*   r-   r.   Úpropertyr   r	   r   r   r   r   r    r      s    /õ


r   )Ú
__future__r   Úcollections.abcr   ÚdatetimeÚtypingr   r4   Úoptunar   r   Úoptuna.study._study_directionr   Ú
get_loggerr7   Ú_loggerr   r   r   r   r    Ú<module>   s    
