Skip to content

[POC] Support Python workflow args in CLI#612

Draft
oliverholworthy wants to merge 1 commit intoNVIDIA-NeMo:mainfrom
oliverholworthy:oholworthy/data-designer-script-args
Draft

[POC] Support Python workflow args in CLI#612
oliverholworthy wants to merge 1 commit intoNVIDIA-NeMo:mainfrom
oliverholworthy:oholworthy/data-designer-script-args

Conversation

@oliverholworthy
Copy link
Copy Markdown

@oliverholworthy oliverholworthy commented May 7, 2026

Summary

POC for #507 that makes local Python config workflows executable with custom CLI arguments while keeping the existing preview, create, and validate commands as the execution surface.

This lets a workflow file expose:

def load_config_builder(params: dd.DataDesignerScriptParams) -> dd.DataDesignerConfigBuilder:
    ...

and run with:

data-designer preview workflow.py -- --custom-arg value
data-designer create workflow.py -- --custom-arg value
data-designer validate workflow.py -- --custom-arg value

Design

  • Adds DataDesignerScriptParams as the small runtime object passed to Python config modules.
  • Preserves the existing no-argument load_config_builder() contract for current workflow files.
  • Forwards arguments after -- only to local Python config modules.
  • Rejects forwarded workflow arguments for static YAML, JSON, and URL configs because those config sources do not execute argument-parsing code.
  • Treats argparse --help from a workflow as a successful CLI exit instead of a config load failure.

Why This PR Is Separate

This is the mergeable base layer. It is independently useful for executable workflow files and gives recipe discovery a clean primitive to build on later.

Signed-off-by: Oliver Holworthy <1216955+oliverholworthy@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 7, 2026

Linked Issue Check

This PR does not reference an issue. External contributions must link to
a triaged issue before the PR can be merged.

Add one of the following to your PR description:

  • Fixes #<issue-number>
  • Closes #<issue-number>
  • Resolves #<issue-number>

If no issue exists yet, open one
and a maintainer will triage it.

See CONTRIBUTING.md
for details.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 7, 2026

Thank you for your submission! We ask that you sign our Developer Certificate of Origin before we can accept your contribution. You can sign the DCO by adding a comment below using this text:


I have read the DCO document and I hereby sign the DCO.


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the DCO Assistant Lite bot.

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.

1 participant