Skip to content

Commit 0906206

Browse files
author
Vincent Moens
authored
[Feature] Roboset datasets (#1743)
1 parent 14a99f8 commit 0906206

File tree

17 files changed

+1020
-42
lines changed

17 files changed

+1020
-42
lines changed

.github/unittest/linux_libs/scripts_d4rl/run_test.sh

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -37,25 +37,6 @@ conda deactivate && conda activate ./env
3737
# this workflow only tests the libs
3838
python -c "import gym, d4rl"
3939

40-
python .github/unittest/helpers/coverage_run_parallel.py -m pytest test/test_libs.py --instafail -v --durations 200 --capture no -k TestD4RL --error-for-skips
40+
python .github/unittest/helpers/coverage_run_parallel.py -m pytest test/test_libs.py --instafail -v --durations 200 --capture no -k TestD4RL --error-for-skips --runslow
4141
coverage combine
4242
coverage xml -i
43-
44-
## check what happens if we update gym
45-
#pip install gym -U
46-
#python -c """
47-
#from torchrl.data.datasets import D4RLExperienceReplay
48-
#data = D4RLExperienceReplay('halfcheetah-medium-v2', batch_size=10, from_env=False, direct_download=True)
49-
#for batch in data:
50-
# print(batch)
51-
# break
52-
#
53-
#data = D4RLExperienceReplay('halfcheetah-medium-v2', batch_size=10, from_env=False, direct_download=False)
54-
#for batch in data:
55-
# print(batch)
56-
# break
57-
#
58-
#import d4rl
59-
#import gym
60-
#gym.make('halfcheetah-medium-v2')
61-
#"""

.github/unittest/linux_libs/scripts_minari/run_test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ conda deactivate && conda activate ./env
2222
# this workflow only tests the libs
2323
python -c "import minari"
2424

25-
python .github/unittest/helpers/coverage_run_parallel.py -m pytest test/test_libs.py --instafail -v --durations 200 --capture no -k TestMinari --error-for-skips
25+
python .github/unittest/helpers/coverage_run_parallel.py -m pytest test/test_libs.py --instafail -v --durations 200 --capture no -k TestMinari --error-for-skips --runslow
2626
coverage combine
2727
coverage xml -i
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
channels:
2+
- pytorch
3+
- defaults
4+
dependencies:
5+
- pip
6+
- pip:
7+
- hypothesis
8+
- future
9+
- cloudpickle
10+
- pytest
11+
- pytest-cov
12+
- pytest-mock
13+
- pytest-instafail
14+
- pytest-rerunfailures
15+
- pytest-error-for-skips
16+
- expecttest
17+
- pyyaml
18+
- scipy
19+
- hydra-core
20+
- huggingface_hub
21+
- tqdm
22+
- h5py
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
#!/usr/bin/env bash
2+
3+
unset PYTORCH_VERSION
4+
# For unittest, nightly PyTorch is used as the following section,
5+
# so no need to set PYTORCH_VERSION.
6+
# In fact, keeping PYTORCH_VERSION forces us to hardcode PyTorch version in config.
7+
apt-get update && apt-get install -y git wget gcc g++
8+
#apt-get update && apt-get install -y git wget freeglut3 freeglut3-dev
9+
10+
set -e
11+
12+
eval "$(./conda/bin/conda shell.bash hook)"
13+
conda activate ./env
14+
15+
if [ "${CU_VERSION:-}" == cpu ] ; then
16+
version="cpu"
17+
else
18+
if [[ ${#CU_VERSION} -eq 4 ]]; then
19+
CUDA_VERSION="${CU_VERSION:2:1}.${CU_VERSION:3:1}"
20+
elif [[ ${#CU_VERSION} -eq 5 ]]; then
21+
CUDA_VERSION="${CU_VERSION:2:2}.${CU_VERSION:4:1}"
22+
fi
23+
echo "Using CUDA $CUDA_VERSION as determined by CU_VERSION ($CU_VERSION)"
24+
version="$(python -c "print('.'.join(\"${CUDA_VERSION}\".split('.')[:2]))")"
25+
fi
26+
27+
28+
# submodules
29+
git submodule sync && git submodule update --init --recursive
30+
31+
printf "Installing PyTorch with %s\n" "${CU_VERSION}"
32+
if [ "${CU_VERSION:-}" == cpu ] ; then
33+
# conda install -y pytorch torchvision cpuonly -c pytorch-nightly
34+
# use pip to install pytorch as conda can frequently pick older release
35+
# conda install -y pytorch cpuonly -c pytorch-nightly
36+
pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu --force-reinstall
37+
else
38+
pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu121 --force-reinstall
39+
fi
40+
41+
# install tensordict
42+
pip install git+https://github.com/pytorch/tensordict.git
43+
44+
# smoke test
45+
python -c "import functorch;import tensordict"
46+
47+
printf "* Installing torchrl\n"
48+
python setup.py develop
49+
50+
# smoke test
51+
python -c "import torchrl"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
eval "$(./conda/bin/conda shell.bash hook)"
6+
conda activate ./env

0 commit comments

Comments
 (0)