Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
119 commits
Select commit Hold shift + click to select a range
21e4b15
Initial commit for torchrl documentation using Sphinx. Example script…
Nov 7, 2022
a612058
Addressing two issues (not displaying TorchRL documentation properly …
Nov 8, 2022
e176004
Merge branch 'pytorch:main' into tutorials_py
se-yi Nov 8, 2022
05f61b8
[Doc] Added two new tutorials - tensordict_module.py and multi_task.p…
Nov 9, 2022
7aeee38
tutos
vmoens Nov 9, 2022
5d168b4
Merge pull request #1 from vmoens/tutorials_py2
se-yi Nov 10, 2022
4e37932
Merge branch 'main' of https://github.com/se-yi/rl into tutorials_py
Nov 10, 2022
6b5f755
[Doc] Adding the 3 remaining scripts: coding_ddpg, coding_dqn, and to…
Nov 10, 2022
ab63318
Merge branch 'main' into tutorials_py
vmoens Nov 12, 2022
3337b94
Merge branch 'tutorials_py' of https://github.com/se-yi/rl into tutor…
vmoens Nov 12, 2022
cca8992
faster runs
vmoens Nov 12, 2022
84d36d6
lint and bf
vmoens Nov 13, 2022
8ffb086
lint and bf
vmoens Nov 14, 2022
1d4e2b8
bugfix
vmoens Nov 14, 2022
c0863b0
[Doc] Proofreading torchrl_demo.py script
Nov 15, 2022
c4c7448
Merge branch 'pytorch:main' into tutorials_py
se-yi Nov 15, 2022
3f4fe69
[Doc] Proofreading tensordict_tutorial/tensordict_module scripts
Nov 15, 2022
e83d4b1
Merge branch 'tutorials_py' of https://github.com/se-yi/rl into tutor…
Nov 15, 2022
3e0698b
[Doc] Proofreading multi_task and envs scripts.
Nov 15, 2022
f1bafe6
[Doc] Proofread coding_ddpg/dqn.
Nov 15, 2022
693b6cf
Merge branch 'main' into tutorials_py
vmoens Nov 15, 2022
dd14ff9
minor
vmoens Nov 15, 2022
7eae24f
Merge remote-tracking branch 'refs/remotes/se-yi/tutorials_py' into t…
vmoens Nov 15, 2022
112af7e
bf
vmoens Nov 15, 2022
e405651
lint
vmoens Nov 16, 2022
37db3dc
protobuf==3.20
vmoens Nov 16, 2022
e2f5729
test
vmoens Nov 16, 2022
2266de5
amend
vmoens Nov 16, 2022
2e1465d
removing protobuf
vmoens Nov 16, 2022
df8854b
amend
vmoens Nov 16, 2022
4a12183
amend
vmoens Nov 16, 2022
0c37d94
amend
vmoens Nov 16, 2022
daa23cb
amend
vmoens Nov 16, 2022
b423f6d
amend
vmoens Nov 16, 2022
62af274
osmesa
vmoens Nov 16, 2022
71f648b
cleanup
vmoens Nov 16, 2022
f204c11
cleanup
vmoens Nov 16, 2022
003d0ce
cleanup
vmoens Nov 16, 2022
051e10c
ignore training
vmoens Nov 16, 2022
363af85
less log
vmoens Nov 16, 2022
83ebdfe
amend
vmoens Nov 16, 2022
30d8d86
ssh
vmoens Nov 17, 2022
7e2e82f
revert
vmoens Nov 17, 2022
fcf7fef
new
vmoens Nov 17, 2022
b3d7a08
new
vmoens Nov 17, 2022
d9a076e
trying ubuntu
vmoens Nov 17, 2022
a726ced
trying ubuntu
vmoens Nov 17, 2022
e2be320
trying ubuntu
vmoens Nov 17, 2022
8be40a3
trying ubuntu
vmoens Nov 17, 2022
fff6a5b
trying ubuntu
vmoens Nov 17, 2022
59abe9a
trying ubuntu
vmoens Nov 17, 2022
81cfebd
trying ubuntu
vmoens Nov 17, 2022
5b09a2f
removing ssh
vmoens Nov 17, 2022
b522fa0
bf
vmoens Nov 17, 2022
ae315f7
bf
vmoens Nov 17, 2022
27d4891
bf
vmoens Nov 17, 2022
8b2fae1
bf
vmoens Nov 17, 2022
70856f5
bf
vmoens Nov 17, 2022
10f7267
bf
vmoens Nov 17, 2022
77a76fd
test with make html
Nov 17, 2022
d4f74ab
changing the documentation generation line
Nov 17, 2022
12d82b3
changing workflow to activate conda environment and removing
Nov 17, 2022
f8f0bb3
fix conda activate
Nov 17, 2022
b391933
fix conda activate - initializing bash
Nov 17, 2022
f35378d
fix conda activate - initializing bash with source
Nov 17, 2022
2ce3a49
fix conda activate
Nov 17, 2022
a7dd730
running without need for mujoco
Nov 17, 2022
e2fd39e
docs.yml update for sphinx-build
Nov 17, 2022
5f36c84
docs.yml add a tmate session
Nov 17, 2022
fac9456
docs.yml add a tmate session at the end
Nov 17, 2022
2da1c35
testing mujoco=egl for the scripts using them
Nov 17, 2022
408bd5a
add the rest of the tutorials - ddpg and dqn scripts
Nov 17, 2022
ab46db1
testing with smaller total frame number in coding_dqn
Nov 18, 2022
0727baf
testing with smaller hp number in coding_dqn
Nov 18, 2022
dd40e07
testing with different format of building sphinx doc
Nov 18, 2022
3ae9067
testing with different format of building sphinx doc - command change
Nov 18, 2022
4e5471f
testing with different format of building sphinx doc - command change
Nov 18, 2022
76f5791
testing with different format of building sphinx doc - command change
Nov 18, 2022
0f52605
testing with different format of building sphinx doc - command change
Nov 18, 2022
9493f63
testing with different format of building sphinx doc - command change
Nov 18, 2022
c9cee51
testing with different format of building sphinx doc - command change…
Nov 18, 2022
74647b1
testing with different format of building sphinx doc - command change…
Nov 18, 2022
5625a95
testing with different format of building sphinx doc - add timeout
Nov 18, 2022
e696953
testing with different format of building sphinx doc - add timeout
Nov 18, 2022
886271b
testing with different format of building sphinx doc - add timeout
Nov 18, 2022
f5dcbfe
testing with different format of building sphinx doc - add timeout
Nov 21, 2022
5cb57b6
testing with different format of building sphinx doc - add timeout
Nov 21, 2022
597046e
testing with different format of building sphinx doc - add timeout
Nov 21, 2022
19fee64
testing with different format of building sphinx doc - add timeout
Nov 21, 2022
047c807
testing with different format of building sphinx doc - add timeout
Nov 21, 2022
313264e
testing with different format of building sphinx doc - add timeout
Nov 21, 2022
9fe4bcd
add tmate to debug deploying step
Nov 21, 2022
1d9007b
debugging deploying step
Nov 21, 2022
c5fb533
debugging deploying step
Nov 21, 2022
450cb98
debugging deploying step - checking git version
Nov 21, 2022
9c4006b
debugging deploying step - isntalling newer git version
Nov 21, 2022
c9825b9
debugging deploying step - isntalling newer git version
Nov 21, 2022
72ce08e
debugging deploying step - isntalling newer git version
Nov 21, 2022
a20fd44
debugging deploying step - isntalling newer git version
Nov 21, 2022
77cde6d
debugging deploying step - newer version of checkout/deploy
Nov 21, 2022
b24f1eb
debugging deploying step - newer version of checkout/deploy
Nov 21, 2022
c85472d
debugging deploying step - add installing rsync
Nov 21, 2022
75b9e66
lint
vmoens Nov 21, 2022
331f295
Merge branch 'main' into tutorial_py_dup
vmoens Nov 21, 2022
675cbd7
new next api
vmoens Nov 21, 2022
8f5fac8
Merge branch 'main' into tutorial_py_dup
vmoens Nov 23, 2022
09854b5
Merge branch 'main' into tutorial_py_dup
vmoens Nov 23, 2022
c4a2fdc
amend
vmoens Nov 23, 2022
8201088
changing html/js files
Nov 24, 2022
76bfcaa
Merge branch 'tutorial_py_dup' of https://github.com/pytorch/rl into …
Nov 24, 2022
9244a5f
changing conf
Nov 24, 2022
83cef1d
adding the _static module from pytorch sphinx theme.
Nov 24, 2022
d5e3f21
Merge branch 'main' into tutorial_py_dup
vmoens Nov 24, 2022
89f177e
resolve links
vmoens Nov 24, 2022
23e3d85
amend
vmoens Nov 25, 2022
a814c61
amend
vmoens Nov 25, 2022
177c7d5
amend
vmoens Nov 25, 2022
3c32444
amend
vmoens Nov 25, 2022
ae17b6a
amend
vmoens Nov 25, 2022
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
70 changes: 40 additions & 30 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,72 +7,82 @@ on:
workflow_dispatch:
jobs:
build_docs_job:
runs-on: ${{ matrix.os }}
runs-on: ubuntu-18.04
strategy:
matrix:
include:
- os: linux.2xlarge
- os: linux.4xlarge.nvidia.gpu
python-version: 3.8
defaults:
run:
shell: bash -l {0}
container: nvidia/cuda:11.8.0-cudnn8-devel-ubuntu18.04
steps:
- name: Install deps
run: |
apt-get update -y
apt-get install software-properties-common -y
add-apt-repository ppa:git-core/candidate -y
apt-get update -y
apt-get upgrade -y
apt-get -y install libglu1-mesa libgl1-mesa-glx libosmesa6 gcc curl g++ unzip wget libglfw3-dev libgles2-mesa-dev libglew-dev sudo git
- name: Install rsync 📚
run: |
apt-get update && apt-get install -y rsync
- name: Check ldd --version
run: ldd --version
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
# Update references
- name: Update pip
run: |
sudo yum update -y
sudo yum -y install git python3-pip
sudo pip3 install --upgrade pip
apt-get install python3.8 python3-pip -y
pip3 install --upgrade pip
- name: Setup conda
run: |
rm -rf $HOME/miniconda
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh
bash ~/miniconda.sh -b -p $HOME/miniconda
- name: Install gcc
shell: bash
run: |
sudo yum group install -y "Development Tools"
- name: setup Path
run: |
echo "/home/ec2-user/miniconda/bin" >> $GITHUB_PATH
echo "CONDA=/home/ec2-user/miniconda" >> $GITHUB_PATH
- name: create conda env
echo "$HOME/miniconda/bin" >> $GITHUB_PATH
echo "CONDA=$HOME/miniconda" >> $GITHUB_PATH
- name: create and activate conda env
run: |
conda create --name build_binary python=${{ matrix.python-version }}
conda info
- name: check python version no Conda
run: |
python --version
$HOME/miniconda/bin/conda create --name build_binary python=${{ matrix.python-version }}
$HOME/miniconda/bin/conda info
$HOME/miniconda/bin/activate build_binary
- name: check python version
run: |
conda run -n build_binary python --version
python --version
- name: Check git version
run: git version
- name: setup Path
run: |
echo /usr/local/bin >> $GITHUB_PATH
- name: Install PyTorch
shell: bash
run: |
conda run -n build_binary python -m pip install --pre torch -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
python -m pip install --pre torch -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
- name: Install tensordict
run: |
python3 -mpip install git+https://github.com/pytorch-labs/tensordict.git
python3 -m pip install git+https://github.com/pytorch-labs/tensordict.git
- name: Install TorchRL
run: |
conda run -n build_binary python -m pip install -e .
python -m pip install -e .
- name: Test torchrl installation
shell: bash
run: |
mkdir _tmp
cd _tmp
conda run -n build_binary \
python -c "import torchrl"
python -c "import torchrl;from torchrl.envs.libs.dm_control import DMControlEnv"
cd ..
- name: Build the docset
id: build_doc
run: |
conda run -n build_binary python -m pip install -r docs/requirements.txt
python -m pip install -r docs/requirements.txt
cd ./docs
conda run -n build_binary make html
timeout 7m bash -ic "MUJOCO_GL=egl sphinx-build ./source _local_build" || code=$?; if [[ $code -ne 124 && $code -ne 0 ]]; then exit $code; fi
cd ..
- name: Pull TensorDict docs
run: |
Expand All @@ -81,8 +91,8 @@ jobs:
- name: Get output time
run: echo "The time was ${{ steps.build.outputs.time }}"
- name: Deploy
uses: JamesIves/github-pages-deploy-action@releases/v3
uses: JamesIves/github-pages-deploy-action@releases/v4
with:
ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: docs/build/html # The folder the action should deploy.
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages # The branch the action should deploy to.
folder: docs/_local_build/ # The folder the action should deploy.
27 changes: 21 additions & 6 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,28 @@
matplotlib
numpy
sphinx-copybutton>=0.3.1
sphinx-gallery>=0.9.0
sphinx>=3.5.4
Jinja2==3.0.1
sphinx-copybutton
sphinx-gallery
sphinx
Jinja2
sphinx-autodoc-typehints
sphinx-serve
git+https://github.com/vmoens/aafig@4319769eae88fff8e3464858f3cf8c277f35335d
sphinxcontrib-htmlhelp
-e git+https://github.com/pytorch/pytorch_sphinx_theme.git#egg=pytorch_sphinx_theme
myst-parser>=0.18.1
docutils>=0.19
myst-parser
docutils

functorch
gym[classic_control]
torchvision
dm_control
gym
atari-py
ale-py
gym[accept-rom-license]
pygame
tqdm
ipython
imageio
imageio[ffmpeg]
imageio[pyav]
73 changes: 73 additions & 0 deletions docs/source/_static/css/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
/* sphinx-design styles for cards/tabs
*/

:root {
--sd-color-info: #ee4c2c;
--sd-color-primary: #6c6c6d;
--sd-color-primary-highlight: #f3f4f7;
--sd-color-card-border-hover: #ee4c2c;
--sd-color-card-border: #f3f4f7;
--sd-color-card-background: #fff;
--sd-color-card-text: inherit;
--sd-color-card-header: transparent;
--sd-color-card-footer: transparent;
--sd-color-tabs-label-active: hsla(231, 99%, 66%, 1);
--sd-color-tabs-label-hover: hsla(231, 99%, 66%, 1);
--sd-color-tabs-label-inactive: hsl(0, 0%, 66%);
--sd-color-tabs-underline-active: hsla(231, 99%, 66%, 1);
--sd-color-tabs-underline-hover: rgba(178, 206, 245, 0.62);
--sd-color-tabs-underline-inactive: transparent;
--sd-color-tabs-overline: rgb(222, 222, 222);
--sd-color-tabs-underline: rgb(222, 222, 222);
}

.sd-text-info {
color: #ee4c2c;
}


.sd-card {
position: relative;
background-color: #fff;
opacity: 1.0;
border-radius: 0px;
width: 30%;
border: none;
padding-bottom: 0px;
}


.sd-card-img {
opacity: 0.5;
width: 200px;
padding: 0px;
}

.sd-card-img:hover {
opacity: 1.0;
background-color: #f3f4f7;
}


.sd-card:after {
display: block;
opacity: 1;
content: '';
border-bottom: solid 1px #ee4c2c;
background-color: #fff;
transform: scaleX(0);
transition: transform .250s ease-in-out;
transform-origin: 0% 50%;
}

.sd-card:hover {
background-color: #fff;
opacity: 1;
border-top: 1px solid #f3f4f7;
border-left: 1px solid #f3f4f7;
border-right: 1px solid #f3f4f7;
}

.sd-card:hover:after {
transform: scaleX(1);
}
4 changes: 0 additions & 4 deletions docs/source/_static/css/custom_torchrl.css

This file was deleted.

127 changes: 127 additions & 0 deletions docs/source/_static/css/pytorch_theme.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
body {
font-family: "Lato","proxima-nova","Helvetica Neue",Arial,sans-serif;
}

/* Default header fonts are ugly */
h1, h2, .rst-content .toctree-wrapper p.caption, h3, h4, h5, h6, legend, p.caption {
font-family: "Lato","proxima-nova","Helvetica Neue",Arial,sans-serif;
}

/* Use white for docs background */
.wy-side-nav-search {
background-color: #fff;
}

.wy-nav-content-wrap, .wy-menu li.current > a {
background-color: #fff;
}

@media screen and (min-width: 1400px) {
.wy-nav-content-wrap {
background-color: rgba(0, 0, 0, 0.0470588);
}

.wy-nav-content {
background-color: #fff;
}
}

/* Fixes for mobile */
.wy-nav-top {
background-color: #fff;
background-image: url('../img/pytorch-logo-dark.svg');
background-repeat: no-repeat;
background-position: center;
padding: 0;
margin: 0.4045em 0.809em;
color: #333;
}

.wy-nav-top > a {
display: none;
}

@media screen and (max-width: 768px) {
.wy-side-nav-search>a img.logo {
height: 60px;
}
}

/* This is needed to ensure that logo above search scales properly */
.wy-side-nav-search a {
display: block;
}

/* This ensures that multiple constructors will remain in separate lines. */
.rst-content dl:not(.docutils) dt {
display: table;
}

/* Use our red for literals (it's very similar to the original color) */
.rst-content tt.literal, .rst-content tt.literal, .rst-content code.literal {
color: #F05732;
}

.rst-content tt.xref, a .rst-content tt, .rst-content tt.xref,
.rst-content code.xref, a .rst-content tt, a .rst-content code {
color: #404040;
}

/* Change link colors (except for the menu) */

a {
color: #F05732;
}

a:hover {
color: #F05732;
}


a:visited {
color: #D44D2C;
}

.wy-menu a {
color: #b3b3b3;
}

.wy-menu a:hover {
color: #b3b3b3;
}

a.icon.icon-home {
color: #D44D2C;
}

.version{
color: #D44D2C !important;
}

/* Default footer text is quite big */
footer {
font-size: 80%;
}

footer .rst-footer-buttons {
font-size: 125%; /* revert footer settings - 1/80% = 125% */
}

footer p {
font-size: 100%;
}

/* For hidden headers that appear in TOC tree */
/* see https://stackoverflow.com/a/32363545/3343043 */
.rst-content .hidden-section {
display: none;
}

nav .hidden-section {
display: inherit;
}

/* Make code blocks have a background */
.codeblock,pre.literal-block,.rst-content .literal-block,.rst-content pre.literal-block,div[class^='highlight'] {
background: rgba(0, 0, 0, 0.0470588);
}
Loading