Commit db87f0a
committed
refactor: address review feedback on eval harness types and async I/O (#312)
- _print_table / run_eval: dict -> Dict[str, Any] (heterogeneous result dict;
Any is intentional and commented per the backend no-bare-Any rule)
- _preflight: type the indexer param via a TYPE_CHECKING guard so the precise
type costs nothing at runtime (preserves known-bug #3 import isolation)
- test: add -> None return annotation
- results write: run Path.write_text off the event loop via asyncio.to_thread
so run_eval stays non-blocking (backend async rule)
Skipped the nitpick converting load_ground_truth/load_baseline to async aiofiles:
one-time sub-ms config reads in an offline batch CLI with no loop concurrency;
not worth a new runtime dep + cascading async into a sync test.1 parent 1a24f31 commit db87f0a
3 files changed
Lines changed: 20 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
14 | | - | |
| 15 | + | |
| 16 | + | |
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
15 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
16 | 20 | | |
17 | 21 | | |
18 | 22 | | |
| |||
42 | 46 | | |
43 | 47 | | |
44 | 48 | | |
45 | | - | |
| 49 | + | |
46 | 50 | | |
47 | 51 | | |
48 | 52 | | |
| |||
58 | 62 | | |
59 | 63 | | |
60 | 64 | | |
61 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
62 | 72 | | |
63 | 73 | | |
64 | 74 | | |
| |||
137 | 147 | | |
138 | 148 | | |
139 | 149 | | |
140 | | - | |
141 | | - | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
142 | 153 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
0 commit comments