Repository navigation
Fix profiler unit tests 2 - #180454
Closed
scotts wants to merge 2 commits into
Closed
Fix profiler unit tests 2#180454scotts wants to merge 2 commits into
scotts wants to merge 2 commits into
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/180454
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (9 Unrelated Failures)As of commit 8fa8859 with merge base 54dd3ed ( 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. |
ryanzhang22
approved these changes
Apr 15, 2026
Contributor
Author
|
@pytorchbot merge |
Collaborator
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 |
meta-codesync Bot
pushed a commit
to pytorch/kineto
that referenced
this pull request
May 14, 2026
Summary: Landing pytorch/pytorch#180454 fixed all of these. We still have that fuzz test remaining which seems to be a real failure. Pull Request resolved: #1403 Reviewed By: NicolasHug Differential Revision: D105195889 Pulled By: scotts fbshipit-source-id: bf9c54dea15b5d07ad84e81c8136ee9617cae987
gplutop7
pushed a commit
to gplutop7/pytorch
that referenced
this pull request
Jul 15, 2026
Profiler unit tests were calling `os.environ["key"] = "value"` to change local behavior. But that changes the testing processes environment, polluting other tests. This causes strange failures, where running `python -m pytest test/profiler/test_memory_profiler.py` would succeed, but then tests in that file would fail when all tests were run with `python -m pytest test/profiler/`. Using `unittest.mock.patch` ensures these changes are isolated. Note that this PR is a redo of pytorch#180380 because that PR got hosed during a bad rebase. Pull Request resolved: pytorch#180454 Approved by: https://github.com/ryanzhang22
aws-kingrj
pushed a commit
to amazon-contributing/upstream-to-pytorch
that referenced
this pull request
Jul 29, 2026
Profiler unit tests were calling `os.environ["key"] = "value"` to change local behavior. But that changes the testing processes environment, polluting other tests. This causes strange failures, where running `python -m pytest test/profiler/test_memory_profiler.py` would succeed, but then tests in that file would fail when all tests were run with `python -m pytest test/profiler/`. Using `unittest.mock.patch` ensures these changes are isolated. Note that this PR is a redo of pytorch#180380 because that PR got hosed during a bad rebase. Pull Request resolved: pytorch#180454 Approved by: https://github.com/ryanzhang22
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Profiler unit tests were calling
os.environ["key"] = "value"to change local behavior. But that changes the testing processes environment, polluting other tests.This causes strange failures, where running
python -m pytest test/profiler/test_memory_profiler.pywould succeed, but then tests in that file would fail when all tests were run withpython -m pytest test/profiler/. Usingunittest.mock.patchensures these changes are isolated.Note that this PR is a redo of #180380 because that PR got hosed during a bad rebase.