-
Notifications
You must be signed in to change notification settings - Fork 24.5k
hide top-level test functions from pytest's traceback #58915
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
History: - It was included for internal helper functions in the initial proposal in #53820 - It was removed in #54780, since it is not honored when used with `pytest`'s `--tb=native`, which is the default for PyTorch Since PyTorch shouldn't be the only user of `assert_(equal|close)` we add it here to the top-level functions `assert_(equal|close)`. If `pytest` is used without `--tb=native`, the traceback for ```python assert torch.eq(actual, expected), "Tensors are not equal!" torch.testing.assert_equal(actual, expected) ``` looks the same, making it more concise. [ghstack-poisoned]
💊 CI failures summary and remediationsAs of commit e59d862 (more details on the Dr. CI page and at hud.pytorch.org/pr/58915): 💚 💚 Looks good so far! There are no failures yet. 💚 💚 This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.Please report bugs/suggestions to the (internal) Dr. CI Users group. |
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.
OK
History: - It was included for internal helper functions in the initial proposal in #53820 - It was removed in #54780, since it is not honored when used with `pytest`'s `--tb=native`, which is the default for PyTorch Since PyTorch shouldn't be the only user of `assert_(equal|close)` we add it here to the top-level functions `assert_(equal|close)`. If `pytest` is used without `--tb=native`, the traceback for ```python assert torch.eq(actual, expected), "Tensors are not equal!" torch.testing.assert_equal(actual, expected) ``` looks the same, making it more concise. [ghstack-poisoned]
History: - It was included for internal helper functions in the initial proposal in #53820 - It was removed in #54780, since it is not honored when used with `pytest`'s `--tb=native`, which is the default for PyTorch Since PyTorch shouldn't be the only user of `assert_(equal|close)` we add it here to the top-level functions `assert_(equal|close)`. If `pytest` is used without `--tb=native`, the traceback for ```python assert torch.eq(actual, expected), "Tensors are not equal!" torch.testing.assert_equal(actual, expected) ``` looks the same, making it more concise. [ghstack-poisoned]
History: - It was included for internal helper functions in the initial proposal in #53820 - It was removed in #54780, since it is not honored when used with `pytest`'s `--tb=native`, which is the default for PyTorch Since PyTorch shouldn't be the only user of `assert_(equal|close)` we add it here to the top-level functions `assert_(equal|close)`. If `pytest` is used without `--tb=native`, the traceback for ```python assert torch.eq(actual, expected), "Tensors are not equal!" torch.testing.assert_equal(actual, expected) ``` looks the same, making it more concise. [ghstack-poisoned]
@mruberry has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
Stack from ghstack:
msg
intorch.testing.assert_close
#60254 tests for diagnostics in callablemsg
intorch.testing.assert_close
torch.testing.assert_close
#60163 update docstring examples oftorch.testing.assert_close
torch.testing.assert_close
in case of mismatching values #60091 Improve error messages oftorch.testing.assert_close
in case of mismatching valuestorch.testing.assert_close
#58918 make assert_equal an example how to partialtorch.testing.assert_close
History:
in initial draft for assert_tensors_(equal|allclose) in torch.testing #53820
pytest
's--tb=native
, which is the default for PyTorchSince PyTorch shouldn't be the only user of
assert_(equal|close)
weadd it here to the top-level functions
assert_(equal|close)
. Ifpytest
is used without--tb=native
, the traceback forlooks the same, making it more concise.
Differential Revision: D29259406