Skip to content

Commit

Permalink
Move surprise and pymanopt out of setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
anargyri committed Dec 30, 2021
1 parent 5995470 commit f8bf7ad
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
3 changes: 2 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ To setup the documentation, first you need to install the dependencies of the fu
conda activate reco_full

pip install numpy cython
pip install --no-binary scikit-surprise .[all,experimental]
pip install --no-binary scikit-surprise "scikit-surprise@https://github.com/NicolasHug/Surprise/archive/refs/tags/v1.1.1.tar.gz"
pip install "pymanopt@https://github.com/pymanopt/pymanopt/archive/fb36a272cdeecb21992cfd9271eb82baafeb316d.zip"
pip install sphinx_rtd_theme


Expand Down
10 changes: 8 additions & 2 deletions recommenders/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ By default `recommenders` does not install all dependencies used throughout the
- experimental: current experimental dependencies that are being evaluated (e.g. libraries that require advanced build requirements or might conflict with libraries from other options)
- nni: dependencies for NNI tuning framework.

Note that, currently, xLearn, Surprise and Vowpal Wabbit are in the experimental group.
Note that, currently, xLearn and Vowpal Wabbit are in the experimental group.

These groups can be installed alone or in combination:
```bash
Expand Down Expand Up @@ -64,10 +64,16 @@ When installing with GPU support you will need to point to the PyTorch index to

We are currently evaluating inclusion of the following dependencies:

- scikit-surprise: due to incompatibilities with `numpy <= 1.19`, proper installation of Surprise requires `pip install numpy cython` and `pip install --no-binary scikit-surprise recommenders[experimental]`
- vowpalwabbit: current examples show how to use vowpal wabbit after it has been installed on the command line; using the [PyPI package](https://pypi.org/project/vowpalwabbit/) with the scikit-learn interface will facilitate easier integration into python environments
- xlearn: on some platforms, xLearn requires pre-installation of cmake.

## Other dependencies

Some dependencies are not available via the recommenders PyPI package, but can be installed in the following ways:
- scikit-surprise: due to incompatibilities with `numpy <= 1.19`, proper installation of Surprise requires `pip install numpy cython` and `pip install --no-binary scikit-surprise "scikit-surprise@https://github.com/NicolasHug/Surprise/archive/refs/tags/v1.1.1.tar.gz"`
- pymanopt: this dependency is required for the RLRMC and GeoIMC algorithms; a version of this code compatible with TensorFlow 2 can be
installed with `pip install "pymanopt@https://github.com/pymanopt/pymanopt/archive/fb36a272cdeecb21992cfd9271eb82baafeb316d.zip"`.

## NNI dependencies

For NNI a more recent version can be installed but is untested.
Expand Down
11 changes: 6 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@
"memory_profiler>=0.54.0,<1",
"nltk>=3.4,<4",
"pydocumentdb>=2.3.3<3", # TODO: replace with azure-cosmos
# Temporary fix for pymanopt, only this commit works with TF2
"pymanopt@https://github.com/pymanopt/pymanopt/archive/fb36a272cdeecb21992cfd9271eb82baafeb316d.zip",
"seaborn>=0.8.1,<1",
"transformers>=2.5.0,<5",
"bottleneck>=1.2.1,<2",
Expand Down Expand Up @@ -93,9 +91,6 @@
extras_require["experimental"] = [
# xlearn requires cmake to be pre-installed
"xlearn==0.40a1",
# Surprise needs to be built from source because of the numpy <= 1.19 incompatibility
# Requires pip to be run with the --no-binary option
"scikit-surprise@https://github.com/NicolasHug/Surprise/archive/refs/tags/v1.1.1.tar.gz",
# VW C++ binary needs to be installed manually for some code to work
"vowpalwabbit>=8.9.0,<9",
]
Expand All @@ -104,6 +99,12 @@
"nni==1.5",
]

# The following dependencies can be installed as below, however PyPI does not allow direct URLs.
# Surprise needs to be built from source because of the numpy <= 1.19 incompatibility
# Requires pip to be run with the --no-binary option
# "scikit-surprise@https://github.com/NicolasHug/Surprise/archive/refs/tags/v1.1.1.tar.gz",
# Temporary fix for pymanopt, only this commit works with TF2
# "pymanopt@https://github.com/pymanopt/pymanopt/archive/fb36a272cdeecb21992cfd9271eb82baafeb316d.zip",

setup(
name="recommenders",
Expand Down

0 comments on commit f8bf7ad

Please sign in to comment.