|
7 | 7 |
|
8 | 8 | import polars as pl |
9 | 9 |
|
10 | | -from .report import emit |
| 10 | +from .report import emit, emit_table |
11 | 11 |
|
12 | 12 |
|
13 | 13 | @dataclass |
@@ -373,8 +373,7 @@ def compute_stacktrace_token_percentiles(df: pl.DataFrame) -> pl.DataFrame: |
373 | 373 |
|
374 | 374 | emit(f"\n### Stacktrace token percentiles ({len(df)} pairs)\n") |
375 | 375 | emit("(Using len(stacktrace) // 4 as token approximation)") |
376 | | - with pl.Config(tbl_rows=-1, tbl_cols=-1): |
377 | | - emit(result) |
| 376 | + emit_table(result) |
378 | 377 |
|
379 | 378 | return result |
380 | 379 |
|
@@ -405,8 +404,7 @@ def sweep_thresholds( |
405 | 404 |
|
406 | 405 | result = pl.DataFrame(rows).with_columns(pl.col(pl.Float64).round(2)) |
407 | 406 | emit(f"\n### Threshold sweep for {model_name}\n") |
408 | | - with pl.Config(tbl_rows=-1, tbl_cols=-1): |
409 | | - emit(result) |
| 407 | + emit_table(result) |
410 | 408 | return result |
411 | 409 |
|
412 | 410 |
|
@@ -504,8 +502,7 @@ def sweep_thresholds_by_project( |
504 | 502 | ) |
505 | 503 | by_platform = pl.DataFrame(rows_by_platform).sort("platform").with_columns(pl.col(pl.Float64).round(2)) |
506 | 504 | emit(f"\n### Per-project precision_GROUP: platform-specific vs {baseline_key} by platform\n") |
507 | | - with pl.Config(tbl_rows=-1, tbl_cols=-1): |
508 | | - emit(by_platform) |
| 505 | + emit_table(by_platform) |
509 | 506 |
|
510 | 507 |
|
511 | 508 | def metrics_by_platform( |
@@ -547,8 +544,7 @@ def metrics_by_platform( |
547 | 544 |
|
548 | 545 | threshold_label = "platform-specific" if isinstance(threshold, dict) else f"threshold={threshold}" |
549 | 546 | emit(f"\n### Metrics by platform, avg over projects ({model_name}, {threshold_label})\n") |
550 | | - with pl.Config(tbl_rows=-1, tbl_cols=-1): |
551 | | - emit(result) |
| 547 | + emit_table(result) |
552 | 548 |
|
553 | 549 | return result |
554 | 550 |
|
@@ -638,8 +634,7 @@ def find_threshold_by_platform( |
638 | 634 |
|
639 | 635 | precision_label = "per-platform" if precision_by_platform else f"{min_precision:.0%}" |
640 | 636 | emit(f"\n### Min threshold for >= {precision_label} avg project precision_GROUP by platform ({model_name})\n") |
641 | | - with pl.Config(tbl_rows=-1, tbl_cols=-1): |
642 | | - emit(result) |
| 637 | + emit_table(result) |
643 | 638 |
|
644 | 639 | return result |
645 | 640 |
|
|
0 commit comments