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

[Environment, Docs] SMACv2 and docs on action masking #1466

Merged
merged 42 commits into from
Sep 15, 2023
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
7d291a7
init
vmoens Jul 27, 2023
32d7dda
amend
matteobettini Aug 18, 2023
58cbe43
amend
matteobettini Aug 18, 2023
d8913ec
amend
matteobettini Aug 21, 2023
97263eb
amend
matteobettini Aug 21, 2023
266a84d
amend
matteobettini Aug 21, 2023
7e6b9c9
amend
matteobettini Aug 21, 2023
646e233
add info
matteobettini Aug 21, 2023
e9f5257
add ci
matteobettini Aug 21, 2023
60a1563
add ci
matteobettini Aug 21, 2023
79ce182
amend
matteobettini Aug 21, 2023
a88e13b
amend
matteobettini Aug 21, 2023
28cd2b5
amend
matteobettini Aug 21, 2023
d0cf059
amend
matteobettini Aug 21, 2023
9014bc2
amend
matteobettini Aug 21, 2023
662dbb7
amend
matteobettini Aug 21, 2023
1b4325d
docs
matteobettini Aug 21, 2023
b6ea627
add tests
matteobettini Aug 22, 2023
9d9eb12
add group map
matteobettini Aug 29, 2023
0aec973
Merge branch 'main' into smacv2
matteobettini Aug 30, 2023
e5250d8
Merge branch 'main' into smacv2
matteobettini Sep 5, 2023
be12ac1
fixes
matteobettini Sep 5, 2023
74d7449
fix import
matteobettini Sep 5, 2023
111bbeb
collector test
matteobettini Sep 5, 2023
d6daa7c
review fixes
matteobettini Sep 5, 2023
613b4b6
change default categorical actions to true due to absence of one hot …
matteobettini Sep 5, 2023
09b0fc7
Merge branch 'main' into smacv2
matteobettini Sep 5, 2023
d6dd19b
add docs
matteobettini Sep 5, 2023
b399c40
amend
matteobettini Sep 5, 2023
f43ffed
amend
matteobettini Sep 5, 2023
64efb69
amend
matteobettini Sep 6, 2023
b1f0a05
Merge branch 'main' into smacv2
matteobettini Sep 6, 2023
d3b6d04
Merge branch 'main' into smacv2
matteobettini Sep 14, 2023
6a56db6
ci
matteobettini Sep 14, 2023
e2e90ca
add conditional ci
matteobettini Sep 14, 2023
efcd68e
Merge branch 'main' into smacv2
matteobettini Sep 14, 2023
ba10220
add conditional ci
matteobettini Sep 14, 2023
7778cca
import
matteobettini Sep 15, 2023
abd8281
test
matteobettini Sep 15, 2023
a3c2334
test
matteobettini Sep 15, 2023
b8aa329
test
matteobettini Sep 15, 2023
382d06b
empty
matteobettini Sep 15, 2023
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
21 changes: 21 additions & 0 deletions .circleci/unittest/linux_libs/scripts_smacv2/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
channels:
- pytorch
- defaults
dependencies:
- pip
- pip:
- cloudpickle
- gym
- gym-notices
- importlib-metadata
- zipp
- pytest
- pytest-cov
- pytest-mock
- pytest-instafail
- pytest-rerunfailures
- pytest-error-for-skips
- expecttest
- pyyaml
- numpy==1.23.0
- git+https://github.com/oxwhirl/smacv2.git
46 changes: 46 additions & 0 deletions .circleci/unittest/linux_libs/scripts_smacv2/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/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 %s\n" "${CU_VERSION}"
if [ "${CU_VERSION:-}" == cpu ] ; then
# conda install -y pytorch torchvision cpuonly -c pytorch-nightly
# use pip to install pytorch as conda can frequently pick older release
# conda install -y pytorch cpuonly -c pytorch-nightly
pip3 install --pre torch --extra-index-url https://download.pytorch.org/whl/nightly/cpu --force-reinstall
else
pip3 install --pre torch --extra-index-url https://download.pytorch.org/whl/nightly/cu116 --force-reinstall
fi

# install tensordict
pip install git+https://github.com/pytorch-labs/tensordict.git

# smoke test
python -c "import tensordict"

printf "* Installing torchrl\n"
python setup.py develop
python -c "import torchrl"
6 changes: 6 additions & 0 deletions .circleci/unittest/linux_libs/scripts_smacv2/post_process.sh
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
Loading