dotnet / dotnet/machinelearning

Error while using Model.Save()

Aperta
#6,281 6 commenti 0 reazioni 0 assegnatari Vedi su GitHub
area-Core bug needs-further-triage
Lingua principale
C#
Stelle
9.4k
Fork
2k
Merge medio
2g 20h
PR unite (30g)
11

Descrizione

**System Information (please complete the following information):**
- Checked on multiple systems (win 10, win 2019,2021 server)
- ML.NET Version: ML.NET 1.7.0

- .NET Core 2.2.3

**Describe the bug**
When saving trained model of very large size, xx GB the exception is thrown with the inner exception "The length cannot be greater than the capacity. ParameterName valueCount at System.Text.StringBuilder.Append() at Microsoft.Ml.Data.ReadOnlyMemoryUtils.AppendSpan ...etc
What I think is that the Save() uses StringBuilder.Append(char*,Int32) method and the int32 is a problem.

**To Reproduce**
1.Train extra large model
2.Try to save it with Model.Save()

![error_Cut](https://user-images.githubusercontent.com/110897666/183905634-e9f78564-e360-4c76-8aa0-d9edd5f96d7b.png)

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia riproducendo il malfunzionamento con un modello addestrato molto grande e Model.Save(), quindi ispeziona il percorso segnalato tramite ReadOnlyMemoryUtils.AppendSpan e StringBuilder.Append(char*, Int32). Il lavoro è completato quando il salvataggio di un modello extra-large non genera più l’eccezione di capacità segnalata.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
csharp
Ambito
machine-learning
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.