Skip to content

feat: support custom configs and async get_models - #1108

Open
andreatnvidia wants to merge 2 commits into
mainfrom
andreatnvidia/feat/get-models-configs
Open

andreatnvidia wants to merge 2 commits into
mainfrom
andreatnvidia/feat/get-models-configs

Conversation

@andreatnvidia

@andreatnvidia andreatnvidia commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Allow callers such as UserSim to obtain model facades from their own configs without creating artifact directories or requiring person assets. Existing calls keep default configs and synchronous clients; async mode is explicit.

Related Issue

Closes #1048

Changes

  • Add keyword-only model_configs (a config list, YAML string, or file path) and client_concurrency_mode to DataDesigner.get_models.
  • Use the existing model-registry factory with the instance's providers, secret resolver, shared admission controller, runtime config, and request event sink.
  • Validate requested aliases before creating clients, reject duplicate config aliases, and document close() / aclose() cleanup.
  • Protect standalone alias limits on the shared controller: reject conflicting provider/model/alias limits before creating clients or changing admission state. Pipeline-only concurrency reconfiguration keeps its existing behavior.
  • Document that protected limits persist after facade cleanup and require set_run_config() or a new DataDesigner instance to change.
  • Replace the resource-provider mock test with 19 public API cases covering sync and async requests, config loading, validation, retries, usage, shared admission limits, and absence of artifact/person-reader side effects.

Testing

  • .venv/bin/pytest -q packages/data-designer/tests: 1,254 passed, 11 skipped.
  • .venv/bin/pytest -q packages/data-designer-engine/tests: 2,873 passed, including 11 new registration cases.
  • Ruff lint and formatting checks on changed files.
  • Self-review and independent Claude review of API compatibility, resource ownership, and factory wiring.
  • Live provider endpoints were not exercised; model calls use fake HTTP responses.

Checklist

  • Follows commit message conventions.
  • Commits are signed off (DCO).
  • Linked issue is open and labeled triaged.
  • Architecture docs: not applicable; existing factories and client lifecycle are unchanged.

Closes #1048

Signed-off-by: Andre Manoel <amanoel@nvidia.com>
@andreatnvidia
andreatnvidia requested a review from a team as a code owner October 28, 2026 18:06
@greptile-apps

greptile-apps Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no new blocking issue was found.

Summary

get_models() now accepts custom model configs and an explicit async mode without creating dataset artifacts or loading person assets.

  • Callers can load custom model configs into sync or async facades.
  • Standalone model aliases keep the same request limit across facade lifetimes.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
    A["get_models()"] --> B["Load configs and check aliases"]
    B --> C["create_model_registry()"]
    C --> D["Create sync or async facades"]
    D --> E["Register frozen alias limits"]
    E --> F["Shared request controller"]
    G["create() / preview()"] --> F
    F --> H["Provider requests"]
Loading

Reviews (2) · Last reviewed commit: "protect standalone model admission limit..." · Reviewed by Greptile

@github-actions

Copy link
Copy Markdown
Contributor

Fern preview: https://nvidia-preview-pr-1108.docs.buildwithfern.com/nemo/datadesigner

Fern previews include the docs-website version archive with PR changes synced into latest. Notebook tutorials are rendered without execution outputs in previews.

@svcnvidia-nemo-ci svcnvidia-nemo-ci left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed all three changed files and traced configuration loading, facade/client lifecycle, and shared runtime wiring against the base. One correctness issue remains: independent custom-config calls can overwrite a live facade’s concurrency limit.

Static review only; tests were not executed. One delegated transport/lifecycle report was unavailable, so those paths were independently inspected.

Note: formal approval is not available for this request, so this review is posted as a comment only.

Review generated by codex. This was a full review. Request a full review with /review reset=true.

Signed-off-by: Andre Manoel <amanoel@nvidia.com>

This branch has not been deployed

No deployments
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.

get_models: build facades for the caller's model configs, with async clients

2 participants