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] The values of dataset.field2id_token and dataset.field2token_id are not the same in Knowledge based models.

See original GitHub issue

Describe the bug:

The values of dataset.field2id_token and dataset.field2token_id are not the same in Knowledge-based models.

To Reproduce:

I inserted the following debug message code in the run_recbole to check the reason of the bug. https://github.com/RUCAIBox/RecBole/blob/152358e570c05826c63e3308bd627c08f2d5f80f/recbole/quick_start/quick_start.py#L39

    # dataset filtering
    dataset = create_dataset(config)
    logger.info(dataset)

    #! insert debug message
    print('tr dataset.field2id_token=', len(dataset.field2id_token['item_id']))
    print('tr dataset.field2token_id=', len(dataset.field2token_id['item_id']))

I trained KGCN model ( other KG-based model also has the same errors ) python run_recbole.py --model=KGCN

Expected behavior:

I expected dataset.field2id_token and dataset.field2id_token are the same. However, it shows two dictionary length is not the same. It makes errors when we call dataset.id2token().

tr dataset.field2id_token= 1683
tr dataset.field2token_id= 34713

When I train/test sequential models, the values of dataset.field2id_token and dataset.field2token_id are the same.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
chenyushuocommented, May 12, 2021

@russellkim Thanks for your code. We fixed a type error in KnowledgeBasedDataset (#831), which will fix problem 1. For problem 2, you need to change the shape of scores in line 169 like this 2021-05-12 17-38-47 的屏幕截图 Now you can run your code in KGCN algorithm. We also uploaded the fixed code. fixed_test_predict.zip

1reaction
chenyushuocommented, May 10, 2021

@russellkim It seems that the id(2591) is an entity id but not an item id. Could you please provide your code so that we can check if there is any bug?

Read more comments on GitHub >

github_iconTop Results From Across the Web

OpenID Connect Core 1.0 incorporating errata set 1
The primary extension that OpenID Connect makes to OAuth 2.0 to enable End-Users to be Authenticated is the ID Token data structure.
Read more >
Not able to access Field Values with a Dataset's FieldByName ...
I have field value dataset 'EmployeeID' which has value '007' I want to assign it to one string variable 'EmployeeID' which is done...
Read more >
ForgeRock Access Management 6.5 > OpenID Connect 1.0 ...
This guide covers concepts, configuration, and usage procedures for working with OpenID Connect 1.0 and ForgeRock Access Management.
Read more >
XML Schema Part 2: Datatypes Second Edition - W3C
The [XML 1.0 (Second Edition)] specification defines limited facilities for applying datatypes to document content in that documents may contain ...
Read more >
OpenID Connect explained | Connect2id
Easy to consume identity tokens: Clients receive the user's identity encoded in a secure JSON Web Token (JWT), called an ID token. ·...
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