Skip to content

Commit 6769fee

Browse files
authored
[Feature] Atari DQN dataset (#1815)
1 parent 55ec016 commit 6769fee

File tree

20 files changed

+1511
-66
lines changed

20 files changed

+1511
-66
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
channels:
2+
- pytorch
3+
- defaults
4+
- conda-forge
5+
dependencies:
6+
- pip
7+
- gsutil
8+
- pip:
9+
- hypothesis
10+
- future
11+
- cloudpickle
12+
- pytest
13+
- pytest-cov
14+
- pytest-mock
15+
- pytest-instafail
16+
- pytest-rerunfailures
17+
- pytest-error-for-skips
18+
- expecttest
19+
- pyyaml
20+
- scipy
21+
- hydra-core
22+
- tqdm
23+
- h5py
24+
- datasets
25+
- pillow
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 torchvision --index-url https://download.pytorch.org/whl/nightly/cpu
37+
else
38+
pip3 install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cu121
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)