NVIDIA-Merlin / NVIDIA-Merlin/Merlin
[INF] Adjust the shape of TF Dataloader ragged list outputs
Open
@edknv is already working on this.
Since Jan 26, 2023.
roadmap
- Dominant language
- Python
- Stars
- 907
- Forks
- 129
- PR merge metrics
- No merged PRs in 30d
Description
Problem:
TF Dataloader produces shapes that make serving the model difficult. Models has code to take this awkward shape and rework it to what the model actually requires, but the serving signature it saves is the input from the dataloader. This code should be moved upstream into the dataloader so it doesn't need to be repeated at inference time.
Goal:
- Models
- Pull out the code for reshaping the tensor (https://github.com/NVIDIA-Merlin/models/blob/60a9ca13ce3975b5a29e6a304d2ead7df193ec6a/merlin/models/tf/utils/tf_utils.py#L462)
- Pull out the code for distinguishing between list columns (values and row lengths) and scalars
- Dataloader
- Add code for reshaping the tensor to the correct shape into the dataloader in (_to_tensor)
- Use the code from Merlin models schema that distinguishes between list columns to only apply this in the appropriate place.
Constraints:
Only want to apply the transform in the appropriate place, requiring schema awareness.
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.