mirror of
https://github.com/saymrwulf/stable-baselines3.git
synced 2026-11-17 08:56:08 +00:00
Relax test
This commit is contained in:
parent
98c1a637cf
commit
6daf82bf74
1 changed files with 3 additions and 3 deletions
|
|
@ -337,11 +337,11 @@ def test_fps_logger(tmp_path, algo):
|
||||||
|
|
||||||
# fps should be at most max_fps
|
# fps should be at most max_fps
|
||||||
model.learn(100, log_interval=1)
|
model.learn(100, log_interval=1)
|
||||||
assert max_fps / 4 <= logger.name_to_value["time/fps"] <= max_fps
|
assert max_fps / 10 <= logger.name_to_value["time/fps"] <= max_fps
|
||||||
|
|
||||||
# second time, FPS should be the same
|
# second time, FPS should be the same
|
||||||
model.learn(100, log_interval=1)
|
model.learn(100, log_interval=1)
|
||||||
assert max_fps / 4 <= logger.name_to_value["time/fps"] <= max_fps
|
assert max_fps / 10 <= logger.name_to_value["time/fps"] <= max_fps
|
||||||
|
|
||||||
# Artificially increase num_timesteps to check
|
# Artificially increase num_timesteps to check
|
||||||
# that fps computation is reset at each call to learn()
|
# that fps computation is reset at each call to learn()
|
||||||
|
|
@ -349,4 +349,4 @@ def test_fps_logger(tmp_path, algo):
|
||||||
|
|
||||||
# third time, FPS should be the same
|
# third time, FPS should be the same
|
||||||
model.learn(100, log_interval=1, reset_num_timesteps=False)
|
model.learn(100, log_interval=1, reset_num_timesteps=False)
|
||||||
assert max_fps / 4 <= logger.name_to_value["time/fps"] <= max_fps
|
assert max_fps / 10 <= logger.name_to_value["time/fps"] <= max_fps
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue