in parse.py [0:0]
def print_unfinished_runs(dir):
errored_runs = []
for d in dir:
l = os.popen(f"grep -il error {d}/*.err").read()
l = [o for o in l.split("\n") if o]
errored_runs.extend(l)
# unfinished_runs = []
for run in errored_runs:
run_json = os.path.splitext(run)[0] + ".out"
with open(run_json) as f:
last_epoch = f.readlines()[-1]
last_epoch = json.loads(last_epoch)
if last_epoch["epoch"] + 1 != last_epoch["args"]["num_epochs"]:
print(run_json)