recommenders-team / recommenders

Best Practices on Recommendation Systems
https://recommenders-team.github.io/recommenders/intro.html
MIT License
18.53k stars 3.05k forks source link

[FEATURE] Consider adding P5 #1983

Open miguelgfierro opened 11 months ago

miguelgfierro commented 11 months ago

Description

sumana-2705 commented 3 weeks ago

@miguelgfierro

Could you please provide some guidance on where the P5 feature should be added within the project? If you are already working on this issue, let me know.

miguelgfierro commented 3 weeks ago

you could add it into recommender/models.

miguelgfierro commented 3 weeks ago

hey @sumana-2705 the typical way we contribute algos consists of the code inside recommenders/models, tests (unit and functional) and a notebook explaining the math behind the model and an end to end example of the model working on a database.

Here is a path that you can follow or get some ideas from:

  1. The first thing I would do is make sure I can run the examples on their repo. This is a good start: https://github.com/jeykigung/P5/blob/main/notebooks/test_yelp_small.ipynb
  2. Consider that it is very important to reduce or even eliminate new dependencies. The majority of the problems we have in the repo is because of dependencies.
  3. I would start by adding the model and unit tests. See an example: https://github.com/recommenders-team/recommenders/blob/main/tests/unit/recommenders/models/test_sar_singlenode.py#L16 you can start by testing the constructor.
  4. Then add the database you are going to use. Probably yelp would be good. You would need to add it to recommenders/datasets and create tests.
  5. Then create a notebook. Here there is a good example: https://github.com/recommenders-team/recommenders/blob/main/examples/02_model_collaborative_filtering/lightgcn_deep_dive.ipynb Notice that there is a short summary of the paper, and then the code with the dataset.
  6. Make sure you use the evaluation metrics we have in the repo. If this is too difficult, we can discuss.
  7. Add a functional test of the notebook, to make sure your code works.
  8. Feel free to do this project in iterations. You can do a draft PR when you have a small part of the project so we can review.
sumana-2705 commented 3 weeks ago

Thanks for your suggestion @miguelgfierro

sumana-2705 commented 2 weeks ago

Hi @miguelgfierro,

Apologies for the delay in drafting a pull request; I was out of station for the past few days. While running the model on my PC, I've encountered lot of dependency errors due to older version requirements for Python, numpy, torch, tqdm, transformers, and others. The model requires completely new environment to run the code. This is consuming a lot of space unnecessarily in pc. I am understanding how to deal them, can you please hep me out.

miguelgfierro commented 2 weeks ago

Go little by little, following the path and fixing every error. This will take time. Patience and consistency is a requirement for difficult tasks like this.

sumana-2705 commented 2 weeks ago

Hello @miguelgfierro,

I have downloaded the necessary files and addressed each error I encountered in the process. However, I have discovered too late that my PC does not have an NVIDIA graphics card , which is why I was unable to run the model on my machine. I attempted to use Azure for this purpose, but I'm not very familiar with the platform, and it requires payment, which I am trying to avoid at this time.

I feel bad that I have wasted your time as well as mine with this issue. Could you please suggest is there any alternatives to proceed under these circumstances?

miguelgfierro commented 2 weeks ago

try Google colab. They have free GPUs. Make sure you install the Recommenders library from source.

daviddavo commented 2 weeks ago

Kaggle is also a good alternative to Colab