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

Cerrado
#1,048 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@andreatnvidia ya está trabajando en esto.

Desde el 28/10/2026.

  • #1108 de @andreatnvidia — abierto

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
45/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
python
Área
api

Línea de trabajo

Start with DataDesigner.get_models and _create_resource_provider in interface/data_designer.py, then read HttpModelClient's concurrency modes. Trace how configs, clients, artifact storage, and the person reader are used to decide what facade construction needs. Done means the public API can build facades from caller configs with async clients and without requiring those unrelated resources.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

triaged

Priority level: Medium

Is your feature request related to a problem? Please describe.

DataDesigner.get_models(model_aliases) is the public way to get ModelFacades outside a pipeline, but it only
resolves Data Designer's default models.

  • It builds an empty DataDesignerConfigBuilder() (interface/data_designer.py, get_models), so a caller's own
    ModelConfigs can't be resolved.
  • It creates sync clients (ClientConcurrencyMode.SYNC), while code that awaits facade.acompletion needs
    async ones.

A library that configures its own models and drives the calls itself has to call the private
_create_resource_provider(name, builder, client_concurrency_mode=ASYNC) to get them. NeMo UserSim does this
for its models files, so an extension can run episodes on the same models a UserSim run uses. That private
path also brings two side effects a caller only wanting facades has to work around:

  • it creates the artifact root, ./artifacts by default, in the working directory;
  • it builds a person reader that raises when the managed-assets path doesn't exist, as on a fresh CI machine.
Describe the solution you'd like

An optional model_configs argument, with async clients:

designer.get_models(["judge", "patient"], model_configs=[...], client_concurrency_mode=ClientConcurrencyMode.ASYNC)
  • With model_configs, the registry is built from those configs (the aliases must be among them). Without
    it, behaviour is as today.
  • Async clients on request, or by default when model_configs is given.
  • No artifact root and no person reader needed just to build facades. Facades never use either.
Describe alternatives you've considered
  • The private _create_resource_provider call, with a temporary artifact root and managed-assets path. This
    is what UserSim ships now, pinned by a test so a Data Designer change that breaks it fails loudly. It works,
    but it's private API.
  • Building ModelRegistry and its facade factory directly: more private surface, not less.
Agent investigation

Read in 0.9.5:

  • DataDesigner.get_models and _create_resource_provider (artifact storage mkdir_if_needed, and
    create_person_reader raising on a missing path);
  • HttpModelClient's concurrency modes.
Additional context

With DD 1.0 in rc, this seems a good moment. UserSim keeps its own public function
(usersim.engine.external.model_facades) and would swap its internals to this API once it lands.

Checklist
  • I've reviewed existing issues and the documentation
  • This is a design proposal, not a "please build this" request
Lenguaje dominante
Python
Estrellas
2.4k
Forks
241
Merge medio
1 d 2 h
PR fusionados (30 d)
96

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de NVIDIA-NeMo/DataDesigner

Todos los issues de NVIDIA-NeMo/DataDesigner

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.