question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[🐛BUG] Not able to generate and save recommended items from FM (CARS).

See original GitHub issue

The bug I am running FM using additonal user features as contextual information.

To Reproduce Steps to reproduce the behavior:

  1. yaml file
# Training and evaluation config
data_path: 
epochs: 50
train_batch_size: 4096
eval_batch_size: 4096
neg_sampling: ~
load_col:
    inter: [user_id, item_id, rating, timestamp]
    user: [user_id, gender] #  age, gender, occupation, zip_code]
threshold:
    rating: 3
TIME_FIELD: timestamp
eval_args:
    group_by: ~
    order: TO
    split: {'RS': [0.8,0.1,0.1]}
    mode: uni1000 # Not able to use neither labeled nor full options!

metrics: ['Recall', 'MRR', 'NDCG', 'Hit', 'Precision', 'ItemCoverage', 'GiniIndex', 'ShannonEntropy']
topk: 50
valid_metric: MRR@50
metric_decimal_place: 4
eval_step: 10
save_dataset: True
save_dataloaders: True
reproducibility: True
seed: 2020
filter_inter_by_user_or_item: True
user_inter_num_interval: [20, 1500]
  1. Code
from recbole.quick_start import run_recbole
from recbole.utils.case_study import full_sort_topk

config_file_list= ['test.yaml']
run_recbole(model='FM', dataset='ml-100k', config_file_list= config_file_list)
  1. Output results

Expected behavior I get the recommendation metrics as follow: `Evaluate : 100%|████████████████████████████████████████████████| 166/166 [00:07<00:00, 21.65it/s]

30 Dec 16:50 INFO best valid : {‘recall@50’: 0.134, ‘mrr@50’: 0.2801, ‘ndcg@50’: 0.173, ‘hit@50’: 0.7411, ‘precision@50’: 0.1366, ‘itemcoverage@50’: 0.1289, ‘giniindex@50’: 0.957, ‘shannonentropy@50’: 0.0209}

30 Dec 16:50 INFO test result: {‘recall@50’: 0.117, ‘mrr@50’: 0.2771, ‘ndcg@50’: 0.1783, ‘hit@50’: 0.6867, ‘precision@50’: 0.1475, ‘itemcoverage@50’: 0.1182, ‘giniindex@50’: 0.9555, ‘shannonentropy@50’: 0.023} `

But once I try to run case study: topk_score, topk_iid_list = full_sort_topk(uid_series, model, test_data, k=50, device=config['device']) I get the following error: AttributeError: 'NegSampleEvalDataLoader' object has no attribute 'is_sequential'

Looking forward to hear back from you. Thank you.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9

github_iconTop GitHub Comments

1reaction
Wicknightcommented, Jan 2, 2022

It can be solved by the ‘group_by’ parameter. Because the data set has a strong time dependence, it is necessary to group by user to ensure that each data set of {train,valid,test} divided by ‘TO’ has history_item.

0reactions
SlokomManelcommented, Jan 2, 2022

Thank you so much. It works now 💯

Read more comments on GitHub >

github_iconTop Results From Across the Web

Forza Horizon 5 updates: Known issues, bugs, update ...
Here's every known issue and bug in Forza Horizon 5, alongside all the updates and changelogs working to fix them.
Read more >
FH5 Fixed Issues - Forza Support
This list is updated regularly. The team has fixed all of the issues on this list which would not be possible without hearing...
Read more >
Farming Simulator 22 How to Reset Stuck Vehicles - YouTube
Occasionally you can get a vehicle and attached tools stuck. There is an option available that will reset them back to the local...
Read more >
How to Tell If Your House & Car Are Bugged | SpyGuy
And finding a hidden audio bug is no joke. In this guide, we'll break down the basics of how to tell if your...
Read more >
Common Microsoft Edge Problems, and How to Fix Them
You may run into issues with the maturing browser, so we provided a list of possible problems and how to fix them with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found