o
    }o™i  ã                   @  sh   d dl mZ d dlmZ d dlmZ d dlmZ er&d dlmZ d dl	m
Z
 e e¡ZG dd„ dƒZd	S )
é    )Úannotations)ÚAny)ÚTYPE_CHECKING)Úlogging)ÚSequence)ÚStudyDirectionc                   @  sZ   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
dS )%ÚFrozenStudyaC  Basic attributes of a :class:`~optuna.study.Study`.

    This class is private and not referenced by Optuna users.

    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 list of :class:`~optuna.study.StudyDirection` objects.
        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.

    N)Ú
directionsÚ
study_nameÚstrÚ	directionúStudyDirection | NoneÚ
user_attrsúdict[str, Any]Úsystem_attrsÚstudy_idÚintr	   úSequence[StudyDirection] | Nonec                C  sb   || _ |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   Ú	_study_id)Úselfr
   r   r   r   r   r	   © r   úH/home/ubuntu/.local/lib/python3.10/site-packages/optuna/study/_frozen.pyÚ__init__*   s   


zFrozenStudy.__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__A   ó   
zFrozenStudy.__eq__c                 C  s   t |tƒstS | j|jk S r   ©r    r   r!   r   r#   r   r   r   Ú__lt__G   r%   zFrozenStudy.__lt__c                 C  s   t |tƒstS | j|jkS r   r&   r#   r   r   r   Ú__le__M   r%   zFrozenStudy.__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   S   s
   ÿ
zFrozenStudy.directionúlist[StudyDirection]c                 C  s   | j S r   )r   r,   r   r   r   r	   \   s   zFrozenStudy.directions)r
   r   r   r   r   r   r   r   r   r   r	   r   )r   r   r   r   )r   r   )r   r-   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r$   r'   r(   Úpropertyr   r	   r   r   r   r   r      s    ø


r   N)Ú
__future__r   Útypingr   r   Úoptunar   Úcollections.abcr   Úoptuna.study._study_directionr   Ú
get_loggerr.   Ú_loggerr   r   r   r   r   Ú<module>   s    
