Skip to content

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

Open
wants to merge 61 commits into
base: main
Choose a base branch
from
Open

Feature/hstu #290

wants to merge 61 commits into from

Conversation

teodor-r
Copy link
Contributor

Description

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Optimization

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.

  • Have you read the contribution guide?
  • Have you updated the relevant docstrings? We're using Numpy format, please double-check yourself
  • Does your change require any new tests?
  • Have you updated the changelog file?

teodor-r added 2 commits July 18, 2025 11:50
- `leave_one_out_mask` function (`rectools.models.nn.transformers.utils.leave_one_out_mask`) for LOO validation during transformer models training.
Copy link
Collaborator

@feldlime feldlime left a 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])]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
context = context[context[Columns.User].isin(interactions[Columns.User])]
context = context[context[Columns.User].isin(interactions[Columns.User].unique())]

Copy link
Contributor Author

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants