-
Notifications
You must be signed in to change notification settings - Fork 679
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement Gymnasium-compliant PPO script (#320)
* Add Gymnasium and dependencies * Implement Gymnasium-compliant PPO script * Ensure pre-commit passes * Fix CI, add a `gymnasium_support` folder * update lock files * add dependencies * update requirements.txt; fix pre-commit * update poetry files * Support dm control action spaces * add dm_control support * Enable num_envs>1 * Enable auto-install of torch based on CUDA version * Fix pre-commit * bump torch version * bump wandb version * change key for mujoco_py installation * update CI * update docs * downgrade torch * update docs * update teset cases * set default env = HalfCheetah-v4 * directly replace `ppo_continuous_action.py` * deprecate pybullet dependency in ppo * remove pybullet test case * support video recording to wandb * update docs * update depdency for test cases * update test cases and add dm_control tests * update docs * update mkdocs base * revert doc changes * fix dm_control test cases * quick docs * fix tests on CI * fix test case * fix CI * Fix CI * update mujoco dependency * Fix CI * fix CI * remote unused seed Co-authored-by: Daniel Tan <[email protected]> Co-authored-by: Costa Huang <[email protected]>
- Loading branch information
1 parent
cb2b746
commit b558b2b
Showing
37 changed files
with
864 additions
and
191 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,11 +5,6 @@ on: | |
- '**/README.md' | ||
- 'docs/**/*' | ||
- 'cloud/**/*' | ||
pull_request: | ||
paths-ignore: | ||
- '**/README.md' | ||
- 'docs/**/*' | ||
- 'cloud/**/*' | ||
jobs: | ||
test-core-envs: | ||
strategy: | ||
|
@@ -133,7 +128,6 @@ jobs: | |
- name: Run pybullet tests | ||
run: poetry run pytest tests/test_procgen.py | ||
|
||
|
||
test-mujoco-envs: | ||
strategy: | ||
fail-fast: false | ||
|
@@ -153,25 +147,76 @@ jobs: | |
poetry-version: ${{ matrix.poetry-version }} | ||
|
||
# mujoco tests | ||
- name: Install core dependencies | ||
run: poetry install --with pytest | ||
- name: Install pybullet dependencies | ||
run: poetry install --with pybullet | ||
- name: Install mujoco dependencies | ||
run: poetry install --with mujoco | ||
- name: Install jax dependencies | ||
run: poetry install --with jax | ||
- name: Install dependencies | ||
run: poetry install --with pytest,mujoco,dm_control | ||
- name: Downgrade setuptools | ||
run: poetry run pip install setuptools==59.5.0 | ||
- name: install mujoco dependencies | ||
run: | | ||
sudo apt-get update && sudo apt-get -y install libgl1-mesa-glx libosmesa6 libglfw3 | ||
- name: Run mujoco tests | ||
continue-on-error: true # MUJOCO_GL=osmesa results in `free(): invalid pointer` | ||
run: poetry run pytest tests/test_mujoco.py | ||
|
||
test-mujoco-envs-windows-mac: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: [3.8] | ||
poetry-version: [1.2] | ||
os: [macos-latest, windows-latest] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Run image | ||
uses: abatilo/[email protected] | ||
with: | ||
poetry-version: ${{ matrix.poetry-version }} | ||
|
||
# mujoco tests | ||
- name: Install dependencies | ||
run: poetry install --with pytest,mujoco,dm_control | ||
- name: Downgrade setuptools | ||
run: poetry run pip install setuptools==59.5.0 | ||
- name: Run mujoco tests | ||
run: poetry run pytest tests/test_mujoco.py | ||
|
||
|
||
test-mujoco_py-envs: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: [3.8] | ||
poetry-version: [1.2] | ||
os: [ubuntu-22.04] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Run image | ||
uses: abatilo/[email protected] | ||
with: | ||
poetry-version: ${{ matrix.poetry-version }} | ||
|
||
# mujoco_py tests | ||
- name: Install dependencies | ||
run: poetry install --with pytest,pybullet,mujoco_py,mujoco,jax | ||
- name: Downgrade setuptools | ||
run: poetry run pip install setuptools==59.5.0 | ||
- name: install mujoco_py dependencies | ||
run: | | ||
sudo apt-get update && sudo apt-get -y install wget unzip software-properties-common \ | ||
libgl1-mesa-dev \ | ||
libgl1-mesa-glx \ | ||
libglew-dev \ | ||
libosmesa6-dev patchelf | ||
- name: Run mujoco tests | ||
run: poetry run pytest tests/test_mujoco.py | ||
- name: Run mujoco_py tests | ||
run: poetry run pytest tests/test_mujoco_py.py | ||
|
||
test-envpool-envs: | ||
strategy: | ||
|
@@ -251,4 +296,4 @@ jobs: | |
- name: Install ROMs | ||
run: poetry run AutoROM --accept-license | ||
- name: Run pettingzoo tests | ||
run: poetry run pytest tests/test_pettingzoo_ma_atari.py | ||
run: poetry run pytest tests/test_pettingzoo_ma_atari.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
b558b2b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
cleanrl – ./
cleanrl-git-master-vwxyzjn.vercel.app
cleanrl-vwxyzjn.vercel.app
cleanrl.vercel.app
docs.cleanrl.dev