Cannot run predictions in batches
- Dominant language
- Python
- Stars
- 5.1k
- Forks
- 724
- PR merge metrics
- No merged PRs in 30d
Description
Hi ,
I am trying now to predict for batch users, so I am using your suggestion from issue #240.
I am getting an error after first batch.
Do I understand correctly, that in liпhtfm.py on the row 814: `n_users = user_ids.max() + 1` , meaning that if I will send users_ids for the first batch, it will work, but starting from second not, because user_ids=[7,7,7,8,8,8] and features [1,2,3,1,2,3] will give n_users=9 and user_features.shape[0]=6 and throught an error "Number of user feature rows does not equal the number of users"
What am doing wrong?
_Originally posted by @maffka123 in https://github.com/lyst/lightfm/issues/240#issuecomment-878569973_
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with lightfm.py around row 814 and review the batching discussion in issue #240. Reproduce the reported second-batch input with user_ids [7,7,7,8,8,8] and the corresponding features, then determine the expected behavior for batched prediction and document or test the resolved behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100