facebookresearch / ReAgent

A platform for Reasoning systems (Reinforcement Learning, Contextual Bandits, etc.)
https://reagent.ai
BSD 3-Clause "New" or "Revised" License
3.58k stars 521 forks source link

Seq2Slate issue #716

Open 20010404 opened 1 year ago

20010404 commented 1 year ago

Hi. Can you please give me the source code of seq2slate algorithm alone? I have searched the online environment but only to find it in ReAgent. It could be really kind of you as I am at the start step of reranking models. I promise I will only use it for research. My email is deborahpyx010404@gmail.com.

rodrigodesalvobraz commented 1 year ago

Hi, Deborah. Are you looking for https://github.com/facebookresearch/ReAgent/blob/a4070357ee2e033d281a1043a7305be172064d5e/reagent/training/ranking/seq2slate_trainer.py?

20010404 commented 1 year ago

Hi, Deborah. Are you looking for https://github.com/facebookresearch/ReAgent/blob/a4070357ee2e033d281a1043a7305be172064d5e/reagent/training/ranking/seq2slate_trainer.py?

Thanks for your help. I will look at the code carefully. So difficult for me now :)

JuiceFV commented 1 year ago

Hi, Deborah

Regarding Seq2Slate - be aware that the current version doesn't implement paddings in the batch. The main problem is the last decoder layer (specifically autoregressive decoding); it requires a symmetrical decoder mask in purpose to properly form the distribution over items, excluding paddings. If your problem definition assumes sequences of different lengths, you should carefully implement this logic