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

KeyError on LambdaRank Tutorial #21

Open
rikiachmad opened this issue Mar 28, 2023 · 1 comment
Open

KeyError on LambdaRank Tutorial #21

rikiachmad opened this issue Mar 28, 2023 · 1 comment

Comments

@rikiachmad
Copy link

I basically follow the exact step with your tutorial on /tutorial/ptranking_demo_ltr.ipynb file. I used the same dataset from LETOR 4.0 MQ2008 but got a KeyError in this line of code lambdarank_losses, lambdarank_train_ndcgs, lambdarank_test_ndcgs = ltr_evaluator.naive_train(ranker=lambdarank, eval_dict=eval_dict, train_data=train_data, test_data=test_data). It was fine with the RankNet though.
Error:

label_type = kwargs['label_type']
     32         assert LABEL_TYPE.MultiLabel == label_type
     33         assert 'presort' in kwargs and kwargs['presort'] is True  # aiming for direct usage of ideal ranking

KeyError: 'label_type'
@Frode-vivi
Copy link

这里修改一下就OK了
image

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

2 participants