in mozci/console/commands/batch_execution.py [0:0]
def handle(self) -> None:
results_path = BASE_OUTPUT_DIR + "/all_executions.csv"
assert os.path.exists(results_path) and os.path.isfile(
results_path
), "The CSV containing results from all classify executions doesn't exist"
with open(results_path, newline="") as f:
reader = csv.DictReader(f)
configs = self.parse_csv(reader)
# Write evaluation results per config in a new CSV file
with open(
BASE_OUTPUT_DIR + "/evaluation_of_all_executions.csv",
"w",
encoding="UTF8",
newline="",
) as f:
writer = csv.DictWriter(f, fieldnames=self.csv_header)
writer.writeheader()
csv_rows = []
for config, results in configs.items():
results.update({"configuration": config})
csv_rows.append(results)
writer.writerows(csv_rows)