Skip to content

Conversation

tarun292
Copy link
Contributor

@tarun292 tarun292 commented Feb 4, 2024

Summary: In dynamo tracing, index()'s implementation currently has the default begin index as 0 and the default end index as-1 which means that by default we're dropping the last element. Rather we should be doing None which will ensure that the last element is also checked.

Test Plan: CI

Differential Revision: D53392287

cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @aakhundov @kadeng

…nd and not -1

Summary: In dynamo tracing, `index()`'s implementation currently has the default begin index as `0` and the default end index as`-1` which means that by default we're dropping the last element. Rather we should be doing `None` which will ensure that the last element is also checked.

Test Plan: CI

Differential Revision: D53392287
Copy link

pytorch-bot bot commented Feb 4, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/119151

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 3ddf5c6 with merge base 052e824 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D53392287

Copy link
Contributor

@angelayi angelayi left a comment

Choose a reason for hiding this comment

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

It looks correct to me, but will @yanboliang sign off since I'm not quite sure what this polyfill file is supposed to do...

Copy link
Contributor

@yanboliang yanboliang left a comment

Choose a reason for hiding this comment

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

Thanks for catching this! Can you add a unit test?

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Feb 5, 2024
@yanboliang
Copy link
Contributor

FYI, you can add a unit test after this:

def test_list_index(self):

@facebook-github-bot
Copy link
Contributor

@pytorchbot merge -f 'Landed internally'

(Initiating merge automatically since Phabricator Diff has merged, using force because this PR might not pass merge_rules.json but landed internally)

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use -f as last resort and instead consider -i/--ignore-current to continue the merge ignoring current failures. This will allow currently pending tests to finish and report signal before the merge.

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

huydhn added a commit to huydhn/pytorch that referenced this pull request Feb 14, 2024
pytorchmergebot pushed a commit that referenced this pull request Feb 14, 2024
)

D53392287 botched the export somehow and the exported PR #119151 didn't contain the added test.  The discrepancy is showing up on diff train patch up diff D53694548

Pull Request resolved: #119854
Approved by: https://github.com/kit1980, https://github.com/malfet
clee2000 pushed a commit that referenced this pull request Feb 14, 2024
…nd and not -1 (#119151)

Summary: In dynamo tracing, `index()`'s implementation currently has the default begin index as `0` and the default end index as`-1` which means that by default we're dropping the last element. Rather we should be doing `None` which will ensure that the last element is also checked.

Test Plan: CI

Differential Revision: D53392287

Pull Request resolved: #119151
Approved by: https://github.com/yanboliang
@github-actions github-actions bot deleted the export-D53392287 branch March 14, 2024 01:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants