[Task] First support of session-based recommendation with RNNs block
Problem:
The integration of session-based support in Merlin Models requires the implementation/refractory of different blocks. (Ticket #433 summarizes the motivation and an overview of all the requirements).
Goal:
- Implement the first low-level support of a session-based model using RNNs.
- This work will include different blocks needed for session-based but won't link them together.
Constraints:
Starting Point:
- [ ] First implementation of Masking as an augmentation technique, and the creation of related unit tests. https://github.com/NVIDIA-Merlin/models/issues/509 https://github.com/NVIDIA-Merlin/models/issues/540 Notes:
- We will include the three approaches: Last, Random, and sliding window (CLM)
- Use the UniformNegativeSampling code as a starting point
- This is a standalone class that transforms the inputs and returns a PredictionOutput object with (inputs, targets, and mask)
-
[ ] Support of SequenceAggregator operations (
to-2dtransformation) using ragged tensors: Ignore masking, Average, Weighted-average, Attention-based average. And the creation of related unit tests. Notes: We should keep the ragged representation in the input blocks and transform it to a dense representation only when forwarding the sequence to the RNN block. https://github.com/NVIDIA-Merlin/models/pull/593 -
[ ] Support of an RNN block built on top of tf.keras layers:
rnn,gruandlstm. And the creation of related unit tests. Notes: The block should return either a 2-D representation of the whole sequence or a 3-D representation with all positions. -
[ ] Example of RNN session-based recommendation training and deployment