Skip to content

Commit

Permalink
ci fix log dir
Browse files Browse the repository at this point in the history
  • Loading branch information
jackalcooper committed Oct 21, 2020
1 parent 112b786 commit 5bb3701
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ci/test/parallel_run.py
Expand Up @@ -51,7 +51,7 @@ def available_slots():
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,
)
Expand Down
7 changes: 4 additions & 3 deletions oneflow/python/framework/unittest.py
Expand Up @@ -151,16 +151,17 @@ def setUp(self):
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

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):
Expand Down

0 comments on commit 5bb3701

Please sign in to comment.