Skip to content

feat(rewrite): add conditional combined workflow - #240

Draft
andreatnvidia wants to merge 3 commits into
mainfrom
andreatnvidia/feat/combined-rewrite-graph
Draft

feat(rewrite): add conditional combined workflow#240
andreatnvidia wants to merge 3 commits into
mainfrom
andreatnvidia/feat/combined-rewrite-graph

Conversation

@andreatnvidia

@andreatnvidia andreatnvidia commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Related Issue

Closes #237

Plan Document

plans/237/combined-rewrite-graph.md

Summary

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_iterations and uses SkipConfig.when to 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 through NddAdapter.run_workflow().

The legacy workflow remains the default. Data Designer does not yet expose terminal failed-column and seed-row provenance through its result API, so a dropped row in the combined graph can only be attributed to rewrite-combined. Keeping this path opt-in avoids reducing default failure observability while that upstream capability is developed.

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.

Benchmark evidence

The authoritative paired suite combined-rewrite-api-paired-20260807-r3 completed 30 pairs and 60 executions without failures. Median Data Designer workflow count decreased from five to three. Paired wall time was 1.81% slower and rewrite time was 1.58% slower, while utility and leakage were comparable.

The latency comparison was confounded by more combined-path repairs, 30,379 additional output tokens, and fixed variant ordering. It therefore establishes neither a speedup nor an intrinsic slowdown. Performance remains a regression guardrail rather than the merge rationale.

Remaining follow-up gates

  • Add structured terminal failure provenance to Data Designer before making the combined graph the default.
  • Compare peak memory, artifact size, and tail latency on mostly-skipped and mostly-repaired remote workloads.
  • If latency is used as rollout evidence, rerun the paired benchmark with balanced ordering and equivalent repair decisions.
  • After failure attribution is available, remove the opt-in flag and legacy orchestration in a follow-up.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Refactoring
  • CI, release, or contributor workflow update

Contributor Checklist

  • PR title follows Conventional Commits, for example fix: handle empty entity list
  • Related issue is linked, or a maintainer-owned no-issue reason is documented above
  • For non-trivial changes, a plan document is linked above, or the no-plan reason is documented above
  • Public API impact checked; skills/anonymizer/SKILL.md updated if needed
  • No real PII added to tests, docs, notebooks, fixtures, or artifacts
  • No API keys, service tokens, private keys, credentials, or real endpoint secrets added

The bundled skill remains on the unchanged legacy default and does not need an update for this opt-in path.

Validation

  • Commands run:
    • .venv/bin/ruff check --fix .
    • .venv/bin/ruff format .
    • TMPDIR=<short-temp-path> .venv/bin/pytest --basetemp=<short-temp-path>/pytest - 1,130 passed
    • focused real Data Designer conditional scheduling with zero, one, two, and exhausted repairs
    • paired SLURM suite described above - 60 executions, 0 failures
  • Skipped checks or known failures:
    • provider e2e tests were not rerun;
    • remote scale validation and a corrected paired benchmark remain follow-up gates.

Documentation and Artifacts

  • Docs updated, or not needed
  • If docs changed: make docs-build passes locally
  • If tutorial sources changed: notebooks regenerated with make convert-notebooks
  • If e2e, benchmark, or model-provider behavior changed: relevant validation is listed above

The internal plan documents the rollout decision, benchmark interpretation, completed compatibility coverage, and remaining upstream and scale gates. No user-facing documentation or tutorial changed.

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Evaluate DataDesigner-native workflow chaining for Anonymizer pipelines

1 participant