Closed downeykking closed 1 year ago
Hi, thanks for your attention!
For the first question, yes, the way you described full
and unixxx
is exactly what we have implemented in RecBole.
For the second question, in the first batch of the evaluation epoch x, we will store the user and item embeddings in restore_user_e
and restore_item_e
by calling forward
, respectively.
In the next following batches in evaluation epoch x, we will use the same user and item embeddings, without calling forward
again to save time.
Then, in the first batch of training epoch x+1, we will call calculate_loss
, and the restore_user_e
and restore_item_e
will be set as None
.
Then after training epoch x+1, in the evaluation epoch x+1, we will calculate the value of restore_user_e
and restore_item_e
again. As a result, we will use the same values of these embeddings within an evaluation epoch but will update these embeddings in the next epoch.
Hi, thanks for your attention!
For the first question, yes, the way you described
full
andunixxx
is exactly what we have implemented in RecBole.For the second question, in the first batch of the evaluation epoch x, we will store the user and item embeddings in
restore_user_e
andrestore_item_e
by callingforward
, respectively.In the next following batches in evaluation epoch x, we will use the same user and item embeddings, without calling
forward
again to save time.Then, in the first batch of training epoch x+1, we will call
calculate_loss
, and therestore_user_e
andrestore_item_e
will be set asNone
.Then after training epoch x+1, in the evaluation epoch x+1, we will calculate the value of
restore_user_e
andrestore_item_e
again. As a result, we will use the same values of these embeddings within an evaluation epoch but will update these embeddings in the next epoch.
I get it! Thanks for your reply. Wish you a good day :)
Hello, thanks for your wonderful work! I have a question about LightGCN eval mode.
To my understanding, in recbole, we have eval methods like full, unixxx like https://recbole.io/docs/user_guide/config/evaluation_settings.html.
If we use
full eval
, we will call functiondef full_sort_predict(self, interaction):
to get users with all items ratings and get metrics like recall, mrr and so on. If we useunixxx eval
, we will call functiondef predict(self, interaction):
and get users with specific items other than all items ratings and get metrics. Do I understand correctly?But in https://github.com/RUCAIBox/RecBole-GNN/blob/main/recbole_gnn/model/general_recommender/lightgcn.py#L123. If i want to use
full eval
to evaluate my model, will we always use the previous embedding of the model and get the same metrics in every epoch? Or do I misunderstanding something?