Skip to content

Commit dec247d

Browse files
authored
add swig setup dependency and remove unrar/swig from github scripts (#321)
* add swig setup dependency and remove unrar/swig from github scripts * remove box2d dependency * remove box2d envs from tests
1 parent a12a828 commit dec247d

File tree

6 files changed

+10
-20
lines changed

6 files changed

+10
-20
lines changed

.github/workflows/python-package.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ jobs:
2525
python-version: ${{ matrix.python-version }}
2626
- name: Install dependencies
2727
run: |
28-
sudo apt-get install swig
29-
sudo apt-get install unrar
28+
python -m pip install --upgrade pip
3029
pip install torch~=2.0 --extra-index-url https://download.pytorch.org/whl/cpu
3130
make install
3231
- name: Lint code

.github/workflows/python-publish.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ jobs:
2525
- name: Install dependencies
2626
run: |
2727
python -m pip install --upgrade pip
28-
sudo apt-get install swig
29-
sudo apt-get install unrar
3028
pip install torch~=2.0 --extra-index-url https://download.pytorch.org/whl/cpu
3129
pip install setuptools wheel
3230
make install

all/presets/continuous_test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111

1212
class TestContinuousPresets(unittest.TestCase):
1313
def setUp(self):
14-
self.env = GymEnvironment("LunarLanderContinuous-v2")
14+
self.env = GymEnvironment("MountainCarContinuous-v0")
1515
self.env.reset()
1616
self.parallel_env = DuplicateEnvironment(
1717
[
18-
GymEnvironment("LunarLanderContinuous-v2"),
19-
GymEnvironment("LunarLanderContinuous-v2"),
18+
GymEnvironment("MountainCarContinuous-v0"),
19+
GymEnvironment("MountainCarContinuous-v0"),
2020
]
2121
)
2222
self.parallel_env.reset()

all/scripts/train_continuous.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def main():
99
continuous,
1010
GymEnvironment,
1111
description="Train an agent on a continuous control environment.",
12-
env_help="The name of the environment (e.g., LunarLanderContinuous-v2).",
12+
env_help="The name of the environment (e.g., MountainCarContinuous-v0).",
1313
default_frames=10e6,
1414
)
1515

integration/continuous_test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ class TestContinuousPresets(unittest.TestCase):
1010
def test_ddpg(self):
1111
validate_agent(
1212
ddpg.device("cpu").hyperparameters(replay_start_size=50),
13-
GymEnvironment("LunarLanderContinuous-v2"),
13+
GymEnvironment("MountainCarContinuous-v0"),
1414
)
1515

1616
def test_ppo(self):
17-
validate_agent(ppo.device("cpu"), GymEnvironment("LunarLanderContinuous-v2"))
17+
validate_agent(ppo.device("cpu"), GymEnvironment("MountainCarContinuous-v0"))
1818

1919
def test_sac(self):
2020
validate_agent(
2121
sac.device("cpu").hyperparameters(replay_start_size=50),
22-
GymEnvironment("LunarLanderContinuous-v2"),
22+
GymEnvironment("MountainCarContinuous-v0"),
2323
)
2424

2525
def test_mujoco(self):

setup.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
"atari": [
99
f"gymnasium[atari, accept-rom-license]~={GYMNASIUM_VERSION}",
1010
],
11-
"box2d": [
12-
f"gymnasium[box2d]~={GYMNASIUM_VERSION}",
13-
],
1411
"pybullet": [
1512
"pybullet>=3.2.2,<4",
1613
"gym>=0.10.0,<0.26.0",
@@ -37,11 +34,7 @@
3734
}
3835

3936
extras["all"] = (
40-
extras["atari"]
41-
+ extras["box2d"]
42-
+ extras["mujoco"]
43-
+ extras["pybullet"]
44-
+ extras["ma-atari"]
37+
extras["atari"] + extras["mujoco"] + extras["pybullet"] + extras["ma-atari"]
4538
)
4639
extras["dev"] = extras["all"] + extras["test"] + extras["docs"]
4740

@@ -75,7 +68,7 @@
7568
"numpy~=1.22", # math library
7669
"matplotlib~=3.7", # plotting library
7770
"opencv-python-headless~=4.0", # used by atari wrappers
78-
"torch~=2.0", # core deep learning library
71+
"torch~=2.2", # core deep learning library
7972
"tensorboard~=2.8", # logging and visualization
8073
"cloudpickle~=2.0", # used to copy environments
8174
],

0 commit comments

Comments
 (0)