feat(rewrite): add conditional combined workflow - #240
Conversation
Refs #237 Signed-off-by: Andre Manoel <amanoel@nvidia.com>
Signed-off-by: Andre Manoel <amanoel@nvidia.com>
Signed-off-by: Andre Manoel <amanoel@nvidia.com>
Signed-off-by: Andre Manoel <amanoel@nvidia.com>
Signed-off-by: Andre Manoel <amanoel@nvidia.com>
Signed-off-by: Andre Manoel <amanoel@nvidia.com>
Signed-off-by: Andre Manoel <amanoel@nvidia.com>
Greptile SummaryThe PR adds an opt-in combined rewrite workflow that statically unrolls conditional repair and evaluation rounds while retaining the legacy workflow as the default.
Confidence Score: 5/5The PR appears safe to merge because no blocking failure remains in the follow-up review scope. No blocking failure remains. Important Files Changed
|
Signed-off-by: Andre Manoel <amanoel@nvidia.com>
Additional RAT-Bench throughput resultsWe ran a paired 100-record-per-split RAT-Bench scorecard using GPT-OSS 120B and identical model, configuration, seed, GPU allocation, and input-token totals.
All recorded workload and orchestration jobs completed successfully. These results provide consistent throughput evidence across the three RAT-Bench difficulty splits; the controlled paired experiment in the PR description remains the basis for the behavioral-parity and utility conclusions. Detailed run artifacts are retained internally. |
Related Issue
Closes #237
Plan Document
plans/237/combined-rewrite-graph.mdSummary
Add an opt-in rewrite workflow that executes replacement-map generation, the initial rewrite, evaluation, and a bounded number of conditional repair iterations in one Data Designer graph.
The graph statically unrolls
max_repair_iterationsand usesSkipConfig.whento skip repair and downstream re-evaluation after each row passes. It supports zero or multiple repair rounds, preserves no-entity passthrough, row order, final metrics, repair counts, and review flags, and continues to execute throughNddAdapter.run_workflow().The legacy workflow remains the default in this PR. Data Designer 0.8 does not expose terminal failed-column and seed-row provenance through its public result API, so a dropped row in the combined graph can only be attributed to
rewrite-combined. Draft Data Designer #861 implements the required lightweight provenance API. Keeping this path opt-in avoids reducing default failure observability before that API is merged, released, and integrated.For entity-bearing rewrite runs, the combined graph reduces the full pipeline's base Data Designer workflow count from five to three. The two detection workflows and the separate non-critical judge path are unchanged.
Experiment evidence
We ran a controlled self-hosted comparison on a single GB300 using GPT-OSS 120B across 12 diverse synthetic PII records. Detection, replacement maps, domain classification, sensitivity decisions, meaning units, and QA plans were generated once and reused by both paths. Both paths received the same initial evaluated rewrite state, execution order was counterbalanced across two six-record groups, and both allowed up to three repair iterations.
Ten records were selected for repair and two were clean skip controls. Both paths made the same repair decision for all 12 records: ten stopped after one repair, two stopped at iteration zero, and none still required repair. The successful run had zero workload failures and zero measured leakage for every output.
Both paths made 80 LLM requests. Across the two groups, legacy used four DD workflows for repair and re-evaluation while combined used two. Combined took 10.56 seconds versus 10.80 seconds for legacy, a 2.2% reduction. This establishes latency parity, not a speedup claim.
Ten of twelve paired outputs were byte-identical and 11/12 final human-review decisions agreed. The paired mean utility delta was -0.0867, the median was zero, and the approximate 95% interval was [-0.2496, 0.0763]. The interval includes zero; separate real-model generations and judge calls remain nondeterministic even with fixed sampling settings.
The experiment also exposed structured-payload checkpoint problems in both paths. The PR now normalizes public QA payloads at combined finalization and at legacy evaluate-to-repair boundaries. Regression tests cover mixed list and NumPy representations across real repair iterations.
Retained GB300 DCGM telemetry showed flat HBM use within both successful controlled runs, with no detectable combined-path GPU-memory regression. Combined Data Designer artifacts were larger: +187% with no repairs and +60% with one repair, although the absolute totals remained below 230 KB for two six-row groups. Retained dataframe memory increased by 6% and 22%, respectively. The five-second telemetry cadence and group-level timings do not support a reliable tail-latency comparison.
An earlier 30-pair Slurm suite remains useful only as scale and stability evidence. Its latency comparison was confounded by different repair behavior and fixed ordering, so it is not used for the performance conclusion above.
Follow-up after Data Designer #861
This PR intentionally stops at an opt-in combined workflow. After Data Designer #861 is merged and available in a supported release, a small Anonymizer follow-up will:
NddAdapter;_anonymizer_record_idand failed columns to the existing rewrite stage names;Legacy removal can follow production rollout evidence and is not part of this PR.
The branch is synchronized with current Anonymizer
main. The combined-runner routing is integrated with main's privacy-goal validation and evaluation refactor.Type of Change
Contributor Checklist
fix: handle empty entity listskills/anonymizer/SKILL.mdupdated if neededThe bundled skill remains on the unchanged legacy default and does not need an update for this opt-in path.
Validation
.venv/bin/ruff check --fix ..venv/bin/ruff format .env -u VIRTUAL_ENV .venv/bin/ty check --error-on-warningTMPDIR=<short-temp-path> .venv/bin/pytest --basetemp=<short-temp-path>/pytest- 1,209 passedDocumentation and Artifacts
make docs-buildpasses locallymake convert-notebooksThe internal plan documents the rollout decision, benchmark interpretation, completed compatibility coverage, and deferred default integration. No user-facing documentation or tutorial changed.