-
Notifications
You must be signed in to change notification settings - Fork 48
Feature/hstu #290
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
base: main
Are you sure you want to change the base?
Feature/hstu #290
Conversation
This reverts commit 8c6ce83. revert torch backbone changes
…nctions & require_context property
Added leave_one_out_mask function in the `utils.py` module of the `transformers` package
- `leave_one_out_mask` function (`rectools.models.nn.transformers.utils.leave_one_out_mask`) for LOO validation during transformer models training.
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.
That's really cool, great job!
warnings.warn("Only the earliest row per user is used as context", UserWarning) | ||
context = context_prep.get_context(context) | ||
context[Columns.Item] = PADDING_VALUE # External index pad element | ||
context = context[context[Columns.User].isin(interactions[Columns.User])] |
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.
context = context[context[Columns.User].isin(interactions[Columns.User])] | |
context = context[context[Columns.User].isin(interactions[Columns.User].unique())] |
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.
fix
|
||
class HSTUModel(TransformerModelBase[HSTUModelConfig]): | ||
""" | ||
HSTUM model: transformer-based sequential model with unidirectional attention mechanism and |
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.
HSTUM model: transformer-based sequential model with unidirectional attention mechanism and | |
HSTU model: transformer-based sequential model with unidirectional pointwise aggregated attention mechanism, combined with "Shifted Sequence" training objective. |
Description
Type of change
How Has This Been Tested?
Before submitting a PR, please check yourself against the following list. It would save us quite a lot of time.