()
| 578 | # --------------------------------------------------------------------------- |
| 579 | |
| 580 | def main() -> None: |
| 581 | # Load results |
| 582 | df = load_results(RESULTS_PATH) |
| 583 | |
| 584 | if df is None: |
| 585 | print("No results.tsv found. Run some experiments first.") |
| 586 | return |
| 587 | |
| 588 | if len(df) == 0: |
| 589 | print("No experiments yet (results.tsv contains only the header).") |
| 590 | return |
| 591 | |
| 592 | baselines = load_baselines() |
| 593 | |
| 594 | # Single-row edge case |
| 595 | if len(df) == 1: |
| 596 | print(f"Only 1 experiment recorded (baseline).") |
| 597 | row = df.iloc[0] |
| 598 | tp = row.get("throughput_tflops", "N/A") |
| 599 | desc = row.get("description", "no description") |
| 600 | if pd.notna(tp) and isinstance(tp, (int, float)): |
| 601 | print(f" Throughput: {tp:.2f} TFLOPS -- {desc}") |
| 602 | else: |
| 603 | print(f" Throughput: {tp} -- {desc}") |
| 604 | print("\nRun more experiments to generate full analysis.") |
| 605 | # Still generate what we can |
| 606 | make_progress_plot(df, baselines) |
| 607 | generate_report(df, baselines) |
| 608 | return |
| 609 | |
| 610 | # Full analysis |
| 611 | make_progress_plot(df, baselines) |
| 612 | print_terminal_summary(df, baselines) |
| 613 | generate_report(df, baselines) |
| 614 | |
| 615 | print("Analysis complete.") |
| 616 | |
| 617 | |
| 618 | if __name__ == "__main__": |
no test coverage detected