(log_dir: Path)
| 212 | |
| 213 | |
| 214 | def main(log_dir: Path): |
| 215 | if DATA_CACHE.exists(): |
| 216 | try: |
| 217 | with open(DATA_CACHE) as f: |
| 218 | model_to_round_lines = json.load(f) |
| 219 | except Exception: |
| 220 | model_to_round_lines = build_data(log_dir) |
| 221 | with open(DATA_CACHE, "w") as f: |
| 222 | json.dump(model_to_round_lines, f, indent=2) |
| 223 | else: |
| 224 | model_to_round_lines = build_data(log_dir) |
| 225 | with open(DATA_CACHE, "w") as f: |
| 226 | json.dump(model_to_round_lines, f, indent=2) |
| 227 | |
| 228 | # Separate charts: one for README changes, one for submission changes |
| 229 | plot_averages(model_to_round_lines, OUTPUT_PNG_README, file_types=["README_agent.md"]) |
| 230 | plot_averages(model_to_round_lines, OUTPUT_PNG_SUBMISSION, file_types=["submission"]) |
| 231 | |
| 232 | |
| 233 | if __name__ == "__main__": |
no test coverage detected