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

Unable to load movielens dataset #676

Closed
pratikkejriwal opened this issue Feb 22, 2023 · 3 comments
Closed

Unable to load movielens dataset #676

pratikkejriwal opened this issue Feb 22, 2023 · 3 comments

Comments

@pratikkejriwal
Copy link

while following the lightfm example:

from lightfm.datasets import fetch_movielens
movielens = fetch_movielens()

I am getting the following error -

/usr/local/lib/python3.9/site-packages/lightfm/datasets/movielens.py:75: FutureWarning: In the future `np.object` will be defined as the corresponding NumPy scalar.  (This may have returned Python scalars in past versions.
  id_feature_labels = np.empty(num_items, dtype=np.object)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.9/site-packages/lightfm/datasets/movielens.py", line 208, in fetch_movielens
    ) = _parse_item_metadata(num_items, item_metadata_raw, genres_raw)
  File "/usr/local/lib/python3.9/site-packages/lightfm/datasets/movielens.py", line 75, in _parse_item_metadata
    id_feature_labels = np.empty(num_items, dtype=np.object)
  File "/usr/local/lib/python3.9/site-packages/numpy/__init__.py", line 284, in __getattr__
    raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'object'

lib version:

numpy                         1.24.1
lightfm                       1.16
@baibai25
Copy link

I'm having the same issue. Here is my environment

- OS: Ubuntu 20.04.1
- Python: 3.9.2
  - numpy: 1.24.2
  - lightfm: 1.16

@baibai25
Copy link

Oh, it was already fixed! Thank you!
635838d

@pratikkejriwal
Copy link
Author

solved in version 1.17

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

2 participants