Comments (9)
What version of scipy are you using? I think these functions were added in v0.16
from implicit.
scipy==0.19.1
.
The same requirements set worked on Mac OS X 10.12.14, if that helps, this is an error that I encountered when pushing out to the CI server.
from implicit.
Interesting. I'm using ubuntu w/ scipy v 0.19.0 (via the python3 anaconda distribution) without any issues myself.
Can you verify that the 'cython_lapack.pxd' file is included in the scipy thats getting picked up?
python -c "import scipy.linalg; import os; dirname = os.path.dirname(scipy.linalg.__file__); print(dirname); print(scipy.__version__); print('\n'.join(os.listdir(dirname)))"
from implicit.
Hmm you know, I think this might actually be an issue with the CI service provider. I've tried ssh-ing into their CI boxes and doing a manual install of all packages, and can't replicate the error. Have also tried deploying to my own Ubuntu box, and I can't replicate the error. It only seems to happen when the CI service runs the dependency installation as part of their installation chain, so I'm going to assume that something odd is going on on their end.
from implicit.
Ok, managed to replicate the error. For some reason, if I install the components manually, i.e.
pip install Cython==0.27.2
pip install scipy==0.19.1
pip install implicit==0.2.6
and then
pip install -r requirements.txt
for the rest of my requirements
that succeeds on Ubuntu 14.04.
However, moving scipy and implicit into the requirements.txt
file results in a failure. As far as I can tell, there shouldn't be a reason that the two are different, since the requirements.txt
file output shows that the right package versions are installed or cached:
Collecting scipy==0.19.1 (from -r requirements.txt (line 69))
Using cached scipy-0.19.1-cp35-cp35m-manylinux1_x86_64.whl
Collecting implicit==0.2.6 (from -r requirements.txt (line 70))
Using cached implicit-0.2.6.tar.gz
Complete output from command python setup.py egg_info:
Error compiling Cython file:
------------------------------------------------------------
...
and yet I still get that odd error that suggests that it's using the wrong version of scipy. No idea why this might be happening since all of the versions are pegged, but installing outside of requirements.txt
works fine for now.
from implicit.
interesting - I think it must be picking up the wrong version somehow =( glad you managed to work around this problem!
from implicit.
HI, I am using implicit to implement ALS . While fitting model, I am getting error "AttributeError: 'DataFrame' object has no attribute 'tocsr'"
Using scipy version 0.16
implicit version - 0.2.7
from implicit.
@erseema That looks like you're passing a pandas dataframe to the fit function, when you should be passing a sparse matrix (like a scipy.sparse.csr_matrix or similar) in.
Check out the examples for how to convert: https://github.com/benfred/implicit/blob/master/examples/lastfm.py#L71
from implicit.
Hi, can you provide an example of how you suggest to convert a pandas dataframe to sparse matrix?
I did not understand the link you provided.
I tried this one:
https://hippocampus-garden.com/pandas_sparse/#:~:text=To%20convert%20a%20DataFrame%20to,a%20coordinate%20(COO)%20matrix.
which worked, but I don't know if this is the best way..
from implicit.
Related Issues (20)
- Saving NmsLibModel HOT 1
- numpy has teriminated the `get_info` method HOT 4
- Evaluation module not working HOT 1
- Adding `numpy` to `requirements.txt`
- pip install implicit is not work to use GPU HOT 3
- Incremental update with old users but new items HOT 4
- als explain method bug
- Usage of the trained model on testing.
- ranking metrics fail when model trained on CPU but not GPU?; implicit 0.7.2 HOT 1
- Python issue HOT 4
- Is it possible to compare scores across multiple results?
- function get_lastfm() error
- getting index error while using recommend function while ALS algorithm
- What is a good enough Precision@K and MAP@K value?
- BPR results not reproducible using multiple threads
- gpu issue on colab (implicit==0.7.2 / cuda ==12.1) HOT 1
- Potential error in the calculation of precision@k HOT 2
- Early stopping for ALS
- How recommend method works in Nearest Neighbour Models? HOT 1
- Potential bug in calculation of gradient updates for BPR
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from implicit.