Commit 5887ac7
committed
fix(builder): address agent review findings for resume feature
H1: Annotate _load_resume_state() call in _build_async with a comment
clarifying that the return value is intentionally discarded β the async
path derives ground-truth state from the filesystem, not from metadata.
M1: Replace fragile split("_", 1)[1] filename parsing in
_find_completed_row_group_ids with re.fullmatch(r"batch_(\d+)", stem),
making it immune to unexpected filename shapes.
L2: Remove unused _ResumeState.buffer_size field β the field was set
but never read; _build_with_resume uses the buffer_size parameter directly.
L4: Move mid-file imports (json, Path, ArtifactStorage) used by resume
tests to the top of test_dataset_builder.py and drop the underscore aliases.
L1: Update plans/525/resume-interrupted-runs.md to reflect that async
engine resume is fully implemented (not deferred) and that missing
metadata triggers a fresh restart instead of raising DatasetGenerationError.1 parent c496e7e commit 5887ac7
3 files changed
Lines changed: 16 additions & 19 deletions
File tree
- packages/data-designer-engine
- src/data_designer/engine/dataset_builders
- tests/engine/dataset_builders
- plans/525
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
88 | 89 | | |
89 | 90 | | |
90 | 91 | | |
91 | | - | |
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| |||
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
258 | | - | |
259 | 258 | | |
260 | 259 | | |
261 | 260 | | |
| |||
377 | 376 | | |
378 | 377 | | |
379 | 378 | | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | | - | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
384 | 382 | | |
385 | 383 | | |
386 | 384 | | |
| |||
408 | 406 | | |
409 | 407 | | |
410 | 408 | | |
| 409 | + | |
| 410 | + | |
411 | 411 | | |
412 | 412 | | |
413 | 413 | | |
| |||
Lines changed: 7 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
| |||
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
| 37 | + | |
35 | 38 | | |
36 | 39 | | |
37 | 40 | | |
| |||
944 | 947 | | |
945 | 948 | | |
946 | 949 | | |
947 | | - | |
948 | | - | |
949 | | - | |
950 | | - | |
951 | | - | |
952 | | - | |
953 | | - | |
| 950 | + | |
954 | 951 | | |
955 | 952 | | |
956 | 953 | | |
957 | | - | |
| 954 | + | |
958 | 955 | | |
959 | 956 | | |
960 | 957 | | |
961 | 958 | | |
962 | | - | |
| 959 | + | |
963 | 960 | | |
964 | 961 | | |
965 | 962 | | |
| |||
1113 | 1110 | | |
1114 | 1111 | | |
1115 | 1112 | | |
1116 | | - | |
| 1113 | + | |
1117 | 1114 | | |
1118 | 1115 | | |
1119 | 1116 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
171 | | - | |
| 171 | + | |
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
| |||
0 commit comments