From 3ca334955523ea3fc8b1696b7dee6ba8850270fb Mon Sep 17 00:00:00 2001 From: Kimish Patel Date: Sun, 15 Aug 2021 16:12:47 -0700 Subject: [PATCH] [Pytorch Edge] Fix broken test post changes in error reporting format. (#63287) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/63287 Recent changes in https://github.com/pytorch/pytorch/pull/62419 changed the way module hierarchy is reported. Now it includes information about function names as well. Test Plan: python test/mobile/test_lite_script_module.py TestLiteScriptModule.test_save_mobile_module_with_debug_info_with_trace Imported from OSS Reviewed By: iseeyuan Differential Revision: D30328512 fbshipit-source-id: ddd6b11b9ab01cc725f4568a35eff7a92f17204b --- test/mobile/test_lite_script_module.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/mobile/test_lite_script_module.py b/test/mobile/test_lite_script_module.py index 16f3b9c5f6..369371fd32 100644 --- a/test/mobile/test_lite_script_module.py +++ b/test/mobile/test_lite_script_module.py @@ -88,12 +88,12 @@ class TestLiteScriptModule(TestCase): assert(b"callstack_debug_map.pkl" in exported_module) mobile_module = _load_for_lite_interpreter(buffer) - with self.assertRaisesRegex(RuntimeError, r"Module hierarchy:top\(B\).A0\(A\)"): + with self.assertRaisesRegex(RuntimeError, r"Module hierarchy:top\(B\)::.A0\(A\)::forward.aten::mul"): x = torch.rand((2, 3)) y = torch.rand((8, 10)) z = torch.rand((8, 10)) mobile_module(x, y, z) - with self.assertRaisesRegex(RuntimeError, r"Module hierarchy:top\(B\).A1\(A\)"): + with self.assertRaisesRegex(RuntimeError, r"Module hierarchy:top\(B\)::.A1\(A\)::forward.aten::mul"): x = torch.rand((2, 3)) y = torch.rand((2, 3)) z = torch.rand((8, 10)) -- 2.34.1