mirror of
https://github.com/vale981/ray
synced 2025-03-08 11:31:40 -05:00
18 lines
451 B
Python
18 lines
451 B
Python
from ray.rllib.utils.schedules.schedule import Schedule
|
|
|
|
|
|
class ConstantSchedule(Schedule):
|
|
"""
|
|
A Schedule where the value remains constant over time.
|
|
"""
|
|
|
|
def __init__(self, value, framework=None):
|
|
"""
|
|
Args:
|
|
value (float): The constant value to return, independently of time.
|
|
"""
|
|
super().__init__(framework=None)
|
|
self._v = value
|
|
|
|
def value(self, t=None):
|
|
return self._v
|