-
Notifications
You must be signed in to change notification settings - Fork 126
Open
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.