-
Notifications
You must be signed in to change notification settings - Fork 50
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
MM Pytorch API: TabularTransform for input tabular sequence #1161
Draft
sararb
wants to merge
4
commits into
main
Choose a base branch
from
torch/masking
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
sararb
added
enhancement
New feature or request
area/pytorch
area/research
area/session-based
labels
Jun 27, 2023
Documentation preview |
marcromeyn
reviewed
Jun 28, 2023
merlin/models/torch/sequences.py
Outdated
MASK_PREFIX = "__mask" | ||
|
||
|
||
class TabularBatchPadding(nn.Module): |
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.
Should we rename to TabularPadding
?
sararb
changed the title
first version of sequence transforms applied to Batch input
MM Pytorch API: TabularTransform for input tabular sequence
Jun 28, 2023
marcromeyn
reviewed
Jun 30, 2023
MASK_PREFIX = "__mask" | ||
|
||
|
||
class TabularPadding(nn.Module): |
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.
I think it might be better to break padding out into a smaller PR first, and then do masking afterwards.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
Fixes # (issue)
Goals ⚽
- Support multiple targets
- Be used for training, evaluation, and inference
Implementation Details 🚧
TabularBatchPadding
to pad a group of sequential inputsTabularPredictNext
for generating targets of causal next item predictionTabularPredictLast
for generating targets of last item predictionTabularPredictRandom
for generating targets of predicting one random item and truncate the sequence so that the random item is at the last position.TabularMaskRandom
for masked language modeling training (MLM) strategyTabularMaskLast
for masking last item in the sequence, generally used to evaluate models trained with MLM.Testing Details 🔍