mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
This PR is part of a series attempting to re-submit https://github.com/pytorch/pytorch/pull/134592 as smaller PRs. Add missing `if __name__ == "__main__":` guards to some tests. Pull Request resolved: https://github.com/pytorch/pytorch/pull/154716 Approved by: https://github.com/Skylion007
14 lines
304 B
Python
14 lines
304 B
Python
# Owner(s): ["oncall: jit"]
|
|
|
|
import torch._lazy.metrics
|
|
from torch.testing._internal.common_utils import run_tests
|
|
|
|
|
|
def test_metrics():
|
|
names = torch._lazy.metrics.counter_names()
|
|
assert len(names) == 0, f"Expected no counter names, but got {names}"
|
|
|
|
|
|
if __name__ == "__main__":
|
|
run_tests()
|