Closed ysisoftwareiq closed 2 years ago
Hi @ysisoftwareiq, can you test the latest sample for the TextClassifier and let me know if you still hit the exception?
predict of your saved model gets error
2021-10-11 18:03:50.828 +03:00 [Error] Catalyst.Models.FastText: Failed to predict for document with length 1201 at Catalyst.Models.FastText.Predict(IDocument doc) System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. at Catalyst.Models.FastText.Predict(IDocument doc)
I attached your log.
It is your project & model TextClassification, - tested as you asked.
it has training -> save model -> reading -> testing
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
The code to recreate the problem:
Storage.Current = new OnlineRepositoryStorage(new DiskStorage("catalyst-models")); var nlp = Pipeline.For(Language.English); var doc = new Document("HENLEY GROUP SAID IT ENDED TALKS ON BUYING SOUTHERN PACIFIC FROM SANTA FE SOUTHERN", Language.English); nlp.ProcessSingle(doc);
var fastTextPre = FastText.FromStoreAsync(Language.English, 0, "Reuters-Classifier").Result; Dictionary<string, float> predict = fastTextPre.Predict(doc);
Exception - Specified argument was out of range...
Exception in FastText.cs in function private void ComputeHidden(ThreadState state, Span input)
in statement var v = Wi.GetRow(ix);