Skip to content

Commit f5f99dc

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent d9e899f commit f5f99dc

29 files changed

+25
-11
lines changed

examples/demo_agents/video_plot_a2c.py

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
:width: 600
1010
1111
"""
12+
1213
# sphinx_gallery_thumbnail_path = 'thumbnails/video_plot_a2c.jpg'
1314

1415
from rlberry_research.agents.torch import A2CAgent

examples/demo_agents/video_plot_mbqvi.py

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
:width: 600
1010
1111
"""
12+
1213
# sphinx_gallery_thumbnail_path = 'thumbnails/video_plot_mbqvi.jpg'
1314
from rlberry_scool.agents.mbqvi import MBQVIAgent
1415
from rlberry_research.envs.finite import GridWorld

examples/demo_agents/video_plot_ppo.py

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
:width: 600
1010
1111
"""
12+
1213
# sphinx_gallery_thumbnail_path = 'thumbnails/video_plot_a2c.jpg'
1314

1415
from rlberry_research.agents.torch import PPOAgent

examples/demo_agents/video_plot_rs_kernel_ucbvi.py

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
:width: 600
1010
1111
"""
12+
1213
# sphinx_gallery_thumbnail_path = 'thumbnails/video_plot_rs_kernel_ucbvi.jpg'
1314

1415
from rlberry_research.envs import Acrobot

examples/demo_agents/video_plot_rsucbvi.py

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
:width: 600
1010
1111
"""
12+
1213
# sphinx_gallery_thumbnail_path = 'thumbnails/video_plot_rsucbvi.jpg'
1314

1415
from rlberry_research.agents import RSUCBVIAgent

examples/demo_agents/video_plot_vi.py

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
:width: 600
1010
1111
"""
12+
1213
# sphinx_gallery_thumbnail_path = 'thumbnails/video_plot_vi.jpg'
1314

1415
from rlberry_scool.agents.dynprog import ValueIterationAgent

examples/demo_bandits/plot_compare_index_bandits.py

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
This script Compare several bandits agents and as a sub-product also shows
77
how to use subplots in with `plot_writer_data`
88
"""
9+
910
import numpy as np
1011
import matplotlib.pyplot as plt
1112
from rlberry_research.envs.bandits import BernoulliBandit

examples/demo_bandits/plot_mirror_bandit.py

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
The code is in three parts: definition of environment, definition of agent,
1313
and finally definition of the experiment.
1414
"""
15+
1516
import numpy as np
1617

1718
from rlberry.manager import ExperimentManager, read_writer_data

examples/demo_env/example_atari_atlantis_vectorized_ppo.py

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
:width: 600
1212
1313
"""
14+
1415
# sphinx_gallery_thumbnail_path = 'thumbnails/example_plot_atari_atlantis_vectorized_ppo.jpg'
1516

1617

examples/demo_env/example_atari_breakout_vectorized_ppo.py

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
:width: 600
1212
1313
"""
14+
1415
# sphinx_gallery_thumbnail_path = 'thumbnails/example_plot_atari_breakout_vectorized_ppo.jpg'
1516

1617

examples/demo_env/video_plot_acrobot.py

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
:width: 600
1010
1111
"""
12+
1213
# sphinx_gallery_thumbnail_path = 'thumbnails/video_plot_acrobot.jpg'
1314

1415
from rlberry_research.envs import Acrobot

examples/demo_env/video_plot_apple_gold.py

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
:width: 600
1010
1111
"""
12+
1213
# sphinx_gallery_thumbnail_path = 'thumbnails/video_plot_apple_gold.jpg'
1314
from rlberry_research.envs.benchmarks.grid_exploration.apple_gold import AppleGold
1415
from rlberry_scool.agents.dynprog import ValueIterationAgent

examples/demo_env/video_plot_atari_freeway.py

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
:width: 600
1212
1313
"""
14+
1415
# sphinx_gallery_thumbnail_path = 'thumbnails/video_plot_atari_freeway.jpg'
1516

1617

examples/demo_env/video_plot_chain.py

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
:width: 600
99
1010
"""
11+
1112
# sphinx_gallery_thumbnail_path = 'thumbnails/video_plot_chain.jpg'
1213

1314

examples/demo_env/video_plot_gridworld.py

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
.. video:: ../../video_plot_gridworld.mp4
1111
:width: 600
1212
"""
13+
1314
# sphinx_gallery_thumbnail_path = 'thumbnails/video_plot_gridworld.jpg'
1415

1516
from rlberry_scool.agents.dynprog import ValueIterationAgent

examples/demo_env/video_plot_mountain_car.py

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
:width: 600
99
1010
"""
11+
1112
# sphinx_gallery_thumbnail_path = 'thumbnails/video_plot_montain_car.jpg'
1213

1314
from rlberry_scool.agents.mbqvi import MBQVIAgent

examples/demo_env/video_plot_old_gym_compatibility_wrapper_old_acrobot.py

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
:width: 600
99
1010
"""
11+
1112
# sphinx_gallery_thumbnail_path = 'thumbnails/video_plot_old_gym_acrobot.jpg'
1213

1314

examples/demo_env/video_plot_pball.py

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
:width: 600
99
1010
"""
11+
1112
# sphinx_gallery_thumbnail_path = 'thumbnails/video_plot_pball.jpg'
1213

1314
import numpy as np

examples/demo_env/video_plot_rooms.py

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
:width: 600
99
1010
"""
11+
1112
# sphinx_gallery_thumbnail_path = 'thumbnails/video_plot_rooms.jpg'
1213

1314
from rlberry_research.envs.benchmarks.grid_exploration.nroom import NRoom

examples/demo_env/video_plot_springcartpole.py

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
:width: 600
1212
1313
"""
14+
1415
# sphinx_gallery_thumbnail_path = 'thumbnails/video_plot_springcartpole.jpg'
1516

1617
from rlberry_research.envs.classic_control import SpringCartPole

examples/demo_env/video_plot_twinrooms.py

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
:width: 600
99
1010
"""
11+
1112
# sphinx_gallery_thumbnail_path = 'thumbnails/video_plot_twinrooms.jpg'
1213

1314
from rlberry_research.envs.benchmarks.generalization.twinrooms import TwinRooms

examples/example_venv.py

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
and are only there to give the script's text.
1414
"""
1515

16-
1716
from rlberry.manager import with_venv, run_venv_xp
1817

1918

examples/plot_checkpointing.py

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
This is a minimal example of how to create checkpoints while training
99
your agents, and how to restore from a previous checkpoint.
1010
"""
11+
1112
from rlberry.agents import Agent
1213
from rlberry.manager import ExperimentManager
1314
from rlberry.manager import plot_writer_data

examples/plot_writer_wrapper.py

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
`rlberry.manager.plot_writer_data` documentation for more information.
2020
"""
2121

22-
2322
import numpy as np
2423

2524
from rlberry_scool.envs import GridWorld

rlberry/rendering/render_interface.py

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
Interface that allows 2D rendering.
33
"""
44

5-
65
from abc import ABC, abstractmethod
76

87
from rlberry.rendering.opengl_render2d import OpenGLRender2D

rlberry/tests/test_agents_base.py

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
77
"""
88

9-
109
import pytest
1110
import numpy as np
1211
import sys

rlberry/wrappers/tests/old_env/old_acrobot.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,7 @@ def _dsdt(self, s_augmented, t):
219219
# the following line is consistent with the java implementation
220220
# and the book
221221
ddtheta2 = (
222-
a
223-
+ d2 / d1 * phi1
224-
- m2 * l1 * lc2 * dtheta1**2 * np.sin(theta2)
225-
- phi2
222+
a + d2 / d1 * phi1 - m2 * l1 * lc2 * dtheta1**2 * np.sin(theta2) - phi2
226223
) / (m2 * lc2**2 + I2 - d2**2 / d1)
227224
ddtheta1 = -(d2 * ddtheta2 + phi1) / d1
228225
return (dtheta1, dtheta2, ddtheta1, ddtheta2, 0.0)

rlberry/wrappers/tests/old_env/old_pendulum.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,7 @@ def step(self, action):
8282

8383
action = np.clip(action, -self.max_torque, self.max_torque)[0]
8484
self.last_action = action # for rendering
85-
costs = (
86-
angle_normalize(theta) ** 2 + 0.1 * thetadot**2 + 0.001 * (action**2)
87-
)
85+
costs = angle_normalize(theta) ** 2 + 0.1 * thetadot**2 + 0.001 * (action**2)
8886

8987
# compute the next state after action
9088
newthetadot = (

scripts/fetch_contributors.py

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
The table should be updated for each new inclusion in the teams.
55
Generating the table requires admin rights.
66
"""
7+
78
import requests
89
import time
910
from pathlib import Path

0 commit comments

Comments
 (0)