Skip to content

Commit

Permalink
Merge branch 'main' into implicit-module
Browse files Browse the repository at this point in the history
  • Loading branch information
XuehaiPan committed Oct 29, 2022
2 parents 3c1e33f + 9def086 commit ce349ca
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 25 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pylint-install:

flake8-install:
$(call check_pip_install,flake8)
$(call check_pip_install_extra,bugbear,flake8_bugbear)
$(call check_pip_install_extra,flake8-bugbear,flake8-bugbear)

py-format-install:
$(call check_pip_install,isort)
Expand Down
17 changes: 8 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,14 @@
</div>

![Python 3.7+](https://img.shields.io/badge/Python-3.7%2B-brightgreen.svg)
[![PyPI](https://img.shields.io/pypi/v/torchopt?label=PyPI)](https://pypi.org/project/torchopt)
![Status](https://img.shields.io/pypi/status/torchopt?label=Status)
[![PyPI](https://img.shields.io/pypi/v/torchopt?logo=pypi)](https://pypi.org/project/torchopt)
![GitHub Workflow Status](https://img.shields.io/github/workflow/status/metaopt/torchopt/Tests?label=tests&logo=github)
[![Documentation Status](https://readthedocs.org/projects/torchopt/badge/?version=latest)](https://torchopt.readthedocs.io/en/latest/?badge=latest)
[![Downloads](https://static.pepy.tech/personalized-badge/torchopt?period=month&left_color=grey&right_color=blue&left_text=Downloads/month)](https://pepy.tech/project/torchopt)
[![GitHub Repo Stars](https://img.shields.io/github/stars/metaopt/torchopt?label=Stars&logo=github&color=brightgreen)](https://github.com/metaopt/torchopt/stargazers)
[![License](https://img.shields.io/github/license/metaopt/torchopt?label=License)](#license)
[![Documentation Status](https://img.shields.io/readthedocs/torchopt?logo=readthedocs)](https://torchopt.readthedocs.io)
[![Downloads](https://static.pepy.tech/personalized-badge/torchopt?period=total&left_color=grey&right_color=blue&left_text=downloads)](https://pepy.tech/project/torchopt)
[![GitHub Repo Stars](https://img.shields.io/github/stars/metaopt/torchopt?color=brightgreen&logo=github)](https://github.com/metaopt/torchopt/stargazers)
[![License](https://img.shields.io/github/license/metaopt/torchopt?label=license)](#license)

**TorchOpt** is a high-performance optimizer library built upon [PyTorch](https://pytorch.org/) for easy implementation of functional optimization and gradient-based meta-learning. It consists of two main features:
**TorchOpt** is a high-performance optimizer library built upon [PyTorch](https://pytorch.org) for easy implementation of functional optimization and gradient-based meta-learning. It consists of two main features:

- TorchOpt provides functional optimizer which enables [JAX-like](https://github.com/google/jax) composable functional optimizer for PyTorch. With TorchOpt, one can easily conduct neural network optimization in PyTorch with functional style optimizer, similar to [Optax](https://github.com/deepmind/optax) in JAX.
- With the design of functional programing, TorchOpt provides efficient, flexible, and easy-to-implement differentiable optimizer for gradient-based meta-learning research. It largely reduces the efforts required to implement sophisticated meta-learning algorithms.
Expand Down Expand Up @@ -232,9 +231,9 @@ Requirements

- PyTorch
- (Optional) For visualizing computation graphs
- [Graphviz](https://graphviz.org/download/) (for Linux users use `apt/yum install graphviz` or `conda install -c anaconda python-graphviz`)
- [Graphviz](https://graphviz.org/download) (for Linux users use `apt/yum install graphviz` or `conda install -c anaconda python-graphviz`)

**Please follow the instructions at <https://pytorch.org> to install PyTorch in your Python environment first.** Then run the following command to install TorchOpt from PyPI ([![PyPI](https://img.shields.io/pypi/v/torchopt?label=PyPI)](https://pypi.org/project/torchopt) / ![Status](https://img.shields.io/pypi/status/torchopt?label=Status)):
**Please follow the instructions at <https://pytorch.org> to install PyTorch in your Python environment first.** Then run the following command to install TorchOpt from PyPI ([![PyPI](https://img.shields.io/pypi/v/torchopt?label=pypi&logo=pypi)](https://pypi.org/project/torchopt) / ![Status](https://img.shields.io/pypi/status/torchopt?label=status)):

```bash
pip3 install torchopt
Expand Down
13 changes: 7 additions & 6 deletions conda-recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ name: torchopt

channels:
- pytorch
- nvidia/label/cuda-11.7.1
- defaults
- nvidia
- conda-forge

dependencies:
- python = 3.8
- python = 3.9
- pip

# Learning
Expand All @@ -40,20 +40,20 @@ dependencies:
- jax # for tutorials
- jaxlib >= 0.3=*cuda* # for tutorials
- optax # for tutorials
- jaxopt # for tests
- tensorboard # for examples
- wandb

# Device select
- pytorch::pytorch-cuda = 11.7
- cudnn
- nvidia/label/cuda-11.7.1::cuda-toolkit = 11.7

# Build toolchain
- cmake >= 3.4
- make
- cxx-compiler
- gxx = 10
- nvidia::cuda-nvcc
- nvidia::cuda-cudart-dev
- nvidia/label/cuda-11.7.1::cuda-nvcc
- nvidia/label/cuda-11.7.1::cuda-cudart-dev
- patchelf >= 0.9
- pybind11

Expand All @@ -75,6 +75,7 @@ dependencies:
- sphinxcontrib-bibtex
- sphinx-autodoc-typehints
- pyenchant
- hunspell-en
- myst-nb
- ipykernel
- pandoc
Expand Down
6 changes: 3 additions & 3 deletions docs/conda-recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@ name: torchopt-docs

channels:
- pytorch
- nvidia/label/cuda-11.7.1
- defaults
- conda-forge

dependencies:
- python = 3.8
- python = 3.9
- pip

# Learning
Expand All @@ -35,8 +36,6 @@ dependencies:
- pip:
- torchviz
- sphinxcontrib-katex # for documentation
- tensorboard
- wandb

# Build toolchain
- cmake >= 3.4
Expand Down Expand Up @@ -64,6 +63,7 @@ dependencies:
- sphinxcontrib-bibtex
- sphinx-autodoc-typehints
- pyenchant
- hunspell-en
- myst-nb
- ipykernel
- pandoc
Expand Down
6 changes: 3 additions & 3 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
TorchOpt
--------

**TorchOpt** is a high-performance optimizer library built upon `PyTorch <https://pytorch.org/>`_ for easy implementation of functional optimization and gradient-based meta-learning. It consists of two main features:
**TorchOpt** is a high-performance optimizer library built upon `PyTorch <https://pytorch.org>`_ for easy implementation of functional optimization and gradient-based meta-learning. It consists of two main features:

* TorchOpt provides functional optimizer which enables `JAX-like <https://github.com/google/jax>`_ composable functional optimizer for PyTorch. With TorchOpt, one can easily conduct neural network optimization in PyTorch with functional style optimizer, similar to `Optax <https://github.com/deepmind/optax>`_ in JAX.
* With the design of functional programming, TorchOpt provides efficient, flexible, and easy-to-implement differentiable optimizer for gradient-based meta-learning research. It largely reduces the efforts required to implement sophisticated meta-learning algorithms.
Expand All @@ -13,8 +13,8 @@ Installation

Requirements:

* `PyTorch <https://pytorch.org/>`_
* (Optional) `Graphviz <https://graphviz.org/download/>`_
* `PyTorch <https://pytorch.org>`_
* (Optional) `Graphviz <https://graphviz.org/download>`_

Please follow the instructions at https://pytorch.org to install PyTorch in your Python environment first. Then run the following command to install TorchOpt from PyPI:

Expand Down
7 changes: 4 additions & 3 deletions tests/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ torch >= 1.13

--requirement ../requirements.txt

jax[cpu] >= 0.3
jaxopt
optax

pytest
pytest-cov
pytest-xdist
Expand All @@ -18,6 +22,3 @@ pydocstyle
pyenchant
cpplint
pre-commit
jax[cpu] >= 0.3
jaxopt
optax
3 changes: 3 additions & 0 deletions tutorials/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ torchvision
--requirement ../requirements.txt

ipykernel
jax[cpu] >= 0.3
jaxopt
optax

0 comments on commit ce349ca

Please sign in to comment.