pugantsov / stocktwits.recommender

stocktwits cashtag recommender system for master's project.
0 stars 0 forks source link

SpotlightModel: Training Error (Tensor Size) #29

Closed pugantsov closed 5 years ago

pugantsov commented 5 years ago
Traceback (most recent call last):
  File "model_spotlight.py", line 54, in <module>
    sim.run()
  File "model_spotlight.py", line 50, in run
    implicit_model.predict(user_ids, item_ids=None)
  File "/home/alex/anaconda3/envs/recsys/lib/python3.6/site-packages/spotlight/factorization/implicit.py", line 307, in predict
    self._use_cuda)
  File "/home/alex/anaconda3/envs/recsys/lib/python3.6/site-packages/spotlight/factorization/_components.py", line 20, in _predict_process_ids
    user_ids = user_ids.expand(item_ids.size())
RuntimeError: The expanded size of the tensor (11439) must match the existing size (31548) at non-singleton dimension 0
pugantsov commented 5 years ago

FIXED: When supplying every user ID, must supply item IDs. Works fine for one or a few users.