Skip to content

Commit bbc207d

Browse files
committed
greptile feedback
Signed-off-by: Sarah Yurick <sarahyurick@gmail.com>
1 parent acaa942 commit bbc207d

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

nemo_curator/backends/base.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,13 @@ def process_batch(self, tasks: list[Task]) -> list[Task]:
125125
if failed_tasks:
126126
record_failed_tasks()
127127

128+
# Source-stage sentinels (NoneTask only; FailedTask already raised above) are
129+
# not real partitions and must not influence shard assignment or resumability
130+
# counters. Non-source stages keep sentinels here so _apply_resumability_counters
131+
# can fire the correct -1 delta for filtered (NoneTask) slots in the 1:1 path.
132+
if is_source_stage:
133+
results = [r for r in results if not _is_sentinel(r)]
134+
128135
# Filter tasks based on the Slurm array configuration.
129136
slurm_array = resolve_slurm_array_config(is_source_stage=is_source_stage)
130137
if slurm_array is not None and is_source_stage:

0 commit comments

Comments
 (0)