NVIDIA-Merlin / NVIDIA-Merlin/Merlin
[Task] Improve negative sampling for retrieval
@sararb is already working on this.
Since Jul 21, 2022.
- Dominant language
- Python
- Stars
- 907
- Forks
- 129
- PR merge metrics
- No merged PRs in 30d
Description
Problem:
There is a considerable amount of tech-debt in the code that’s responsible for negative sampling in retrieval. The biggest issue is that it relies heavily on the model-context, which we would like to remove in order to simplify things.
Goal:
- Simplify the base-class
PredictionTask - Remove the usage of model-context in the prediction-tasks
- Generalize sampling-queues to allow for ranking
Constraints:
- Keep user-facing API the same.
Starting Point:
-
Implement
PredictionBlock,BinaryPrediction&RegressionPrediction: Done -
Implement a new negative-sampler base class Done
-
Implement
DotProductDone -
Implement
ContrastivePredictionBlock+ tests Done -
Implement
DotProductPredictionDone -
Tests for two-tower/mf with BinaryPrediction & RegressionPrediction WIP
-
Implement
CategoricalPrediction(without contrastive capabilities) Done -
Make
CategoricalPredictionallow for negative-sampling Done -
Update retrieval models with new ConstrastiveOutput WIP
-
Impelement different types of samplers one by one
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.