lyst / lyst/lightfm

Lightfm 1.17 - kernel dies in Jupyter, Spyder when fitting

Open
#690 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
5.1k
Forks
724
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the provided LightFM 1.17 example with the small MovieLens interaction matrix in Jupyter or Spyder. Trace execution into lightfm's _run_one_epoch method and determine what causes the kernel restart; done means the fitting example completes without the kernel dying.

Written by the indexing model from the issue text.

Assessment

Tech stack
anaconda, jupyter, python
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.