`ValidationColumnConfig` misaligns rows and discards the whole batch after an upstream row is dropped
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 78/100
調査の方向性
まず data_designer/engine/column_generators/generators/validation.py、特に ValidationColumnGenerator.generate() を確認し、その結果インデックスを data_designer/engine/dataset_builders/async_scheduler.py:2294-2296 から渡される残存行ラベルと比較してください。添付の repro_validation_index.py を使い、最後の行ではない --fail-row を指定して再現してください。preview() が残存行を answer_check の結果とともに返し、バッチサイズエラーが発生しなければ完了です。
索引モデルが issue の本文から書いたものです。
説明
Priority Level
Medium (Annoying but has workaround)
Describe the bug
If a column that runs before a ValidationColumnConfig fails non-retryably for one row (e.g. the LLM
endpoint returns a 400), the validation column returns more rows than the batch contains. The
scheduler then rejects the validation result and the entire batch is lost, not just the failed row.
[WARNING] Non-retryable failure on answer[rg=0, row=1]
[WARNING] Non-retryable failure on answer_check[rg=0, row=None]: Batch generator for column
'answer_check' returned 4 rows but 3 were expected (rg=0).
With 4 records and one failed LLM call, preview() produces 0 records and raises
DataDesignerGenerationError instead of returning the 3 surviving rows.
It only happens when the dropped row is not the last one in the row group. Dropping the last row
leaves the index contiguous (0, 1, 2), so the failure looks intermittent when real API errors hit
random rows.
Root cause. The async scheduler builds the batch input with the surviving rows' original labels:
data_designer/engine/dataset_builders/async_scheduler.py:2294-2296
active_row_indices = [ri for ri in range(rg_size) if ri not in pre_dropped]
...
input_df = lazy.pd.DataFrame(records, index=active_row_indices)
ValidationColumnGenerator.generate() builds its results with a fresh RangeIndex and joins
column-wise on labels:
data_designer/engine/column_generators/generators/validation.py:102-103
validation_results = lazy.pd.DataFrame({self.config.name: outputs_as_dicts})
return lazy.pd.concat([data, validation_results], axis=1)
With data.index == [0, 2, 3] and validation_results.index == [0, 1, 2], the outer join yields
4 rows (labels 0–3), and the misaligned rows hold NaN in the data columns or in the validation column.
Steps/Code to reproduce bug
repro_validation_index.py
The attached script uses a local mock OpenAI-compatible endpoint (stdlib http.server) that returns
HTTP 400 for one chosen row. Real Data Designer handles everything else: the seed dataset, the LLM
column, the async scheduler and the validation column. No credentials or network access are needed.
uv run --script repro_validation_index.py # row 1 fails -> BUG REPRODUCED (0 rows)
uv run --script repro_validation_index.py --fail-row 0 # row 0 fails -> BUG REPRODUCED (0 rows)
uv run --script repro_validation_index.py --fail-row 3 # last row -> PASS (3 rows)
uv run --script repro_validation_index.py --fail-row -1 # no failure -> PASS (4 rows)
Pipeline: DataFrameSeedSource(item_id 0..3) → LLMTextColumnConfig → ValidationColumnConfig
(LOCAL_CALLABLE).
Results (same for every version tested):
| data-designer | fail row 0 | fail row 1 | fail row 3 (last) | no failure |
|---|---|---|---|---|
| 0.9.5 | bug | bug | pass | pass |
| 0.9.6 (latest) | bug | bug | pass | pass |
| 1.0.0rc1 | bug | bug | pass | pass |
Tested with Python 3.12, pandas 3.0.6, Linux. Pin a version with
uv run --with data-designer==<version> --script repro_validation_index.py.
Expected behavior
The dropped row is excluded and the validation column is generated for the surviving rows. In the
repro, preview() returns 3 rows, each with an answer_check result.
Agent Diagnostic / Prior Investigation
This bug was found while building a multi-turn text-to-SQL trajectory pipeline on Data Designer, when
rate-limit errors on single rows wiped out whole batches. An AI coding agent helped write the issue and
the repro; I reviewed both and ran the repro myself.
- Searched existing issues and PRs (
ValidationColumnConfig, "rows but … were expected", validation
index/reset_index). Found nothing related. - Diffed the installed 0.9.5 engine against 0.9.6 and 1.0.0rc1.
validation.pyand
async_scheduler.pyare unchanged. - Confirmed the fix direction by monkeypatching
ValidationColumnGenerator.generateto call the
original withdata.reset_index(drop=True)and then restoredata.indexon the result. With that
patch, the repro passes on 0.9.6 and 1.0.0rc1 (3 rows, all validated).
Suggested fix (in ValidationColumnGenerator.generate):
validation_results = lazy.pd.DataFrame({self.config.name: outputs_as_dicts}, index=data.index)
return lazy.pd.concat([data, validation_results], axis=1)
Other full-column generators that rebuild a frame and concat(axis=1) may need the same check.
Additional context
Workaround: do the check in a cell-by-cell CustomColumnConfig (@dd.custom_column_generator)
instead of ValidationColumnConfig. It is row-safe.
Checklist
- I reproduced this issue or provided a minimal example
- I searched the docs/issues myself, or had my agent do so
- If I used an agent, I included its diagnostics above
- 主要言語
- Python
- スター
- 2.4k
- フォーク
- 234
- 平均マージ
- 22時間 5分
- マージ済み PR(30日)
- 70
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
NVIDIA-NeMo/DataDesigner のほかの issue
-
docs: required_columns description is incomplete for LLM and multimodal columns対応中かも @rksharma-owg が 6 日前に担当しました。 オープンbug triaged
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
NVIDIA-NeMo/DataDesigner#1002 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
enforce \from future import annotations` via ruff FA102 rule`対応中かも @chethanuk が 42 日前に担当しました。 オープンtask
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
NVIDIA-NeMo/DataDesigner#760 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
NVIDIA-NeMo/DataDesigner#1079 ·
メンテナーはふだん 1 日以内に返信
-
Children forked after a run generate identical sampler data対応中かも @binaryaaron が今日担当しました。 オープンbug
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
NVIDIA-NeMo/DataDesigner#1076 ·
メンテナーはふだん 1 日以内に返信
-
task
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
NVIDIA-NeMo/DataDesigner#1056 ·
メンテナーはふだん 1 日以内に返信
NVIDIA-NeMo/DataDesigner の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
foxglove/mcap#1907 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
namespace operations
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
EclipseFdn/open-vsx.org#14623 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
developmentseed/titiler-cmr#261 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
andrewyng/openworker#774 ·
メンテナーはふだん 1 日以内に返信
-
aggfuncオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
worldbank/blackmarblepy#160 ·