Commit 83981c32 authored by Shreyan Chowdhury's avatar Shreyan Chowdhury

bug fix in exit_experiment

parent d4512404
......@@ -163,15 +163,17 @@ def init_experiment(comment='', name=None):
# ============================================
def exit_experiment(status):
def exit_experiment(status, exp):
global CURR_RUN_PATH
if status=='failed':
os.rename(CURR_RUN_PATH, os.path.join(PATH_RESULTS, 'runs', 'failed - '+curr_run_name))
CURR_RUN_PATH = os.path.join(PATH_RESULTS, 'runs', 'failed - '+curr_run_name)
elif status=='stopped':
os.rename(CURR_RUN_PATH, os.path.join(PATH_RESULTS, 'runs', 'stopped - '+curr_run_name))
CURR_RUN_PATH = os.path.join(PATH_RESULTS, 'runs', 'stopped - '+curr_run_name)
else:
os.rename(CURR_RUN_PATH, os.path.join(PATH_RESULTS, 'runs', curr_run_name))
exp.save_dir = CURR_RUN_PATH
def write_to_file(data, path):
# not fully implemented. unused function as of now.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment