models
models copied to clipboard
[Task] Ensure that the data augmentation negative sampling layer can't be used as a sampler for prediction
Description
We'd like to make sure it's clear that the negative sampling data augmentation layer is not confused with the samplers used in the prediction blocks.
The data augmentation negative sampling layer currently is here:
https://github.com/NVIDIA-Merlin/models/blob/c36ab8b45bee5366b536558e2c35316326c78e81/merlin/models/tf/data_augmentation/negative_sampling.py#L28
Example of samplers passed to a prediction block:
https://github.com/NVIDIA-Merlin/models/blob/c36ab8b45bee5366b536558e2c35316326c78e81/merlin/models/tf/predictions/dot_product.py#L49
- Check what happens if we try to pass the data augmentation layer to the prediction block
- If we raise a suitable exception then this issue may not require any further work. Otherwise, we should raise a clear exception about why the error has occured.
This is required to avoid user to use InBatchNegatives class for retrieval tasks.