feat: define public generation invocation contract - #854
Conversation
|
Fern preview: https://nvidia-preview-pr-854.docs.buildwithfern.com/nemo/datadesigner
|
Greptile SummaryDefines a stable public generation interface so optional execution packages can configure and invoke Data Designer without importing engine internals.
|
| Filename | Overview |
|---|---|
| packages/data-designer-config/src/data_designer/config/utils/io_helpers.py | Missing supported-extension paths are now classified case-insensitively, including malformed filenames that fail YAML parsing. |
| packages/data-designer-config/src/data_designer/config/config_builder.py | Builder loading now converts filesystem, decoding, and YAML parsing failures into public configuration errors. |
| packages/data-designer/src/data_designer/interface/results.py | Results expose public invocation metadata and consistently report missing dataset artifacts through ArtifactStorageError. |
| packages/data-designer/src/data_designer/interface/data_designer.py | Generation results now retain requested counts, shutdown state, and requested and effective resume modes. |
| packages/data-designer/src/data_designer/interface/composite_workflow.py | Reconstructed completed stages retain the persisted requested record count for partial-result classification. |
| plans/850/data-designer-contract.md | Documents the supported public invocation boundary, validation ownership, runtime configuration, outcomes, errors, and known limits. |
Sequence Diagram
sequenceDiagram
participant Client as Optional execution package
participant Config as DataDesignerConfigBuilder
participant DD as DataDesigner
participant Engine as Generation engine
participant Results as DatasetCreationResults
Client->>Config: from_config(serialized builder)
Config-->>Client: Validated public builder
Client->>DD: validate(builder)
Client->>DD: create(builder, count, name, resume)
DD->>Engine: Build and profile dataset
Engine-->>DD: Artifacts and invocation outcome
DD-->>Results: Construct public result metadata
Results-->>Client: Dataset path, counts, status, resume modes
Reviews (6): Last reviewed commit: "fix: classify malformed config paths" | Re-trigger Greptile
Signed-off-by: Andre Manoel <amanoel@nvidia.com>
|
Thanks for putting this together, @andreatnvidia! SummaryThis PR defines the optional-package invocation boundary, promotes the relevant public errors, and adds result metadata for record counts, partial completion, early shutdown, artifact resolution, and resume decisions. The implementation mostly matches that intent, but a valid inline-config case now breaks and a few documented public error/outcome guarantees are not yet enforced. FindingsCritical — Let's fix these before merge
Warnings — Worth addressing
What Looks Good
VerdictNeeds changes — fix the inline-YAML regression, complete the promised public error normalization for malformed/missing artifacts, and align the published run-outcome documentation with the new contract. This review was generated by an AI assistant. |
Signed-off-by: Andre Manoel <amanoel@nvidia.com>
|
Thanks for the detailed review, @nabinchha. I pushed The config loader now parses inline YAML before deciding that a string is a missing file path, and invalid UTF-8 is normalized to I added focused regression coverage for these cases. Ruff, the 839 config/interface tests, and the Fern docs checks pass locally. |
Signed-off-by: Andre Manoel <amanoel@nvidia.com>
Signed-off-by: Andre Manoel <amanoel@nvidia.com>
|
Thanks for the quick follow-up, @andreatnvidia! SummaryThe three new commits address the four findings from my earlier review and the subsequent Greptile path-classification comment, with focused tests and updated Fern guidance. Two edge cases still leave the public error boundary dependent on input shape or raw filesystem exceptions. FindingsWarnings — Worth addressing
What Looks Good
VerdictNeeds changes — clarify the remaining path-versus-inline parser ambiguity and finish normalizing inaccessible batch reads across the public result-counting boundary. This review was generated by an AI assistant. |
📋 Summary
Defines a stable public generation contract for optional execution packages so they can configure, validate, invoke, and classify Data Designer runs without importing
data_designer.engine. It also normalizes builder-loading failures and exposes public outcome metadata for complete, partial, resumed, and early-shutdown invocations.🔗 Related Issue
Closes #851
Related to #850
🔄 Changes
InvalidConfigError,InvalidFileFormatError, andInvalidFilePathErrorfromdata_designer.config, andArtifactStorageErrorfromdata_designer.interface.DatasetCreationResults.🔍 Attention Areas
DatasetCreationResults- public completion and resume semantics.🧪 Testing
make testpasses - not run; targeted package suites were used..venv/bin/pytest packages/data-designer-config/tests packages/data-designer/tests -p no:cacheprovider(1772 passed, 1 skipped).venv/bin/ruff check --fix ..venv/bin/ruff format .✅ Checklist