Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Resolve DMC and mujoco pinned versions #2396

Merged
merged 2 commits into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/unittest/linux/scripts/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ dependencies:
- tensorboard
- imageio==2.26.0
- wandb
- dm_control<1.0.21
- mujoco<3.2.1
- dm_control
- mujoco
- mlflow
- av
- coverage
Expand Down
2 changes: 1 addition & 1 deletion .github/unittest/linux/scripts/run_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ echo "installing gymnasium"
pip3 install "gymnasium"
pip3 install ale_py
pip3 install mo-gymnasium[mujoco] # requires here bc needs mujoco-py
pip3 install "mujoco<3.2.1" -U
pip3 install "mujoco" -U

# sanity check: remove?
python3 -c """
Expand Down
4 changes: 2 additions & 2 deletions .github/unittest/linux_distributed/scripts/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ dependencies:
- tensorboard
- imageio==2.26.0
- wandb
- dm_control<1.0.21
- mujoco<3.2.1
- dm_control
- mujoco
- mlflow
- av
- coverage
Expand Down
4 changes: 2 additions & 2 deletions .github/unittest/linux_examples/scripts/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ dependencies:
- scipy
- hydra-core
- imageio==2.26.0
- dm_control<1.0.21
- mujoco<3.2.1
- dm_control
- mujoco
- mlflow
- av
- coverage
Expand Down
4 changes: 2 additions & 2 deletions .github/unittest/linux_libs/scripts_envpool/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ dependencies:
- expecttest
- pyyaml
- scipy
- dm_control<1.0.21
- mujoco<3.2.1
- dm_control
- mujoco
- coverage
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ dependencies:
- scipy
- hydra-core
- dm_control -e git+https://github.com/deepmind/dm_control.git@c053360edea6170acfd9c8f65446703307d9d352#egg={dm_control}
- mujoco<3.2.1
- mujoco
- patchelf
- pyopengl==3.1.4
- ray
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
python3 setup.py develop
python3 -m pip install pytest pytest-benchmark
python3 -m pip install "gym[accept-rom-license,atari]"
python3 -m pip install "dm_control<1.0.21" "mujoco<3.2.1"
python3 -m pip install "dm_control" "mujoco"
export TD_GET_DEFAULTS_TO_NONE=1
- name: Run benchmarks
run: |
Expand Down Expand Up @@ -97,7 +97,7 @@ jobs:
python3 setup.py develop
python3 -m pip install pytest pytest-benchmark
python3 -m pip install "gym[accept-rom-license,atari]"
python3 -m pip install "dm_control<1.0.21" "mujoco<3.2.1"
python3 -m pip install "dm_control" "mujoco"
export TD_GET_DEFAULTS_TO_NONE=1
- name: check GPU presence
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/benchmarks_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
python3 setup.py develop
python3 -m pip install pytest pytest-benchmark
python3 -m pip install "gym[accept-rom-license,atari]"
python3 -m pip install "dm_control<1.0.21" "mujoco<3.2.1"
python3 -m pip install "dm_control" "mujoco"
export TD_GET_DEFAULTS_TO_NONE=1
- name: Setup benchmarks
run: |
Expand Down Expand Up @@ -108,7 +108,7 @@ jobs:
python3 setup.py develop
python3 -m pip install pytest pytest-benchmark
python3 -m pip install "gym[accept-rom-license,atari]"
python3 -m pip install "dm_control<1.0.21" "mujoco<3.2.1"
python3 -m pip install "dm_control" "mujoco"
export TD_GET_DEFAULTS_TO_NONE=1
- name: check GPU presence
run: |
Expand Down
4 changes: 2 additions & 2 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ docutils
sphinx_design

torchvision
dm_control<1.0.21
mujoco<3.2.1
dm_control
mujoco
atari-py
ale-py
gym[classic_control,accept-rom-license]
Expand Down
9 changes: 3 additions & 6 deletions sota-implementations/cql/cql_offline.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@ def main(cfg: "DictConfig"): # noqa: F821
device = "cpu"
device = torch.device(device)

# Create replay buffer
replay_buffer = make_offline_replay_buffer(cfg.replay_buffer)

# Create env
train_env, eval_env = make_environment(
cfg, train_num_envs=1, eval_num_envs=cfg.logger.eval_envs, logger=logger
)

# Create replay buffer
replay_buffer = make_offline_replay_buffer(cfg.replay_buffer)

# Create agent
model = make_cql_model(cfg, train_env, eval_env, device)
del train_env
Expand Down Expand Up @@ -107,9 +107,6 @@ def main(cfg: "DictConfig"): # noqa: F821

q_loss = q_loss + cql_loss

alpha_loss = loss_vals["loss_alpha"]
alpha_prime_loss = loss_vals["loss_alpha_prime"]

# update model
alpha_loss = loss_vals["loss_alpha"]
alpha_prime_loss = loss_vals["loss_alpha_prime"]
Expand Down
13 changes: 7 additions & 6 deletions test/test_transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -10423,17 +10423,18 @@ def test_transform_no_env(self, batch):
reason="EndOfLifeTransform can only be tested when Gym is present.",
)
class TestEndOfLife(TransformBase):
pytest.mark.filterwarnings("ignore:The base_env is not a gym env")

def test_trans_parallel_env_check(self, maybe_fork_ParallelEnv):
def make():
with set_gym_backend("gymnasium"):
return GymEnv(BREAKOUT_VERSIONED())

with pytest.warns(UserWarning, match="The base_env is not a gym env"):
with pytest.raises(AttributeError):
env = TransformedEnv(
maybe_fork_ParallelEnv(2, make), transform=EndOfLifeTransform()
)
check_env_specs(env)
with pytest.raises(AttributeError):
env = TransformedEnv(
maybe_fork_ParallelEnv(2, make), transform=EndOfLifeTransform()
)
check_env_specs(env)

def test_trans_serial_env_check(self):
def make():
Expand Down
Loading