未验证 提交 d6b66924 编写于 作者: P pangyoki 提交者: GitHub

disable unittest failed in eager CI in temporary (#42101)

* test=py3-eager

* test=py3-eager

* test=py3-eager
上级 79f717d6
......@@ -21,7 +21,8 @@ import paddle.static as static
from paddle.utils.cpp_extension import load, get_build_directory
from paddle.utils.cpp_extension.extension_utils import run_cmd
from utils import paddle_includes, extra_cc_args, extra_nvcc_args
from paddle.fluid.framework import _test_eager_guard
from paddle.fluid.framework import _test_eager_guard, _enable_legacy_dygraph
_enable_legacy_dygraph()
# Because Windows don't use docker, the shared lib already exists in the
# cache dir, it will not be compiled again unless the shared lib is removed.
......
......@@ -25,6 +25,8 @@ os.environ[str("GLOG_vmodule")] = str("nan_inf_utils_detail=10")
import paddle
import paddle.nn as nn
from paddle.fluid.framework import _enable_legacy_dygraph
_enable_legacy_dygraph()
np.random.seed(0)
......
......@@ -20,6 +20,9 @@ import unittest
from simnet_dygraph_model_v2 import BOW, HingeLoss
from paddle.fluid.framework import _enable_legacy_dygraph
_enable_legacy_dygraph()
SEED = 102
random.seed(SEED)
......
......@@ -16,6 +16,8 @@ import paddle
from paddle.nn import Layer
import numpy as np
import unittest
from paddle.fluid.framework import _enable_legacy_dygraph
_enable_legacy_dygraph()
class Net(Layer):
......
......@@ -21,6 +21,9 @@ import paddle.nn.functional as F
from paddle.incubate.optimizer.functional.bfgs import minimize_bfgs
from paddle.fluid.framework import _enable_legacy_dygraph
_enable_legacy_dygraph()
np.random.seed(123)
......
......@@ -19,6 +19,8 @@ import paddle
import paddle.fluid as fluid
import paddle.fluid.layers as layers
import paddle.fluid.core as core
from paddle.fluid.framework import _enable_legacy_dygraph
_enable_legacy_dygraph()
class TestDiffOp(unittest.TestCase):
......
......@@ -22,7 +22,8 @@ import paddle
import paddle.static as static
import paddle.fluid as fluid
from paddle.fluid import Program, program_guard
from paddle.fluid.framework import _test_eager_guard
from paddle.fluid.framework import _test_eager_guard, _enable_legacy_dygraph
_enable_legacy_dygraph()
import os
from paddle import _C_ops
......@@ -951,6 +952,7 @@ class TestDropoutBackward(unittest.TestCase):
return mask.astype("float32")
def test_backward_downscale_in_infer(self):
_enable_legacy_dygraph()
for place in self.places:
with fluid.dygraph.guard(place):
......
......@@ -19,6 +19,8 @@ import numpy as np
import paddle
from op_test import OpTest
from gradient_checker import grad_check
from paddle.fluid.framework import _enable_legacy_dygraph
_enable_legacy_dygraph()
def valid_eigh_result(A, eigh_value, eigh_vector, uplo):
......
......@@ -22,7 +22,8 @@ import numpy as np
import paddle
import paddle.nn as nn
from paddle.dataset.common import DATA_HOME
from paddle.fluid.framework import core, _non_static_mode
from paddle.fluid.framework import core, _non_static_mode, _enable_legacy_dygraph
_enable_legacy_dygraph()
from paddle.fluid.layer_helper import LayerHelper
from paddle import _C_ops
......
......@@ -19,6 +19,8 @@ import paddle.fluid.dygraph as dg
import paddle.nn.functional as F
import paddle.fluid.initializer as I
import unittest
from paddle.fluid.framework import _enable_legacy_dygraph
_enable_legacy_dygraph()
class LabelSmoothTestCase(unittest.TestCase):
......
......@@ -21,6 +21,9 @@ import paddle.nn.functional as F
from paddle.incubate.optimizer.functional.lbfgs import minimize_lbfgs
from paddle.fluid.framework import _enable_legacy_dygraph
_enable_legacy_dygraph()
np.random.seed(123)
......
......@@ -20,6 +20,8 @@ import os
import sys
import subprocess
import paddle
from paddle.fluid.framework import _enable_legacy_dygraph
_enable_legacy_dygraph()
paddle.enable_static()
......
......@@ -19,6 +19,8 @@ import unittest
import paddle
import paddle.nn as nn
import numpy as np
from paddle.fluid.framework import _enable_legacy_dygraph
_enable_legacy_dygraph()
paddle.disable_static()
......
......@@ -18,6 +18,8 @@ import unittest
import numpy as np
import paddle
from paddle.fluid.framework import _enable_legacy_dygraph
_enable_legacy_dygraph()
# Support types are ref from `paddle.tensor.math`
# - Related paddle dtypes:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册