Skip to content

Conversation

@feldlime
Copy link
Collaborator

@feldlime feldlime commented Feb 10, 2026

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?

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates SASRec transformer unit tests to reflect changed recommendation ordering/output, likely as a consequence of dependency version changes.

Changes:

  • Adjust expected Columns.Item sequences in SASRec recommendation tests (test_u2i_with_key_and_attn_masks, test_u2i_with_item_features).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 413 to 417
pd.DataFrame(
{
Columns.User: [30, 30, 30, 40, 40, 40],
Columns.Item: [11, 13, 17, 17, 13, 11],
Columns.Item: [11, 13, 15, 17, 13, 11],
Columns.Rank: [1, 2, 3, 1, 2, 3],
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

The PR title/description indicate only dependency/lockfile bumps, but this hunk changes the expected recommendation output (items/ranks). Please update the PR description (and/or title) to explain the behavioral change and which dependency bump caused it, so reviewers can assess whether the new ranking is an intended/acceptable change rather than masking a regression.

Copilot uses AI. Check for mistakes.
Comment on lines 415 to 417
Columns.User: [30, 30, 30, 40, 40, 40],
Columns.Item: [11, 13, 17, 17, 13, 11],
Columns.Item: [11, 13, 15, 17, 13, 11],
Columns.Rank: [1, 2, 3, 1, 2, 3],
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

These tests assert an exact item ordering. In the recommendation stack, ranking is produced via torch.topk(..., sorted=True) (see TorchRanker.rank), which does not guarantee a deterministic order for ties and can change across torch versions / BLAS kernels even with deterministic flags. To reduce future lockfile-bump churn and flakiness, consider enforcing a deterministic tie-break (e.g., secondary sort by item id) in the ranker/recommendation code, or relax the test to assert an ordering rule (score desc + item asc) rather than a hardcoded list that may vary when scores are equal/near-equal.

Copilot uses AI. Check for mistakes.
Comment on lines 454 to 458
pd.DataFrame(
{
Columns.User: [30, 30, 30, 40, 40, 40],
Columns.Item: [11, 13, 12, 13, 14, 12],
Columns.Item: [11, 12, 13, 13, 14, 12],
Columns.Rank: [1, 2, 3, 1, 2, 3],
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

Same concern as above: this expected ordering change looks like it could be driven by tie/near-tie score ordering differences after dependency updates. To make this test robust across torch/pytorch-lightning bumps, prefer a deterministic tie-break in ranking (or assert ordering via an explicit secondary key) instead of hardcoding an order that can legitimately vary.

Copilot uses AI. Check for mistakes.
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.

1 participant