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] 顺序推荐模型在使用带有label标签的数据集并且使用排序评价指标(如NDCG)的时候会发生报错。 #2035

Open
lone1yship opened this issue Apr 22, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@lone1yship
Copy link

描述这个 bug
顺序推荐模型在使用带有label标签的数据集并且使用排序评价指标(如NDCG)的时候会发生报错

如何复现
复现这个 bug 的步骤:

  1. 引入的是mind-large-train.inter数据集
  2. 使用的是框架中的SASRec等顺序推荐模型的代码
  3. yaml文件如下:
    eval_args:
    split: { 'RS': [0.8,0.1,0.1] }
    order: TO
    mode: labeled # 这里将模式设置成labeled是因为使用的数据集是mind,这个数据集是有标签的,是显示反馈(带标签),所以应该使用labeled,使用不带标签的数据集的时候才使用其他三种评估方式(full,unixx,popxx)
    group_by: user

load_col:
inter: ['user_id', 'item_id', 'label', 'timestamp']

预期
希望能够得知是自己参数设置的问题,还是框架本身的问题

屏幕截图
1713778433060

实验环境(请补全下列信息):

  • 操作系统: Linux
  • RecBole 版本:1.2.0
  • Python 版本:3.8.10
  • PyTorch 版本:1.10.1
  • cudatoolkit 版本:11.1.74
@lone1yship lone1yship added the bug Something isn't working label Apr 22, 2024
@lone1yship
Copy link
Author

上面的BUG当评价指标换成AUC的时候是没有报错的,但是有一个问题就是当mode是labeled的时候,在验证阶段是没有负样本的,这与论文中在验证的时候需要负样本不一致。 如果将mode换成uni100的话,那和框架中的API说遇到带有标签的数据应该使用labeled又有冲突。而且就算是换成了uni100进行训练,得到的结果也不对。还麻烦你们能够看看是我的问题还是框架的问题。@TayTroye

@lone1yship
Copy link
Author

对于顺序推荐模型,损失函数是交叉熵损失函数,那也可以使用NDCG评价指标,SASRec和BERT4Rec等模型也是如此,这也是我发现的一个问题点。如若不对还请指正,谢谢 @TayTroye

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