-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Fix the default value of side in torch.searchsorted #120066
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
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/120066
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (5 Unrelated Failures)As of commit 874f38a with merge base 62e5840 ( FLAKY - The following jobs failed but were likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This has BC-breaking implications so we won't be able to land it as-is. Can you instead change the docs? |
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.
This feels wrong, we should update documentation instead see #120086
But running the test to see if something will fail (as I really hope we test for it)
@malfet Thanks for the suggestion, totally agree. Modified the change to doc only. However, changed to Or, we have to change out_int32, right, out and sorter in the docs as explicit optional to. https://github.com/pytorch/pytorch/blob/main/torch/_torch_docs.py#L13865 Also need to change the comment in aten/src/ATen/native/Bucketization.cpp : P. Thanks |
@lancerts if you are doing it anyway, do you mind just go over all functions in say Bucketization and update docs accordingly and document how you've verified the behavior in PR description (as right now it contradicts to what PR is actually doing) |
@malfet sure. 2, Updated the PR description to align with the changes. 3, Did a pass in torch doc. It seems the convention of the optional arg is to mark it as optional in the description (instead of in function API), for example in the pooling doc. Therefore, will follow this convention and make the change consistent with other functions in torchdoc. Thanks |
@malfet please take another look, comments addressed, thanks |
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.
Looks good, thank you for the updates
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Fixes #119999, currently the doc shows the default value of

side = "left"
while the implementation gives the default value of
side = c10::nullopt
.fix the torch doc such that the default value of side is None.
fix the comment in cpp such that the default value of side is None.