-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Optest: Allow parametrized names for xfails checks #111797
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/111797
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 73b7739 with merge base 1eb6c43 (): This comment was automatically generated by Dr. CI and updates every 15 minutes. |
@@ -333,6 +333,7 @@ def validate_failures_dict_structure( | |||
if not actual_test_name.startswith(test): | |||
continue | |||
base_test_name = actual_test_name[len(test) + 2 :] | |||
base_test_name = base_test_name.split("[")[0] # remove potential pytest parametrization suffix |
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.
I wonder if there's a way to detect if we're using pytest and apply this only then. If not, then this PR seems fine to me.
Also, the full regex on the two brackets "test_name[.*]" would be more robust.
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.
a way to detect if we're using pytest
The documented way is to create a global variable on the module that gets set to True in conftest.py
. There are other suggested ways on SO, but they may not all apply here.
Is it worth it though? Brackets can't be part of test names anyway, so if there are brackets, they must come from pytest?
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.
Also, the full regex on the two brackets "test_name[.*]" would be more robust.
done!
@pytorchmergebot 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 |
CC @zou3519 This is hopefully a fix for https://github.com/pytorch/vision/pull/8058/files#r1368570541. It seems to work for me locally, but maybe there's a more elegant way of handling this? Pull Request resolved: pytorch#111797 Approved by: https://github.com/zou3519
CC @zou3519 This is hopefully a fix for https://github.com/pytorch/vision/pull/8058/files#r1368570541. It seems to work for me locally, but maybe there's a more elegant way of handling this? Pull Request resolved: pytorch#111797 Approved by: https://github.com/zou3519
CC @zou3519 This is hopefully a fix for https://github.com/pytorch/vision/pull/8058/files#r1368570541. It seems to work for me locally, but maybe there's a more elegant way of handling this? Pull Request resolved: pytorch#111797 Approved by: https://github.com/zou3519
CC @zou3519
This is hopefully a fix for https://github.com/pytorch/vision/pull/8058/files#r1368570541. It seems to work for me locally, but maybe there's a more elegant way of handling this?