Skip to content

Commit

Permalink
Reorder installation instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
yhtang authored Sep 15, 2022
1 parent 4b8a63a commit fd4b48b
Showing 1 changed file with 9 additions and 21 deletions.
30 changes: 9 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,34 +10,22 @@

## Installation

There are two default options to install FunFact:

* install released versions from [PyPI](https://pypi.org/project/funfact/):
```bash
pip install -U funfact
```
* install the latest version from source:
```bash
git clone https://github.com/yhtang/FunFact.git
cd FunFact/
python setup.py install
```

The default installation of FunFact installs the NumPy backend, which **only supports forward calculations**. The NumPy backend doesn't support automatic differentiation and is not able to optimize tensor expressions for methods such as funfact.factorize.

In order to factorize tensor data by a tensor expression, two autograd backends
are provided:

* use the JAX backend:
* To use FunFact with the JAX backend:
```bash
pip install "funfact[jax]"
```
* use the PyTorch backend:
* To use FunFact with the PyTorch backend:
```bash
pip install "funfact[torch]"
```

Running the command as above will trigger default installalation of the respective packages. We refer to the [installation page](https://funfact.readthedocs.io/en/latest/pages/installation/) for more details on installation options.
Running the command as above will install the version of the respective packages hosted on PyPI. Please refer to the [installation page](https://funfact.readthedocs.io/en/latest/pages/installation/) for more details on installation options.

FunFact can also be installed with the NumPy backend, which **only supports forward calculations**. The NumPy backend doesn't support automatic differentiation and is not able to optimize tensor expressions for methods such as `funfact.factorize`.

```bash
pip install -U funfact # does not install JAX or PyTorch
```

## Quick start example: semi-nonnegative CP decomposition

Expand Down

0 comments on commit fd4b48b

Please sign in to comment.