Skip to content

Commit

Permalink
Remove not used txt writer
Browse files Browse the repository at this point in the history
  • Loading branch information
kcz358 committed Sep 3, 2024
1 parent 9d5ad74 commit 0126968
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions lmms_eval/evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -607,19 +607,6 @@ def evaluate(
else:
results_dict = None

with open(f"{cli_args.output_path}/rank{int(os.environ.get('RANK', 0))}_metric_eval_done.txt", "w") as f:
f.write(f"rank {int(os.environ.get('RANK', 0))} eval done")
while len([file for file in os.listdir(cli_args.output_path) if file.endswith("metric_eval_done.txt")]) < lm._world_size:
time.sleep(1)

else:
return None

with open(f"{cli_args.output_path}/rank{int(os.environ.get('RANK', 0))}_metric_eval_done.txt", "w") as f:
f.write(f"rank {int(os.environ.get('RANK', 0))} eval done")
while len([file for file in os.listdir(cli_args.output_path) if file.endswith("metric_eval_done.txt")]) < lm._world_size:
time.sleep(1)

lm.accelerator.wait_for_everyone()
return results_dict

Expand Down

0 comments on commit 0126968

Please sign in to comment.