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

KerasGRU4Rec does not process on all possible events #6

Open
htran20 opened this issue Sep 11, 2020 · 5 comments
Open

KerasGRU4Rec does not process on all possible events #6

htran20 opened this issue Sep 11, 2020 · 5 comments

Comments

@htran20
Copy link

htran20 commented Sep 11, 2020

Thanks for the implementation of Keras gru4rec.
I notify some issues in your code:

  1. The get_metric function does not take use of mask variable to reset the state after each session, thus the evaluation results may be wrong.
  2. Issue with SessionDataLoader. Since every session is varied in length, all the remaining events in the last batch_size sessions will not be processed as soon as one of this session finishes (while loop stops when maxiter >= len(click_offsets) - 1 but maxiter starts from max(batch_size), apparently we did not process all events). You can confirm it by comparing the total number of generated feat with (the total number of events - the total number of unique session).
    This can affect the evaluation result where number of batch_size is large and number of unique session is small. One potential fix is to use zero masking.
@paxcema
Copy link
Owner

paxcema commented Oct 17, 2020

Hi there @htran20, thanks for reporting this!

  1. The issue has been addressed, see Reset states at evaluation time #8.
  2. I will take a look at this in the following weeks. Feel free to propose a PR with the fix, though.

@shinsenter
Copy link

Hey guys! Is there any update for [2]?

@paxcema
Copy link
Owner

paxcema commented Oct 15, 2021

Hey there @shinsenter!

I haven't looked into (2), nor evaluated the potential impact on evaluation metrics. Your comment has been a good reminder of this issue. I'll try to address it in the coming weeks, but no promises.

If you want to take a stab at it, I'd also be happy to review any pull requests 👍

@shinsenter
Copy link

@paxcema thank you for giving a schedule.
btw, I has completed training my models using your setup, but I am not sure how can I use the h5 files for a recommender system. Can I receive some advices?

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

4 participants
@shinsenter @paxcema @htran20 and others