From 4f10e9430f8a4da7198658cdcebacbbdf196dc26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9C=E6=B0=B8=E4=B9=85?= <34344716+yjjiang11@users.noreply.github.com> Date: Thu, 8 Dec 2022 19:55:16 -0800 Subject: [PATCH] rm dy2static eager tests part1 bert2loop (#48790) --- .../fluid/tests/unittests/dygraph_to_static/test_bert.py | 3 +-- .../paddle/fluid/tests/unittests/dygraph_to_static/test_bmn.py | 3 +-- .../tests/unittests/dygraph_to_static/test_break_continue.py | 3 +-- .../fluid/tests/unittests/dygraph_to_static/test_cycle_gan.py | 3 +-- .../tests/unittests/dygraph_to_static/test_duplicate_output.py | 3 +-- .../fluid/tests/unittests/dygraph_to_static/test_ifelse.py | 3 +-- .../paddle/fluid/tests/unittests/dygraph_to_static/test_lac.py | 3 +-- .../fluid/tests/unittests/dygraph_to_static/test_loop.py | 3 +-- 8 files changed, 8 insertions(+), 16 deletions(-) diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_bert.py b/python/paddle/fluid/tests/unittests/dygraph_to_static/test_bert.py index 65b571e79cf..cc6b8a78479 100644 --- a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_bert.py +++ b/python/paddle/fluid/tests/unittests/dygraph_to_static/test_bert.py @@ -281,5 +281,4 @@ class TestBert(unittest.TestCase): if __name__ == '__main__': - with fluid.framework._test_eager_guard(): - unittest.main() + unittest.main() diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_bmn.py b/python/paddle/fluid/tests/unittests/dygraph_to_static/test_bmn.py index 17b5282903d..f993df38f0a 100644 --- a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_bmn.py +++ b/python/paddle/fluid/tests/unittests/dygraph_to_static/test_bmn.py @@ -880,5 +880,4 @@ class TestTrain(unittest.TestCase): if __name__ == "__main__": - with fluid.framework._test_eager_guard(): - unittest.main() + unittest.main() diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_break_continue.py b/python/paddle/fluid/tests/unittests/dygraph_to_static/test_break_continue.py index f81c2d53640..7ae9248cc38 100644 --- a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_break_continue.py +++ b/python/paddle/fluid/tests/unittests/dygraph_to_static/test_break_continue.py @@ -292,5 +292,4 @@ class TestOptimBreakInWhile(TestContinueInWhile): if __name__ == '__main__': - with fluid.framework._test_eager_guard(): - unittest.main() + unittest.main() diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_cycle_gan.py b/python/paddle/fluid/tests/unittests/dygraph_to_static/test_cycle_gan.py index a47a5cfe1da..5121de5e6a0 100644 --- a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_cycle_gan.py +++ b/python/paddle/fluid/tests/unittests/dygraph_to_static/test_cycle_gan.py @@ -723,5 +723,4 @@ class TestCycleGANModel(unittest.TestCase): if __name__ == "__main__": - with fluid.framework._test_eager_guard(): - unittest.main() + unittest.main() diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_duplicate_output.py b/python/paddle/fluid/tests/unittests/dygraph_to_static/test_duplicate_output.py index cbd4fd85de3..08066874a06 100644 --- a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_duplicate_output.py +++ b/python/paddle/fluid/tests/unittests/dygraph_to_static/test_duplicate_output.py @@ -58,5 +58,4 @@ class TestDuplicateOutput(unittest.TestCase): if __name__ == '__main__': - with paddle.fluid.framework._test_eager_guard(): - unittest.main() + unittest.main() diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_ifelse.py b/python/paddle/fluid/tests/unittests/dygraph_to_static/test_ifelse.py index c9c68eeafd9..edb3a3b9d38 100644 --- a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_ifelse.py +++ b/python/paddle/fluid/tests/unittests/dygraph_to_static/test_ifelse.py @@ -509,5 +509,4 @@ class TestDy2StIfElseBackward(unittest.TestCase): if __name__ == '__main__': - with paddle.fluid.framework._test_eager_guard(): - unittest.main() + unittest.main() diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_lac.py b/python/paddle/fluid/tests/unittests/dygraph_to_static/test_lac.py index dc1eedcc8d2..7a5fbbc0842 100644 --- a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_lac.py +++ b/python/paddle/fluid/tests/unittests/dygraph_to_static/test_lac.py @@ -709,5 +709,4 @@ class TestLACModel(unittest.TestCase): if __name__ == "__main__": - with fluid.framework._test_eager_guard(): - unittest.main() + unittest.main() diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_loop.py b/python/paddle/fluid/tests/unittests/dygraph_to_static/test_loop.py index 06b17978d66..3e3382b47a0 100644 --- a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_loop.py +++ b/python/paddle/fluid/tests/unittests/dygraph_to_static/test_loop.py @@ -442,5 +442,4 @@ class TestErrorInForLoop(TestTransformForLoop): if __name__ == '__main__': - with fluid.framework._test_eager_guard(): - unittest.main() + unittest.main() -- GitLab