Update to TorchFix 0.4.0 (#119424)

`torch.library.Library` updated to `torch.library._scoped_library` in files with many tests where it seems obvious to do, otherwise `noqa: TOR901` added - see https://github.com/pytorch/pytorch/pull/118318 for more context.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/119424
Approved by: https://github.com/zou3519
This commit is contained in:
Sergii Dymchenko
2024-02-12 23:30:08 +00:00
committed by PyTorch MergeBot
parent 5acd1f0f7d
commit bd9db6a9c7
22 changed files with 348 additions and 355 deletions

View File

@ -46,7 +46,7 @@ class CustomOpTestCaseBase(TestCase):
return getattr(torch.ops, self.test_ns)
def lib(self):
result = torch.library.Library(self.test_ns, "FRAGMENT")
result = torch.library.Library(self.test_ns, "FRAGMENT") # noqa: TOR901
self.libraries.append(result)
return result