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

[🐛BUG] Mandatory and optional dependencies #2105

Open
lorepirri opened this issue Nov 1, 2024 · 2 comments
Open

[🐛BUG] Mandatory and optional dependencies #2105

lorepirri opened this issue Nov 1, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@lorepirri
Copy link

Describe the bug

Run pip install recbole and python run_recbole.py as specified in the README.me will throw:

  File "<redacted_folder>/recbole/model/general_recommender/ldiffrec.py", line 29, in <module>
    from kmeans_pytorch import kmeans
ModuleNotFoundError: No module named 'kmeans_pytorch'

The dependency kmeans-pytorch is not installed by pip because it's not listed in the setup.py: https://inspector.pypi.io/project/recbole/1.2.0/packages/6b/b1/43993a85af17148e495c7c26d05f76fc622a9eefd5db38ef9a6ea908422b/recbole-1.2.0.tar.gz/recbole-1.2.0/setup.py#line.9

I wonder if some of the dependencies listed in https://github.com/RUCAIBox/RecBole/blob/v1.2.0/.github/workflows/python-package.yml#L36-L51 should be moved into the requirements.txt updating setup.py as well.

To Reproduce
Steps to reproduce the behavior:

  1. Run pip install recbole
  2. Run python run_recbole.py

Expected behavior
A run without errors as described in README.md

Desktop (please complete the following information):

  • OS: linux-aarch64
  • RecBole Version 1.2.0
  • Python Version 3.10
  • PyTorch Version 2.3.0
  • cudatoolkit Version none
@lorepirri
Copy link
Author

lorepirri commented Nov 4, 2024

@BishopLiu thanks for taking care of this. How about torch-scatter and dgl? Some other tests require them. Are they optional dependencies or mandatory?

The tests that are failing are

tests/model/test_model_auto.py::TestKnowledgeRecommender::test_kgat
tests/model/test_model_auto.py::TestKnowledgeRecommender::test_kgat_with_gcn
tests/model/test_model_auto.py::TestKnowledgeRecommender::test_kgat_with_graphsage
tests/model/test_model_auto.py::TestKnowledgeRecommender::test_kgin
tests/model/test_model_auto.py::TestKnowledgeRecommender::test_mcclk

@lorepirri
Copy link
Author

@BishopLiu @Fotiligner any hint? I could create a PR to fix it, knowing which ones are mandatory dependencies or only optional.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants