Add reusable inference orchestration and dynamic batching
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 30/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- csharp
Línea de trabajo
Look at existing model hosting and inference code in the repository, particularly around MLContext and prediction engines. Review the linked issues #7383 and microsoft/semantic-kernel#9793 for context. Start by exploring how batches are currently formed and executed, then design a scheduler interface that can be integrated with the existing prediction pipeline.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Is your feature request related to a problem? Please describe.
Efficiently hosting custom AI models requires more than invoking a model for one request at a time. Applications may need to collect requests into bounded time windows, create batches, route work across model instances or devices, limit concurrency, and account for available accelerator memory. Teams that cannot use a separate inference server currently have to build and operate this orchestration themselves.
This is difficult to implement reliably and can prevent applications from fully utilizing GPUs while meeting latency targets.
Describe the solution you'd like
Investigate and provide reusable inference-orchestration building blocks for in-process .NET model hosting. The scope should consider:
- Dynamic batching with configurable maximum batch size and wait time.
- Backpressure, cancellation, queue limits, and per-request result correlation.
- Concurrency control and routing across model sessions, execution providers, or devices.
- Model placement and admission decisions informed by available memory or configured resource budgets.
- Metrics for queue time, batch composition, execution time, utilization, and rejected work.
- Extensible model-runner contracts so orchestration is not tied to a single inference backend.
A first increment could focus on a bounded dynamic-batching scheduler and leave memory-aware multi-model placement as a later extension.
Describe alternatives you've considered
Applications can build this with channels, queues, semaphores, and backend-specific session pools, or deploy a separate inference server such as NVIDIA Triton. Those approaches may be unsuitable when inference must remain in-process, model calls are interleaved with application logic, or deployment constraints prohibit an additional service.
Additional context
This request was identified in the “Bonus” section of the discussion that became #7383, originating in microsoft/semantic-kernel#9793. It is distinct from tokenizer batching: this issue concerns scheduling and executing inference requests after application inputs are ready for model processing.
[!NOTE]
This issue was drafted with AI assistance.
- Lenguaje dominante
- C#
- Estrellas
- 9.4k
- Forks
- 2k
- Merge medio
- 2 d 18 h
- PR fusionados (30 d)
- 64
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de dotnet/machinelearning
-
area-Native untriaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
dotnet/machinelearning#7837 ·
Los mantenedores suelen responder en 1 día
-
area-TensorFlow untriaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
dotnet/machinelearning#7836 ·
Los mantenedores suelen responder en 1 día
-
ToArrowRecordBatches accumulates arrays from previous batches, producing invalid record batchesAbiertoarea-DataFrame bug untriaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
dotnet/machinelearning#7799 ·
Los mantenedores suelen responder en 1 día
-
LlamaTokenizer encodes some runs of repeated characters differently from SentencePiecePosiblemente ocupada @Laurianti la tomó hace 42 días. Abiertoarea-Tokenizers untriaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
dotnet/machinelearning#7751 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
BertTokenizer merges words separated only by `\n`, `\t` or `\r`Posiblemente ocupada @Laurianti la tomó hace 23 días. Abiertoarea-Tokenizers green
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
dotnet/machinelearning#7724 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de dotnet/machinelearning
Issues similares
-
bug emitter:client:csharp
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
microsoft/typespec#12572 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
needs-area-label
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 2 días
-
AWS Lambda: KeyNotFoundException drops HTTP-triggered transactions when allowAllHeaders is disabledAbiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
newrelic/newrelic-dotnet-agent#3949 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
area-networking
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
dotnet/aspnetcore#70545 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 87/100
Los mantenedores suelen responder en 1 día