-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for ragged inputs to model #666
Merged
oliverholworthy
merged 15 commits into
NVIDIA-Merlin:main
from
oliverholworthy:pad-ragged-inputs-in-model
Apr 7, 2023
Merged
Changes from 4 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
89f0be1
Update padding to handle truncation to smaller sequence length
oliverholworthy 11c02ef
Add ragged argument to enable returning ragged representation
oliverholworthy d86e638
Add support for ragged inputs in model and add test for model
oliverholworthy c867dee
Add `max_sequence_length` to Model and move input padding to method
oliverholworthy 919a570
Use len("__offsets") to get feature name
oliverholworthy eec9df0
Reformat padding_lengths line
oliverholworthy cc1d6fb
Add torch.jit.script decorator to pad_batch
oliverholworthy ab4019e
Move pad_inputs to function and make jit scriptable
oliverholworthy 8bafdf5
Only call pad_batch if is a dict of tensors
oliverholworthy ee28762
Add test of model tracing to ragged inputs test
oliverholworthy 92925b2
Move `pad_inputs` into padding module
oliverholworthy b3b81d5
update example inputs to demonstrate different batch size
oliverholworthy 29fa413
Update docstring for pad_inputs
oliverholworthy 08c79d6
Add tests for pad_inputs
oliverholworthy 686696c
Update test of pad_inputs to make test clearer
oliverholworthy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a
max_sequence_length
to limit the size of the padding when receiving ragged inputs.