(log_dir: Path)
| 157 | |
| 158 | |
| 159 | def main(log_dir: Path): |
| 160 | if DATA_CACHE.exists(): |
| 161 | try: |
| 162 | with open(DATA_CACHE) as f: |
| 163 | model_to_round_lines = json.load(f) |
| 164 | except Exception: |
| 165 | model_to_round_lines = build_data(log_dir) |
| 166 | with open(DATA_CACHE, "w") as f: |
| 167 | json.dump(model_to_round_lines, f, indent=2) |
| 168 | else: |
| 169 | model_to_round_lines = build_data(log_dir) |
| 170 | with open(DATA_CACHE, "w") as f: |
| 171 | json.dump(model_to_round_lines, f, indent=2) |
| 172 | |
| 173 | plot_averages(model_to_round_lines, OUTPUT_PNG) |
| 174 | |
| 175 | |
| 176 | if __name__ == "__main__": |
no test coverage detected