Skip to content

Commit 6ee50f8

Browse files
committed
Update to constant schedule class
1 parent 5eb3e4b commit 6ee50f8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rl_zoo3/exp_manager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
from stable_baselines3.common.noise import NormalActionNoise, OrnsteinUhlenbeckActionNoise
3333
from stable_baselines3.common.preprocessing import is_image_space, is_image_space_channels_first
3434
from stable_baselines3.common.sb2_compat.rmsprop_tf_like import RMSpropTFLike # noqa: F401
35-
from stable_baselines3.common.utils import constant_fn
35+
from stable_baselines3.common.utils import ConstantSchedule
3636
from stable_baselines3.common.vec_env import (
3737
DummyVecEnv,
3838
SubprocVecEnv,
@@ -386,7 +386,7 @@ def _preprocess_schedules(hyperparams: dict[str, Any]) -> dict[str, Any]:
386386
# Negative value: ignore (ex: for clipping)
387387
if hyperparams[key] < 0:
388388
continue
389-
hyperparams[key] = constant_fn(float(hyperparams[key]))
389+
hyperparams[key] = ConstantSchedule(float(hyperparams[key]))
390390
else:
391391
raise ValueError(f"Invalid value for {key}: {hyperparams[key]}")
392392
return hyperparams

0 commit comments

Comments
 (0)