Skip to content

Commit

Permalink
Fix travis error caused by Numpy reinstallation and Approximate_als t…
Browse files Browse the repository at this point in the history
…est (#213)

Fix travis error caused by 
(1) Numpy reinstallation
(2) isort
(3) unittest of approximate_als
  • Loading branch information
ita9naiwa authored Jun 8, 2019
1 parent d6717ae commit 0a9713e
Show file tree
Hide file tree
Showing 12 changed files with 13,349 additions and 14,204 deletions.
7 changes: 4 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,16 @@ before_install:
PY=python3
fi
fi
install:
- travis_wait travis_retry $PIP install -r requirements.txt --ignore-installed flake8 isort cpplint annoy
- travis_wait travis_retry $PIP uninstall numpy -y
- travis_wait travis_retry $PIP install -r requirements.txt --ignore-installed flake8 isort cpplint annoy
#- travis_wait travis_retry $PIP install isort==4.3.20
- travis_retry $PIP install -e .

script:
- flake8
- flake8 --filename='*.pyx,*.px*' --ignore E901,E225,E226,E227,E999
- isort -c **/*.py
#- isort -c **/*.py -s benchmarks
- cpplint --linelength 100 **/*.h
- $PY --version
- $PY setup.py test
Expand Down
4 changes: 2 additions & 2 deletions examples/lastfm.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@
import codecs
import logging
import time
import tqdm

import numpy as np
import tqdm

from implicit.als import AlternatingLeastSquares
from implicit.approximate_als import (AnnoyAlternatingLeastSquares, FaissAlternatingLeastSquares,
NMSLibAlternatingLeastSquares)
from implicit.bpr import BayesianPersonalizedRanking
from implicit.datasets.lastfm import get_lastfm
from implicit.nearest_neighbours import (BM25Recommender, CosineRecommender,
TFIDFRecommender, bm25_weight)
from implicit.datasets.lastfm import get_lastfm

# maps command line model argument to class name
MODELS = {"als": AlternatingLeastSquares,
Expand Down
6 changes: 2 additions & 4 deletions examples/movielens.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,16 @@
import codecs
import logging
import time
import tqdm

import numpy as np
import tqdm

from implicit.als import AlternatingLeastSquares
from implicit.bpr import BayesianPersonalizedRanking
from implicit.datasets.movielens import get_movielens
from implicit.nearest_neighbours import (BM25Recommender, CosineRecommender,
TFIDFRecommender, bm25_weight)

from implicit.datasets.movielens import get_movielens


log = logging.getLogger("implicit")


Expand Down
6 changes: 1 addition & 5 deletions implicit/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
from . import als, approximate_als, bpr, nearest_neighbours
from .als import alternating_least_squares

from . import als
from . import approximate_als
from . import bpr
from . import nearest_neighbours

__version__ = '0.3.8'

__all__ = [alternating_least_squares, als, approximate_als, bpr, nearest_neighbours, __version__]
Loading

0 comments on commit 0a9713e

Please sign in to comment.