sberbank-ai-lab / RePlay

RecSys Library
https://sberbank-ai-lab.github.io/RePlay/
Apache License 2.0
68 stars 6 forks source link

mulvae bug in predict for cold users #72

Closed monkey0head closed 2 years ago

monkey0head commented 2 years ago

There is a bug in MultVAE, which leads to a weird-looking error which appear during predict for cold user:

File "/home/volodkevich/replay_tasks/current_base/replay/models/mult_vae.py", line 312, in _predict_pairs_inner
    user_batch[0, items_np_history] = 1
IndexError: index -9223372036854775808 is out of bounds for dimension 0 with size 3646

items_np_history is an empty list for cold user, and this code fails. But we actually do not want a model to run predict for cold users, so we need to delete a unnecessary code and filter users before applyInPandas works for warm: image

fails for cold: image