-
Notifications
You must be signed in to change notification settings - Fork 433
[Environment] Meltingpot #2054
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
[Environment] Meltingpot #2054
Changes from all commits
Commits
Show all changes
68 commits
Select commit
Hold shift + click to select a range
b3ef4ee
meltingpot
matteobettini 98e0abd
remove import
matteobettini f73bbf0
reset
matteobettini e7e1b37
reset
matteobettini 0d1d65c
simplify reset
matteobettini b56beb1
step
matteobettini 8166bf7
tests
matteobettini bbcb0b2
docs
matteobettini 4ef5197
oops
matteobettini 114ed2f
render
matteobettini aeedda0
docstring render
matteobettini 6974d84
more tests
matteobettini 1db8cb2
examples in docs
matteobettini ea4388c
add to init
matteobettini 6cfda1b
Update torchrl/envs/libs/meltingpot.py
matteobettini 096bc94
Update torchrl/envs/libs/meltingpot.py
matteobettini 0ea5047
remove Optional type
matteobettini 9f8f642
Merge remote-tracking branch 'origin/melitingpot' into melitingpot
matteobettini 8ef8cb1
alphabetic order tests
matteobettini f812612
amend
matteobettini ef7ff2d
add meltingpot description to docs
matteobettini 4ca4555
review comment -> improved efficiency
matteobettini dbca972
get_rgb_image
matteobettini 3d2f55a
Merge branch 'main' into melitingpot
matteobettini 0b0333b
get_rgb_image
matteobettini 1593753
lazy import
matteobettini 22dbc97
Update torchrl/envs/libs/meltingpot.py
vmoens 5e070ce
pypi name
matteobettini 7fb1fb8
Merge remote-tracking branch 'origin/melitingpot' into melitingpot
matteobettini c0ce67d
world prefix
matteobettini 80036ae
add to torchrl[marl]
matteobettini 8b776b4
remove world prefix in specs and tds
matteobettini 6188003
typo
matteobettini 2a3c465
amend
matteobettini 2370be9
change python version
matteobettini 24d5428
remove dependencies
matteobettini 467a480
explicit dmlab2d?
matteobettini ee35cae
amend
c6f516d
python 3.10?
matteobettini 4f6ffc3
less explicit deps
matteobettini 18d7bce
attempt different import
matteobettini da2d235
Merge remote-tracking branch 'matteobettini/melitingpot' into melitin…
8d09531
amend
71a6db6
Merge remote-tracking branch 'matteobettini/melitingpot' into melitin…
6c8ff35
amend
0b4c7d5
amend
883b044
amend
b8d7527
Update .github/unittest/linux_libs/scripts_meltingpot/install.sh
vmoens 7387392
attempt 3.9 python
matteobettini b51f688
attempt 3.9 python
matteobettini 2bdcbd4
Merge remote-tracking branch 'origin/main' into melitingpot
24a219c
Merge remote-tracking branch 'origin/main' into melitingpot
179f280
amend
4eef4d5
amend
bf1ff61
new attempt
matteobettini 87937ca
Update .github/unittest/linux_libs/scripts_meltingpot/install.sh
vmoens ea44505
Update .github/unittest/linux_libs/scripts_meltingpot/install.sh
vmoens c04f821
Update .github/workflows/test-linux-libs.yml
vmoens ea1367b
Update setup_env.sh
vmoens 8376e47
Update .github/unittest/linux_libs/scripts_meltingpot/setup_env.sh
vmoens 99b5ff6
Apply suggestions from code review
vmoens 6196e55
Update test-linux-libs.yml
vmoens 6879a41
Merge branch 'main' into melitingpot
418fd3f
Update setup_env.sh
vmoens bcc7da2
Update setup_env.sh
vmoens 74ca60f
Update .github/unittest/linux_libs/scripts_meltingpot/setup_env.sh
vmoens 4953bac
amend
530e169
Merge remote-tracking branch 'matteobettini/melitingpot' into melitin…
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
15 changes: 15 additions & 0 deletions
15
.github/unittest/linux_libs/scripts_meltingpot/environment.yml
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 |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| channels: | ||
| - pytorch | ||
| - defaults | ||
| dependencies: | ||
| - pip | ||
| - pip: | ||
| - cloudpickle | ||
| - torch | ||
| - pytest | ||
| - pytest-cov | ||
| - pytest-mock | ||
| - pytest-instafail | ||
| - pytest-rerunfailures | ||
| - pytest-error-for-skips | ||
| - expecttest |
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 |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| unset PYTORCH_VERSION | ||
| # For unittest, nightly PyTorch is used as the following section, | ||
| # so no need to set PYTORCH_VERSION. | ||
| # In fact, keeping PYTORCH_VERSION forces us to hardcode PyTorch version in config. | ||
|
|
||
| set -e | ||
|
|
||
| eval "$(./conda/bin/conda shell.bash hook)" | ||
| conda activate ./env | ||
|
|
||
| if [ "${CU_VERSION:-}" == cpu ] ; then | ||
| version="cpu" | ||
| else | ||
| if [[ ${#CU_VERSION} -eq 4 ]]; then | ||
| CUDA_VERSION="${CU_VERSION:2:1}.${CU_VERSION:3:1}" | ||
| elif [[ ${#CU_VERSION} -eq 5 ]]; then | ||
| CUDA_VERSION="${CU_VERSION:2:2}.${CU_VERSION:4:1}" | ||
| fi | ||
| echo "Using CUDA $CUDA_VERSION as determined by CU_VERSION ($CU_VERSION)" | ||
| version="$(python -c "print('.'.join(\"${CUDA_VERSION}\".split('.')[:2]))")" | ||
| fi | ||
|
|
||
| # submodules | ||
| git submodule sync && git submodule update --init --recursive | ||
|
|
||
| printf "Installing PyTorch with cu121" | ||
| if [[ "$TORCH_VERSION" == "nightly" ]]; then | ||
| if [ "${CU_VERSION:-}" == cpu ] ; then | ||
| pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu -U | ||
| else | ||
| pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu121 -U | ||
| fi | ||
| elif [[ "$TORCH_VERSION" == "stable" ]]; then | ||
| if [ "${CU_VERSION:-}" == cpu ] ; then | ||
| pip3 install torch --index-url https://download.pytorch.org/whl/cpu | ||
| else | ||
| pip3 install torch --index-url https://download.pytorch.org/whl/cu121 | ||
| fi | ||
| else | ||
| printf "Failed to install pytorch" | ||
| exit 1 | ||
| fi | ||
|
|
||
| # install tensordict | ||
| if [[ "$RELEASE" == 0 ]]; then | ||
| pip3 install git+https://github.com/pytorch/tensordict.git | ||
| else | ||
| pip3 install tensordict | ||
| fi | ||
|
|
||
| # smoke test | ||
| python -c "import tensordict" | ||
|
|
||
| printf "* Installing torchrl\n" | ||
| python setup.py develop | ||
| python -c "import torchrl" | ||
|
|
||
| conda install conda-forge::jq -y | ||
| # Install meltingpot from git | ||
| #pip3 install dmlab2d | ||
| LATEST_TAG=$(curl "https://api.github.com/repos/google-deepmind/meltingpot/tags" | jq -r '.[0].name') | ||
|
|
||
| echo $(ldd --version) | ||
|
|
||
| pip3 install git+https://github.com/google-deepmind/meltingpot@${LATEST_TAG} | ||
6 changes: 6 additions & 0 deletions
6
.github/unittest/linux_libs/scripts_meltingpot/post_process.sh
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 |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| set -e | ||
|
|
||
| eval "$(./conda/bin/conda shell.bash hook)" | ||
| conda activate ./env |
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.