Skip to content
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

Closed
wants to merge 3 commits into from

Conversation

NicolasHug
Copy link
Member

@NicolasHug NicolasHug commented Oct 23, 2023

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?

@pytorch-bot
Copy link

pytorch-bot bot commented Oct 23, 2023

🔗 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 Failures

As of commit 73b7739 with merge base 1eb6c43 (image):
💚 Looks good so far! There are no failures yet. 💚

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

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.

Copy link
Member Author

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?

Copy link
Member Author

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!

@NicolasHug
Copy link
Member Author

@pytorchmergebot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Oct 24, 2023
@pytorchmergebot
Copy link
Collaborator

Merge started

Your 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

Advanced Debugging
Check the merge workflow status
here

@NicolasHug NicolasHug deleted the NicolasHug-patch-1 branch October 25, 2023 08:42
andreigh pushed a commit to andreigh/pytorch that referenced this pull request Oct 26, 2023
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
xuhancn pushed a commit to xuhancn/pytorch that referenced this pull request Nov 7, 2023
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
Skylion007 pushed a commit to Skylion007/pytorch that referenced this pull request Nov 14, 2023
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ciflow/trunk Trigger trunk jobs on your pull request Merged topic: not user facing topic category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants