Jae-Won Chung commited on
Commit
ce6d832
1 Parent(s): 4c74ab6

Make outfile directory

Browse files
Files changed (1) hide show
  1. scripts/compute_metrics.py +1 -0
scripts/compute_metrics.py CHANGED
@@ -10,6 +10,7 @@ def main(data_dir: str, out_file: str) -> None:
10
  model_names = os.listdir(data_dir)
11
  print(f"{model_names=}")
12
 
 
13
  out_csv = csv.writer(open(out_file, "w", newline=""))
14
  metrics = ["throughput", "response_length", "latency", "energy"]
15
  out_csv.writerow(["model"] + metrics)
 
10
  model_names = os.listdir(data_dir)
11
  print(f"{model_names=}")
12
 
13
+ os.makedirs(os.path.dirname(out_file), exist_ok=True)
14
  out_csv = csv.writer(open(out_file, "w", newline=""))
15
  metrics = ["throughput", "response_length", "latency", "energy"]
16
  out_csv.writerow(["model"] + metrics)