提交 5bb3701c 编写于 作者: S Shenghang Tsai

ci fix log dir

上级 112b7866
......@@ -51,7 +51,7 @@ def run_cmds(cmds, gpu_num=0, timeout=10, chunk=1, verbose=False):
os.environ,
CUDA_VISIBLE_DEVICES=cuda_visible_devices,
ONEFLOW_TEST_CTRL_PORT=str(find_free_port()),
ONEFLOW_TEST_LOG_DIR=("./unittest-log-" + str(uuid.uuid4())),
ONEFLOW_TEST_LOG_DIR=("./unittest-log/" + str(uuid.uuid4())),
),
shell=True,
)
......
......@@ -151,6 +151,10 @@ class TestCase(unittest.TestCase):
atexit.register(oneflow.deprecated.delete_worker)
_unittest_worker_initilized = True
log_dir = os.getenv("ONEFLOW_TEST_LOG_DIR")
if log_dir:
oneflow.env.log_dir(log_dir)
if _unittest_env_initilized == False:
oneflow.env.init()
_unittest_env_initilized = True
......@@ -158,9 +162,6 @@ class TestCase(unittest.TestCase):
oneflow.clear_default_session()
oneflow.enable_eager_execution(eager_execution_enabled())
oneflow.experimental.enable_typing_check(typing_check_enabled())
log_dir = os.getenv("ONEFLOW_TEST_LOG_DIR")
if log_dir:
oneflow.env.log_dir(log_dir)
def skip_unless(n, d):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册