o
    `۷i                     @   sd   d dl mZ d dlmZmZ d dlmZ d dlmZ d dl	m
Z
 e \ZZZeG dd deZdS )	    )Optional)OldAPIStackoverride)try_import_tf)Schedule)
TensorTypec                       sd   e Zd ZdZddedee f fddZee	de
de
fd	d
Zee	de
de
fddZ  ZS )ConstantSchedulez6A Schedule where the value remains constant over time.Nvalue	frameworkc                    s   t  j|d || _dS )zInitializes a ConstantSchedule instance.

        Args:
            value: The constant value to return, independently of time.
            framework: The framework descriptor string, e.g. "tf",
                "torch", or None.
        )r
   N)super__init___v)selfr	   r
   	__class__ a/home/ubuntu/vllm_env/lib/python3.10/site-packages/ray/rllib/utils/schedules/constant_schedule.pyr      s   
zConstantSchedule.__init__treturnc                 C   s   | j S N)r   r   r   r   r   r   _value   s   zConstantSchedule._valuec                 C   s   t | jS r   )tfconstantr   r   r   r   r   _tf_value_op   s   zConstantSchedule._tf_value_opr   )__name__
__module____qualname____doc__floatr   strr   r   r   r   r   r   __classcell__r   r   r   r   r      s    r   N)typingr   ray.rllib.utils.annotationsr   r   ray.rllib.utils.frameworkr   "ray.rllib.utils.schedules.scheduler   ray.rllib.utils.typingr   tf1r   tfvr   r   r   r   r   <module>   s    