-
Notifications
You must be signed in to change notification settings - Fork 936
Implement Gymnasium-compliant PPO script #320
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
Merged
Merged
Changes from 42 commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
be6da79
Add Gymnasium and dependencies
dtch1997 d098870
Implement Gymnasium-compliant PPO script
dtch1997 aa9ac0c
Ensure pre-commit passes
dtch1997 cb08637
Fix CI, add a `gymnasium_support` folder
vwxyzjn 5818d7d
update lock files
vwxyzjn 51a7128
add dependencies
vwxyzjn 363b48e
update requirements.txt; fix pre-commit
vwxyzjn e3174ca
update poetry files
vwxyzjn 8da5f7b
Support dm control action spaces
vwxyzjn 0544fcb
add dm_control support
vwxyzjn d30f3cf
Enable num_envs>1
dtch1997 99f7789
Enable auto-install of torch based on CUDA version
dtch1997 cbd83f6
Fix pre-commit
dtch1997 8cf18e3
bump torch version
vwxyzjn fe81b99
bump wandb version
vwxyzjn dd80937
change key for mujoco_py installation
vwxyzjn c46f700
update CI
vwxyzjn 0d3a5e1
update docs
vwxyzjn fa73a60
Merge branch 'gymnasium_ppo' of https://github.com/vwxyzjn/cleanrl in…
vwxyzjn 0381d7a
downgrade torch
vwxyzjn 6582fab
update docs
vwxyzjn b3f19fd
update teset cases
vwxyzjn 1e904a3
set default env = HalfCheetah-v4
vwxyzjn 3cd9917
directly replace `ppo_continuous_action.py`
vwxyzjn 08f9744
deprecate pybullet dependency in ppo
vwxyzjn b81d207
remove pybullet test case
vwxyzjn de3f410
support video recording to wandb
vwxyzjn 1b01a4f
update docs
vwxyzjn 73c0caf
update depdency for test cases
vwxyzjn 3df239a
update test cases and add dm_control tests
vwxyzjn 8a9a467
update docs
vwxyzjn b56fe05
update mkdocs base
vwxyzjn 7660199
revert doc changes
vwxyzjn 8fd5657
fix dm_control test cases
vwxyzjn a140a3e
quick docs
vwxyzjn 708cfad
fix tests on CI
vwxyzjn 6a41003
fix test case
vwxyzjn 3efbc24
fix CI
vwxyzjn 0e8df6f
Fix CI
vwxyzjn 19d08d5
update mujoco dependency
vwxyzjn 55f2209
Fix CI
vwxyzjn 7ef728c
fix CI
vwxyzjn d2b0a79
remote unused seed
vwxyzjn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.