Add high-level task inference pipelines
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 30/100
- Type d'issue
- Fonctionnalité
- Clarté
- Plutôt claire
- Activité
- Active
- Stack technique
- csharp, machine-learning
- Domaine
- ai-infra-agents, backend-api-design
Piste de recherche
Review the existing model backend and tokenizer APIs in the ML.NET codebase, such as those used for text classification. Examine the Hugging Face pipeline design for reference. The work involves designing abstract contracts for preprocessing, model execution, and post-processing, then implementing a concrete pipeline for a narrow task like text classification. 'Done' means a reusable pipeline abstraction that can accept batches, apply tokenization, run a model, and post-process results, with configuration points for customization.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Is your feature request related to a problem? Please describe.
Hugging Face task pipelines provide a high-level path from application input to model result: preprocessing and tokenization, batched model invocation, and task-specific post-processing. In .NET, users migrating custom models generally have to compose these stages themselves and understand the different tokenizer, tensor, and inference-runtime APIs involved.
This makes otherwise common inference scenarios substantially harder to implement correctly and efficiently, especially for teams migrating from Python. #7384 can document how to assemble a pipeline, but it does not track providing a reusable product abstraction.
Describe the solution you'd like
Provide reusable, backend-aware inference pipeline abstractions for common tasks, beginning with a narrowly scoped task such as text classification. A pipeline should be able to:
- Accept single inputs and batches.
- Apply the configured tokenizer and produce the model's required inputs, including masks and token-type IDs where applicable.
- Invoke a supported model backend without unnecessary conversions or copies.
- Apply task-specific post-processing such as softmax, score selection, and label mapping.
- Expose configuration and lower-level results for callers that need to customize individual stages.
- Permit alternative tokenizer and model-runner implementations rather than coupling the abstraction to one model format.
The initial design could establish composable preprocessing, model-execution, and post-processing contracts before adding more task-specific pipelines.
Describe alternatives you've considered
Applications can implement their own pipeline for each model and task. Samples and migration documentation reduce the discovery cost, but they do not provide shared behavior, extension points, validation, or a consistent performance-oriented implementation.
Additional context
This request was identified while splitting the feedback in #7383, which originated in microsoft/semantic-kernel#9793. The original example was equivalent functionality to Hugging Face's TextClassificationPipeline, not necessarily API compatibility with that Python type.
[!NOTE]
This issue was drafted with AI assistance.
- Langage dominant
- C#
- Étoiles
- 9.4k
- Forks
- 2k
- Merge moyen
- 2 j 18 h
- PR mergées (30 j)
- 64
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de dotnet/machinelearning
-
area-Native untriaged
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
dotnet/machinelearning#7837 ·
Les mainteneurs répondent en général sous 1 jour
-
area-TensorFlow untriaged
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
dotnet/machinelearning#7836 ·
Les mainteneurs répondent en général sous 1 jour
-
ToArrowRecordBatches accumulates arrays from previous batches, producing invalid record batchesOuvertearea-DataFrame bug untriaged
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
dotnet/machinelearning#7799 ·
Les mainteneurs répondent en général sous 1 jour
-
LlamaTokenizer encodes some runs of repeated characters differently from SentencePiecePeut-être pris @Laurianti l’a pris il y a 42 jours. Ouvertearea-Tokenizers untriaged
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
dotnet/machinelearning#7751 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
BertTokenizer merges words separated only by `\n`, `\t` or `\r`Peut-être pris @Laurianti l’a pris il y a 23 jours. Ouvertearea-Tokenizers green
Difficulté 2/5 1-3 heures Accessibilité débutants 85/100
dotnet/machinelearning#7724 · 3 commentaires ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de dotnet/machinelearning
Issues similaires
-
bug emitter:client:csharp
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
microsoft/typespec#12572 · 1 commentaire · 1 réaction ·
Les mainteneurs répondent en général sous 1 jour
-
needs-area-label
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 2 jours
-
AWS Lambda: KeyNotFoundException drops HTTP-triggered transactions when allowAllHeaders is disabledOuvertebug
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
newrelic/newrelic-dotnet-agent#3949 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
area-networking
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
dotnet/aspnetcore#70545 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 87/100
Les mainteneurs répondent en général sous 1 jour