Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lightfm 1.17 - kernel dies in Jupyter, Spyder when fitting #690

Open
sbildea opened this issue May 11, 2023 · 3 comments
Open

Lightfm 1.17 - kernel dies in Jupyter, Spyder when fitting #690

sbildea opened this issue May 11, 2023 · 3 comments

Comments

@sbildea
Copy link

sbildea commented May 11, 2023

Hello,

Under the Anaconda 2023.03 distribution I have installed Lightfm 1.17. The interaction matrix is small, shape (671, 9066) - coming from the small movie lens dataset. When running the code:
from scipy import sparse
from lightfm import LightFM
x = sparse.csr_matrix(interactions.values)
model = LightFM(no_components= 30, loss='warp',k=15)
model.fit(x,epochs=30,num_threads = 4)

in Jupyter, the kernel dies unexpectedly, a pop-up shows-up: Kernel Restarting
The kernel appears to have died. It will restart automatically.

In Spyder I get a similar behaviour, with the kernel restarting. I traced it down to the _run_one_epoch method in lightfm.

Any idea of the potential cause is appreciated.

@sbildea sbildea changed the title Hello. Lightfm 1.17 - kernel dies in Jupyter, Spyder when fitting May 11, 2023
@ehuijzer
Copy link

ehuijzer commented May 16, 2023

Maybe you can try without the loss='warp' parameter (using default logistic loss).
If it works without the parameter it may be the same issue as I reported in #675.

(edit)
Seems duplicate of #684

@Xiaomuma001
Copy link

Microsoft Windows? Then the same thing here. it seems that the 1.17version does not work well on windows, same code runs as expected under ubuntu18(WSL), so I switch my workspace to ubuntu instead of spending more time on solving the window environment issue.

@CSFelix
Copy link

CSFelix commented Jan 10, 2024

I was experiencing the same issue.

Since I have Windows installed on my laptop, I changed the loss parameter from warp to logistic and the code ran properly.

Thank you!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants