Commit ad89039a authored by Antoine Kaufmann's avatar Antoine Kaufmann
Browse files

experiments: make sure logparser.py works on non 'out/' directories

parent 667403ea
......@@ -34,14 +34,14 @@ import re
log_file = sys.argv[1]
log = open(log_file, 'r')
curdir = pathlib.Path().absolute()
exp_log = json.load(log)
run_num = re.split('-|\.', log_file)[-2]
#Name, starting & ending time
exp_name = exp_log['exp_name']
tooutdir = f'out/{exp_name}/{run_num}'
outdir = os.path.join(curdir, tooutdir)
p = pathlib.Path(log_file)
tooutdir = f'/{exp_name}/{run_num}'
outdir = '/'.join(list(p.parts)[0:-1]) + tooutdir
if not os.path.exists(outdir):
raise Exception("no such directory")
......
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