feat: generate an exact number of rows matching a declared criterion
维护者通常 1 天内回复
还没有人认领这个 Issue。
- #817 来自 @nabinchha —— 已关闭,未合并
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 描述清楚
- 活跃度
- 冷清
- 技术栈
- python
调研方向
从 plans/790/engine-native-record-selection.md 开始,其中包含事实依据的设计、架构图、实现阶段、测试计划和完成定义。跟踪一次正常的 DataDesigner.create() 运行如何处理候选批次、已接受的行、检查点和恢复行为。完成意味着满足列出的 V1 验收标准,包括精确目标、有界耗尽、持久化零接受批次、正确恢复,以及仅处理已接受的行。
由索引模型根据 Issue 内容生成。
描述
Problem
DataDesigner users can generate candidate rows and filter them afterward, but they cannot declaratively request an exact number of rows that satisfy a quality or validation criterion. Doing this today requires user-managed loops across multiple create() calls, including candidate budgeting, artifact extension, trimming, and resume behavior.
Examples include generating 5,000 answers above a judge threshold, 10,000 policy-compliant conversations, or a fixed number of successful tool-use traces.
Proposed feature
Add engine-native record selection to a normal DataDesigner.create() run. A user declares a boolean predicate column and a hard candidate limit. When selection is configured, num_records means the desired number of accepted output rows:
builder.with_record_selection(
dd.RecordSelectionConfig(
predicate_column="meets_criteria",
max_candidate_records=20_000,
on_exhausted="raise",
)
)
results = data_designer.create(builder, num_records=5_000)
The engine generates immutable candidate batches, evaluates the predicate, checkpoints accepted rows, and continues until the target is met or the candidate budget is exhausted.
V1 scope
- Treat
num_recordsas the accepted-row target when record selection is enabled. - Require an explicit boolean predicate column and hard
max_candidate_recordsbound. - Support
raiseandreturn_partialexhaustion behavior. - Preserve deterministic candidate ordering and trim final overshoot exactly.
- Track candidate attempts separately from accepted output.
- Persist candidate-batch completion markers so zero-acceptance batches and resume are correct.
- Preserve normal DAG generation, processors, profiling, plugins, and model-usage accounting.
- Run one candidate batch at a time while retaining the scheduler's normal within-row-group concurrency.
Out of scope
- Concurrent candidate batches.
- Early cancellation of downstream row work after predicate rejection.
- Exporting every rejected candidate.
- Unbounded generation based on an expected acceptance rate.
- Row-count-changing after-generation processors.
These are optional performance or expansion ideas, not requirements for a complete V1.
Acceptance criteria
- A single
create()call can reliably return exactlyXmatching rows. - Generation is bounded and exhaustion behavior is explicit.
- Candidate progress is independent of accepted parquet row counts.
- Runs resume after any committed candidate batch without repeating candidate offsets or accepted output.
- Zero-acceptance candidate batches remain durably complete.
- Output processing and profiling operate on accepted rows only, while usage metadata includes rejected work.
- Default-buffer behavior works when the target is reached only after three or more candidate batches.
- Documentation explains cost, bounds, partial exhaustion, and resume semantics.
Investigation and context
PR #773 explored workflow-level repetition. Real-run testing showed that extending a static row-group plan can stall when small increments remain inside the same buffer boundary, and that an interrupted append flow can request a target smaller than persisted output. Record selection therefore needs engine-owned candidate progress rather than repeated public create() orchestration.
Detailed plan
The source-of-truth design, architecture diagrams, implementation phases, test plan, and definition of done are in plans/790/engine-native-record-selection.md.
- 主要语言
- Python
- 星标
- 2.4k
- 派生
- 243
- 平均合并
- 1 天 3 小时
- 30 天内合并 PR
- 88
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
NVIDIA-NeMo/DataDesigner 的其他 Issue
-
Structured-output prompt schemas escape non-ASCII text as \uXXXX可能已有人在做 @spped2000 于 3 天前认领。 未关闭triaged
难度 2/5 1-3 小时 新手友好度 76/100
NVIDIA-NeMo/DataDesigner#1130 · 2 条评论 ·
维护者通常 1 天内回复
-
needs-discussion triaged
难度 2/5 1-3 小时 新手友好度 85/100
NVIDIA-NeMo/DataDesigner#1129 · 3 条评论 ·
维护者通常 1 天内回复
-
Allow huggingface-hub 2.x (widen cap from <2 to <3)可能已有人在做 @davanstrien 于 8 天前认领。 未关闭enhancement triaged
难度 2/5 1-3 小时 新手友好度 72/100
NVIDIA-NeMo/DataDesigner#1110 · 1 条评论 ·
维护者通常 1 天内回复
-
Local seed path containing a single quote breaks the DuckDB query可能重新可做 关联的 PR 已关闭且未合并。 未关闭bug triaged
难度 2/5 1-3 小时 新手友好度 67/100
NVIDIA-NeMo/DataDesigner#1102 · 3 条评论 ·
维护者通常 1 天内回复
-
enforce \from future import annotations` via ruff FA102 rule`可能已有人在做 @chethanuk 于 57 天前认领。 未关闭task
难度 2/5 1-3 小时 新手友好度 82/100
NVIDIA-NeMo/DataDesigner#760 ·
维护者通常 1 天内回复
查看 NVIDIA-NeMo/DataDesigner 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 74/100
-
enhancement
难度 2/5 1-3 小时 新手友好度 66/100
RunestoneInteractive/rs#1661 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 64/100
streamlink/streamlink#7192 · 4 条评论 ·
维护者通常 1 天内回复
-
难度 1/5 1-3 小时 新手友好度 75/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
aws-samples/sample-per-model-bedrock#795 ·
维护者通常 1 天内回复