From 14db30560fd6fa9ae906e9fca6a0993098f283f3 Mon Sep 17 00:00:00 2001 From: Benjamin-eecs Date: Wed, 20 Jul 2022 15:39:29 +0800 Subject: [PATCH 01/23] feat(docs): add .readthedocs.yaml --- .github/ISSUE_TEMPLATE/feature_request.md | 2 +- .readthedocs.yaml | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 .readthedocs.yaml diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 0e6ca2a8..b61aa154 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -2,7 +2,7 @@ name: Feature request about: Suggest an idea for this project title: "[Feature Request]" -labels: '' +labels: ["enhancement"] assignees: Benjamin-eecs --- diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 00000000..1ffc63be --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,21 @@ +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + + + +version: 2 +build: + os: "ubuntu-20.04" + tools: + python: "miniconda3-4.7" +conda: + environment: conda-recipe.yml +formats: + - pdf +sphinx: + builder: html + configuration: docs/conf.py + fail_on_warning: true +submodules: + include: all + recursive: true \ No newline at end of file From 2175c84c3028600ea24cad145b51ed5b6103f087 Mon Sep 17 00:00:00 2001 From: Benjamin-eecs Date: Wed, 20 Jul 2022 15:42:17 +0800 Subject: [PATCH 02/23] fix(.github): update issue template --- .github/ISSUE_TEMPLATE/bug_report.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 55dacf60..86dcfbcb 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -2,7 +2,7 @@ name: Bug report about: Create a report to help us improve title: "[BUG]" -labels: '' +labels: ["bug"] assignees: Benjamin-eecs --- From 185aea40ad1f6541190d382b25ea6079ca695173 Mon Sep 17 00:00:00 2001 From: Benjamin-eecs Date: Wed, 20 Jul 2022 15:48:06 +0800 Subject: [PATCH 03/23] pass lint --- .readthedocs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 1ffc63be..dfe7a5f0 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -18,4 +18,4 @@ sphinx: fail_on_warning: true submodules: include: all - recursive: true \ No newline at end of file + recursive: true From e4653ff9ac46bf6613d382d8fd935c98a64ff86f Mon Sep 17 00:00:00 2001 From: Benjamin-eecs Date: Wed, 20 Jul 2022 15:54:38 +0800 Subject: [PATCH 04/23] fix: update .readthedocs.yaml --- .readthedocs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index dfe7a5f0..8b7b6869 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -9,7 +9,7 @@ build: tools: python: "miniconda3-4.7" conda: - environment: conda-recipe.yml + environment: conda-recipe.yaml formats: - pdf sphinx: From 73e6bf781cc46e142ccd0aabf840a60b2f4b090e Mon Sep 17 00:00:00 2001 From: Bo Liu Date: Wed, 20 Jul 2022 16:11:50 +0800 Subject: [PATCH 05/23] fix: update .readthedocs.yaml Co-authored-by: Xuehai Pan --- .readthedocs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 8b7b6869..43742182 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -14,7 +14,7 @@ formats: - pdf sphinx: builder: html - configuration: docs/conf.py + configuration: docs/source/conf.py fail_on_warning: true submodules: include: all From 58a256867be2679d07bc5a6b8cb8367f08d2a726 Mon Sep 17 00:00:00 2001 From: Benjamin-eecs Date: Wed, 20 Jul 2022 16:35:15 +0800 Subject: [PATCH 06/23] fix: update conda-recipe.yaml --- conda-recipe.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conda-recipe.yaml b/conda-recipe.yaml index f7f0917a..705ce213 100644 --- a/conda-recipe.yaml +++ b/conda-recipe.yaml @@ -25,7 +25,7 @@ dependencies: - torchviz - sphinxcontrib-katex # for documentation - jax - - jaxlib >= 0.3=*cuda* + - jaxlib >= 0.3 - optax - tensorboard - wandb From a2d1e1b73c536327f3de6a47aa810e747e7ec4b2 Mon Sep 17 00:00:00 2001 From: Benjamin-eecs Date: Wed, 20 Jul 2022 21:06:19 +0800 Subject: [PATCH 07/23] fix: update rtd config --- .readthedocs.yaml | 2 +- docs/env.yml | 63 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 docs/env.yml diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 43742182..ee50b7a4 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -9,7 +9,7 @@ build: tools: python: "miniconda3-4.7" conda: - environment: conda-recipe.yaml + environment: docs/env.yml formats: - pdf sphinx: diff --git a/docs/env.yml b/docs/env.yml new file mode 100644 index 00000000..4d8313fb --- /dev/null +++ b/docs/env.yml @@ -0,0 +1,63 @@ +# Copyright 2022 MetaOPT Team. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: torchopt + +channels: + - pytorch + - defaults + - nvidia/label/cuda-11.6.2 + - nvidia + - conda-forge + +dependencies: + - python = 3.8 + - pip + + # Learning + - pytorch::pytorch = 1.12 + - pytorch::pytorch-mutex = *=*cuda* + - pip: + - sphinxcontrib-katex # for documentation + - jax + - jaxlib >= 0.3 + + # Device select + - nvidia::cudatoolkit = 11.6 + - cudnn + + # Build toolkit + - cmake >= 3.4 + - make + - cxx-compiler + - gxx = 10 + - nvidia/label/cuda-11.6.2::cuda-nvcc + - nvidia/label/cuda-11.6.2::cuda-cudart-dev + - pybind11 + + # Misc + - typing-extensions + + # Documentation + - sphinx + - sphinx_rtd_theme + - sphinx-autobuild + - sphinx-copybutton + - sphinxcontrib-spelling + - sphinxcontrib-bibtex + - sphinx-autodoc-typehints + - myst-nb + - ipykernel + - pandoc + - docutils From 126d9a74fc1808e25d6bb94dfdb9c25e6c75767b Mon Sep 17 00:00:00 2001 From: Benjamin-eecs Date: Wed, 20 Jul 2022 21:19:43 +0800 Subject: [PATCH 08/23] fix: update rtd config --- .readthedocs.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index ee50b7a4..c3799887 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -8,6 +8,9 @@ build: os: "ubuntu-20.04" tools: python: "miniconda3-4.7" + jobs: + pre_create_environment: + - export CONDA_OVERRIDE_CUDA=11.7 conda: environment: docs/env.yml formats: From 2b43b0198c3e603e7e7880d89e19d67cfacf1073 Mon Sep 17 00:00:00 2001 From: Benjamin-eecs Date: Wed, 20 Jul 2022 21:28:40 +0800 Subject: [PATCH 09/23] fix: update rtd config --- docs/env.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/env.yml b/docs/env.yml index 4d8313fb..f30b25c9 100644 --- a/docs/env.yml +++ b/docs/env.yml @@ -22,7 +22,7 @@ channels: - conda-forge dependencies: - - python = 3.8 + - python = 3.7 - pip # Learning @@ -34,7 +34,7 @@ dependencies: - jaxlib >= 0.3 # Device select - - nvidia::cudatoolkit = 11.6 + - nvidia::cudatoolkit = 11.7 - cudnn # Build toolkit From 0f5366565303efd4ba70b99276532d172ce100d7 Mon Sep 17 00:00:00 2001 From: Benjamin-eecs Date: Wed, 20 Jul 2022 21:40:36 +0800 Subject: [PATCH 10/23] fix: update rtd config --- .readthedocs.yaml | 15 ++++++++++----- docs/env.yml | 4 ++-- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index c3799887..e1f19443 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -2,17 +2,22 @@ # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details - version: 2 build: os: "ubuntu-20.04" tools: python: "miniconda3-4.7" - jobs: + commands: pre_create_environment: - - export CONDA_OVERRIDE_CUDA=11.7 -conda: - environment: docs/env.yml + - CONDA_OVERRIDE_CUDA=11.7 conda env create --file docs/env.yml + - conda activate torchopt + - pip install -e . +python: + version: 3.7 + install: + - requirements: docs/requirements.txt + - method: setuptools + path: . formats: - pdf sphinx: diff --git a/docs/env.yml b/docs/env.yml index f30b25c9..4d8313fb 100644 --- a/docs/env.yml +++ b/docs/env.yml @@ -22,7 +22,7 @@ channels: - conda-forge dependencies: - - python = 3.7 + - python = 3.8 - pip # Learning @@ -34,7 +34,7 @@ dependencies: - jaxlib >= 0.3 # Device select - - nvidia::cudatoolkit = 11.7 + - nvidia::cudatoolkit = 11.6 - cudnn # Build toolkit From c4d21fa8990dc532d059fba9e822138acd91554d Mon Sep 17 00:00:00 2001 From: Benjamin-eecs Date: Wed, 20 Jul 2022 21:42:02 +0800 Subject: [PATCH 11/23] fix: update rtd config --- .readthedocs.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index e1f19443..b24c827a 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -8,7 +8,6 @@ build: tools: python: "miniconda3-4.7" commands: - pre_create_environment: - CONDA_OVERRIDE_CUDA=11.7 conda env create --file docs/env.yml - conda activate torchopt - pip install -e . From df7381167851000df4fd5d16fa4ef9ce13f679aa Mon Sep 17 00:00:00 2001 From: Benjamin-eecs Date: Wed, 20 Jul 2022 21:44:07 +0800 Subject: [PATCH 12/23] fix: update rtd config --- .readthedocs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index b24c827a..fc377d0a 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -12,7 +12,7 @@ build: - conda activate torchopt - pip install -e . python: - version: 3.7 + version: "3.7" install: - requirements: docs/requirements.txt - method: setuptools From 9adf4c7e6383a38960d972c150b62399c164774f Mon Sep 17 00:00:00 2001 From: Benjamin-eecs Date: Wed, 20 Jul 2022 21:47:54 +0800 Subject: [PATCH 13/23] fix: update rtd config --- .readthedocs.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index fc377d0a..5ab1f0f4 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -12,7 +12,6 @@ build: - conda activate torchopt - pip install -e . python: - version: "3.7" install: - requirements: docs/requirements.txt - method: setuptools From 13d6f9954346e5d0276f03434950426b1890d2a1 Mon Sep 17 00:00:00 2001 From: Benjamin-eecs Date: Wed, 20 Jul 2022 22:02:43 +0800 Subject: [PATCH 14/23] fix: update rtd config --- .readthedocs.yaml | 1 + docs/env.yml | 26 +------------------------- 2 files changed, 2 insertions(+), 25 deletions(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 5ab1f0f4..42cf9d9a 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -10,6 +10,7 @@ build: commands: - CONDA_OVERRIDE_CUDA=11.7 conda env create --file docs/env.yml - conda activate torchopt + - pip install -r requirements.txt - pip install -e . python: install: diff --git a/docs/env.yml b/docs/env.yml index 4d8313fb..52de48a7 100644 --- a/docs/env.yml +++ b/docs/env.yml @@ -22,17 +22,9 @@ channels: - conda-forge dependencies: - - python = 3.8 + - python = 3.7 - pip - # Learning - - pytorch::pytorch = 1.12 - - pytorch::pytorch-mutex = *=*cuda* - - pip: - - sphinxcontrib-katex # for documentation - - jax - - jaxlib >= 0.3 - # Device select - nvidia::cudatoolkit = 11.6 - cudnn @@ -45,19 +37,3 @@ dependencies: - nvidia/label/cuda-11.6.2::cuda-nvcc - nvidia/label/cuda-11.6.2::cuda-cudart-dev - pybind11 - - # Misc - - typing-extensions - - # Documentation - - sphinx - - sphinx_rtd_theme - - sphinx-autobuild - - sphinx-copybutton - - sphinxcontrib-spelling - - sphinxcontrib-bibtex - - sphinx-autodoc-typehints - - myst-nb - - ipykernel - - pandoc - - docutils From 6d2b0f996e61bf3874a82d7e137e22154948bed4 Mon Sep 17 00:00:00 2001 From: Benjamin-eecs Date: Wed, 20 Jul 2022 22:05:50 +0800 Subject: [PATCH 15/23] fix: update rtd config --- .readthedocs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 42cf9d9a..1d79c61c 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -8,7 +8,7 @@ build: tools: python: "miniconda3-4.7" commands: - - CONDA_OVERRIDE_CUDA=11.7 conda env create --file docs/env.yml + - CONDA_OVERRIDE_CUDA=11.6 conda env create --file docs/env.yml - conda activate torchopt - pip install -r requirements.txt - pip install -e . From 7dc99fe85c5d49c133300408603deaf3a519451b Mon Sep 17 00:00:00 2001 From: Xuehai Pan Date: Tue, 26 Jul 2022 10:19:28 +0800 Subject: [PATCH 16/23] chore: update .readthedocs.yaml --- .readthedocs.yaml | 30 ++++++++++++++---------------- conda-recipe.yaml | 2 +- docs/env.yml | 39 --------------------------------------- 3 files changed, 15 insertions(+), 56 deletions(-) delete mode 100644 docs/env.yml diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 1d79c61c..1ae49942 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -1,28 +1,26 @@ +# .readthedocs.yaml # Read the Docs configuration file # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details - +# Required version: 2 + +# Set the version of Python and other tools you might need build: - os: "ubuntu-20.04" + os: ubuntu-20.04 tools: - python: "miniconda3-4.7" - commands: - - CONDA_OVERRIDE_CUDA=11.6 conda env create --file docs/env.yml - - conda activate torchopt - - pip install -r requirements.txt - - pip install -e . -python: - install: - - requirements: docs/requirements.txt - - method: setuptools - path: . + python: miniconda3-4.7 + +# Optionally declare the Python requirements required to build your docs +conda: + environment: conda-recipe.yaml + +# If using Sphinx, optionally build your docs in additional formats such as PDF formats: - pdf + +# Build documentation in the docs/ directory with Sphinx sphinx: builder: html configuration: docs/source/conf.py fail_on_warning: true -submodules: - include: all - recursive: true diff --git a/conda-recipe.yaml b/conda-recipe.yaml index 705ce213..f7f0917a 100644 --- a/conda-recipe.yaml +++ b/conda-recipe.yaml @@ -25,7 +25,7 @@ dependencies: - torchviz - sphinxcontrib-katex # for documentation - jax - - jaxlib >= 0.3 + - jaxlib >= 0.3=*cuda* - optax - tensorboard - wandb diff --git a/docs/env.yml b/docs/env.yml deleted file mode 100644 index 52de48a7..00000000 --- a/docs/env.yml +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright 2022 MetaOPT Team. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: torchopt - -channels: - - pytorch - - defaults - - nvidia/label/cuda-11.6.2 - - nvidia - - conda-forge - -dependencies: - - python = 3.7 - - pip - - # Device select - - nvidia::cudatoolkit = 11.6 - - cudnn - - # Build toolkit - - cmake >= 3.4 - - make - - cxx-compiler - - gxx = 10 - - nvidia/label/cuda-11.6.2::cuda-nvcc - - nvidia/label/cuda-11.6.2::cuda-cudart-dev - - pybind11 From d8e270ecd86cae28b76fe280de84b249cb8c23a6 Mon Sep 17 00:00:00 2001 From: Xuehai Pan Date: Tue, 26 Jul 2022 10:27:54 +0800 Subject: [PATCH 17/23] chore: update .readthedocs.yaml --- .readthedocs.yaml | 2 +- docs/conda-recipe.yaml | 65 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 docs/conda-recipe.yaml diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 1ae49942..a55aa0f4 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -13,7 +13,7 @@ build: # Optionally declare the Python requirements required to build your docs conda: - environment: conda-recipe.yaml + environment: docs/conda-recipe.yaml # If using Sphinx, optionally build your docs in additional formats such as PDF formats: diff --git a/docs/conda-recipe.yaml b/docs/conda-recipe.yaml new file mode 100644 index 00000000..1e8ea9dd --- /dev/null +++ b/docs/conda-recipe.yaml @@ -0,0 +1,65 @@ +# Create virtual environment with command: +# +# $ CONDA_OVERRIDE_CUDA=11.7 conda env create --file docs/conda-recipe.yaml +# + +name: torchopt-docs + +channels: + - pytorch + - defaults + - nvidia/label/cuda-11.6.2 + - nvidia + - conda-forge + +dependencies: + - python = 3.8 + - pip + + # Learning + - pytorch::pytorch = 1.12 + - pytorch::torchvision + - pytorch::pytorch-mutex = *=*cuda* + - pip: + - '--edit .' # torchopt + - functorch + - torchviz + - sphinxcontrib-katex # for documentation + - jax + - jaxlib >= 0.3 + - tensorboard + - wandb + + # Device select + - nvidia::cudatoolkit = 11.6 + - cudnn + + # Build toolchain + - cmake >= 3.4 + - make + - cxx-compiler + - gxx = 10 + - nvidia/label/cuda-11.6.2::cuda-nvcc + - nvidia/label/cuda-11.6.2::cuda-cudart-dev + - pybind11 + + # Misc + - typing-extensions + - numpy + - matplotlib-base + - seaborn + - python-graphviz + - pillow + + # Documentation + - sphinx + - sphinx_rtd_theme + - sphinx-autobuild + - sphinx-copybutton + - sphinxcontrib-spelling + - sphinxcontrib-bibtex + - sphinx-autodoc-typehints + - myst-nb + - ipykernel + - pandoc + - docutils From 8067d664938af14e23cadeec3a73c853cc2be639 Mon Sep 17 00:00:00 2001 From: Xuehai Pan Date: Tue, 26 Jul 2022 10:41:13 +0800 Subject: [PATCH 18/23] chore: update .readthedocs.yaml --- .readthedocs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index a55aa0f4..7f059525 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -9,7 +9,7 @@ version: 2 build: os: ubuntu-20.04 tools: - python: miniconda3-4.7 + python: mambaforge-4.10 # Optionally declare the Python requirements required to build your docs conda: From 465e19367182eba4f68580498f0a7cc8639ebbe0 Mon Sep 17 00:00:00 2001 From: Xuehai Pan Date: Tue, 26 Jul 2022 11:10:08 +0800 Subject: [PATCH 19/23] chore: update .readthedocs.yaml --- .readthedocs.yaml | 6 ++++++ docs/conda-recipe.yaml | 4 +--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 7f059525..88b7a202 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -24,3 +24,9 @@ sphinx: builder: html configuration: docs/source/conf.py fail_on_warning: true + +# Optionally declare the Python requirements required to build your docs +python: + install: + - method: pip + path: . diff --git a/docs/conda-recipe.yaml b/docs/conda-recipe.yaml index 1e8ea9dd..f3abf8f3 100644 --- a/docs/conda-recipe.yaml +++ b/docs/conda-recipe.yaml @@ -21,12 +21,10 @@ dependencies: - pytorch::torchvision - pytorch::pytorch-mutex = *=*cuda* - pip: - - '--edit .' # torchopt + - jax[cpu] >= 0.3 - functorch - torchviz - sphinxcontrib-katex # for documentation - - jax - - jaxlib >= 0.3 - tensorboard - wandb From 3fb12f9a5b559cd36bf23947afe4b4eee2f21681 Mon Sep 17 00:00:00 2001 From: Xuehai Pan Date: Tue, 26 Jul 2022 11:20:37 +0800 Subject: [PATCH 20/23] chore: add license --- docs/conda-recipe.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/conda-recipe.yaml b/docs/conda-recipe.yaml index f3abf8f3..5c8be11e 100644 --- a/docs/conda-recipe.yaml +++ b/docs/conda-recipe.yaml @@ -1,3 +1,18 @@ +# Copyright 2022 MetaOPT Team. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============================================================================== +# # Create virtual environment with command: # # $ CONDA_OVERRIDE_CUDA=11.7 conda env create --file docs/conda-recipe.yaml From 1893ff145a0ed2c9e6d132754da9443701686aa5 Mon Sep 17 00:00:00 2001 From: Xuehai Pan Date: Tue, 26 Jul 2022 11:33:11 +0800 Subject: [PATCH 21/23] chore: use CPU build for docs --- docs/conda-recipe.yaml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/docs/conda-recipe.yaml b/docs/conda-recipe.yaml index 5c8be11e..cb8c4c40 100644 --- a/docs/conda-recipe.yaml +++ b/docs/conda-recipe.yaml @@ -23,8 +23,6 @@ name: torchopt-docs channels: - pytorch - defaults - - nvidia/label/cuda-11.6.2 - - nvidia - conda-forge dependencies: @@ -34,7 +32,7 @@ dependencies: # Learning - pytorch::pytorch = 1.12 - pytorch::torchvision - - pytorch::pytorch-mutex = *=*cuda* + - pytorch::pytorch-mutex = *=*cpu* - pip: - jax[cpu] >= 0.3 - functorch @@ -43,10 +41,6 @@ dependencies: - tensorboard - wandb - # Device select - - nvidia::cudatoolkit = 11.6 - - cudnn - # Build toolchain - cmake >= 3.4 - make From 8f7699b08a4361563c6ff769c7c1d313d210a98c Mon Sep 17 00:00:00 2001 From: Xuehai Pan Date: Tue, 26 Jul 2022 11:45:30 +0800 Subject: [PATCH 22/23] chore: update conda-recipe.yaml --- conda-recipe.yaml | 2 +- docs/conda-recipe.yaml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/conda-recipe.yaml b/conda-recipe.yaml index f7f0917a..625a236c 100644 --- a/conda-recipe.yaml +++ b/conda-recipe.yaml @@ -59,6 +59,7 @@ dependencies: - sphinxcontrib-spelling - sphinxcontrib-bibtex - sphinx-autodoc-typehints + - pyenchant - myst-nb - ipykernel - pandoc @@ -76,7 +77,6 @@ dependencies: - flake8-bugbear - doc8 - pydocstyle - - pyenchant - clang-format - clang-tools # clang-tidy - cpplint diff --git a/docs/conda-recipe.yaml b/docs/conda-recipe.yaml index cb8c4c40..d55c0f19 100644 --- a/docs/conda-recipe.yaml +++ b/docs/conda-recipe.yaml @@ -66,6 +66,7 @@ dependencies: - sphinxcontrib-spelling - sphinxcontrib-bibtex - sphinx-autodoc-typehints + - pyenchant - myst-nb - ipykernel - pandoc From bc92a04fcdc1cf169d935329f5ffb598309c4f8e Mon Sep 17 00:00:00 2001 From: Xuehai Pan Date: Tue, 26 Jul 2022 12:45:55 +0800 Subject: [PATCH 23/23] chore: ignore spelling on readthedocs --- docs/source/conf.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index da11e3b7..25159cb0 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -25,15 +25,12 @@ # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. # -import inspect import os import pathlib import sys import sphinxcontrib.katex as katex -import torchopt - HERE = pathlib.Path(__file__).absolute().parent PROJECT_ROOT = HERE.parent.parent @@ -76,12 +73,14 @@ def get_version() -> str: 'sphinx_copybutton', 'sphinx_rtd_theme', 'sphinxcontrib.bibtex', - 'sphinxcontrib.spelling', 'sphinxcontrib.katex', 'sphinx_autodoc_typehints', 'myst_nb', # This is used for the .ipynb notebooks ] +if not os.getenv('READTHEDOCS', None): + extensions.append('sphinxcontrib.spelling') + # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates']