Closed petruzzellialessandro closed 1 year ago
During training and evaluation the Recall@1 is higher than Recall@5 and Recall@10
That's I set up the task
body = tr.SequentialBlock( inputs, tr.TransformerBlock( transformer_config, masking = inputs.masking ) ) head = tr.Head( body, tr.NextItemPredictionTask(weight_tying=True, metrics=[RecallAt(top_ks=[1, 5, 10], labels_onehot=True), NDCGAt(top_ks=[5, 10], labels_onehot=True)] ), ) model = tr.Model(head)
input is obtained using the following code
input
sequence_length = 1900 d_model = 128 inputs = tr.TabularSequenceFeatures.from_schema( schema, max_sequence_length = sequence_length, masking = 'mlm', d_output = d_model, aggregation = "concat" ) inputs
where the schema only contains the item_id-list
schema
Recall@5 and Recall@10 should be <= Recall@1. I get the following results aflter some epochs
{'eval_ /next-item/recall_ at 1': 0.07417218387126923, 'eval_/next-item/recall at 5': 0.014403973706066608, 'eval_ /next-item/recall at 10': 0.02433774806559086, 'eval_/next-item/ndcg_at 5': 0.008305514231324196, 'eval_ /next-item/ndcg_at 10': 0.011453937739133835, 'eval_/loss': 7.5158371925354, "eval_runtime: 69.1242, 'eval_samples_per_ second' : 87.495, 'eval_steps_per second' : 2.734}
Bug description
During training and evaluation the Recall@1 is higher than Recall@5 and Recall@10
Steps/Code to reproduce bug
That's I set up the task
input
is obtained using the following codewhere the
schema
only contains the item_id-listExpected behavior
Recall@5 and Recall@10 should be <= Recall@1. I get the following results aflter some epochs
Environment details