(self)
| 606 | self.assertTrue(torch.allclose(ep(*inp), loaded_ep(*inp))) |
| 607 | |
| 608 | def test_save_path(self): |
| 609 | def f(x, y): |
| 610 | return x + y |
| 611 | |
| 612 | inp = (torch.tensor([6]), torch.tensor([7])) |
| 613 | ep = export(f, inp) |
| 614 | |
| 615 | with TemporaryFileName() as fname: |
| 616 | path = pathlib.Path(fname) |
| 617 | save(ep, path) |
| 618 | loaded_ep = load(path) |
| 619 | |
| 620 | self.assertTrue(torch.allclose(ep(*inp), loaded_ep(*inp))) |
| 621 | |
| 622 | def test_save_extra(self): |
| 623 | inp = (torch.tensor([0.1, 0.1]),) |
nothing calls this directly
no test coverage detected