dotnet / machinelearning

ML.NET is an open source and cross-platform machine learning framework for .NET.
https://dot.net/ml
MIT License
8.91k stars 1.86k forks source link

Microsoft.ML.Tests.TrainerEstimators.TrainerEstimators.TestEstimatorMulticlassNaiveBayesTrainer failed with assert #7060

Open ericstj opened 3 months ago

ericstj commented 3 months ago

Build Information

Build: https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=599035 Build error leg or test failing: Microsoft.ML.Tests.TrainerEstimators.TrainerEstimators.TestEstimatorMulticlassNaiveBayesTrainer Pull request: https://github.com/dotnet/machinelearning/pull/7058

Error Message

Fill the error message using step by step known issues guidance.

{
  "ErrorMessage": ["Microsoft.ML.Tests.TrainerEstimators.TrainerEstimators.TestEstimatorMulticlassNaiveBayesTrainer", "Assert failed: batch.Total:128 while _total + 1:0."],
  "ErrorPattern": "",
  "BuildRetry": false,
  "ExcludeConsoleLog": true
}

Failure detail:

Starting test: Microsoft.ML.Tests.TrainerEstimators.TrainerEstimators.FixedPlattCalibratorEstimator
    Microsoft.ML.Tests.TrainerEstimators.TrainerEstimators.TestEstimatorMulticlassNaiveBayesTrainer [FAIL]
      Assert failed: batch.Total:128 while _total + 1:0.
      Stack Trace:
        D:\a\_work\1\s\test\Microsoft.ML.TestFramework\GlobalBase.cs(80,0): at Microsoft.ML.Internal.Internallearn.Test.GlobalBase.AssertHandler(String msg, IExceptionContext ectx)
        D:\a\_work\1\s\src\Microsoft.ML.Core\Utilities\Contracts.cs(781,0): at Microsoft.ML.Runtime.Contracts.DbgFailCore(String msg, IExceptionContext ctx)
        D:\a\_work\1\s\src\Microsoft.ML.Core\Utilities\Contracts.cs(794,0): at Microsoft.ML.Runtime.Contracts.DbgFail(String msg)
        D:\a\_work\1\s\src\Microsoft.ML.Core\Utilities\Contracts.cs(852,0): at Microsoft.ML.Runtime.Contracts.Assert(Boolean f, String msg)
        D:\a\_work\1\s\src\Microsoft.ML.Data\DataLoadSave\Text\TextLoaderCursor.cs(829,0): at Microsoft.ML.Data.TextLoader.Cursor.ParseParallel(ParallelState state)+MoveNext()
        D:\a\_work\1\s\src\Microsoft.ML.Data\DataLoadSave\Text\TextLoaderCursor.cs(291,0): at Microsoft.ML.Data.TextLoader.Cursor.MoveNextCore()
        D:\a\_work\1\s\src\Microsoft.ML.Core\Data\RootCursorBase.cs(65,0): at Microsoft.ML.Data.RootCursorBase.MoveNext()
        D:\a\_work\1\s\src\Microsoft.ML.Data\Transforms\ValueToKeyMappingTransformer.cs(617,0): at Microsoft.ML.Transforms.ValueToKeyMappingTransformer.Train(IHostEnvironment env, IChannel ch, ColInfo[] infos, IDataView keyData, ColumnOptionsBase[] columns, IDataView trainingData, Boolean autoConvert)
        D:\a\_work\1\s\src\Microsoft.ML.Data\Transforms\ValueToKeyMappingTransformer.cs(257,0): at Microsoft.ML.Transforms.ValueToKeyMappingTransformer..ctor(IHostEnvironment env, IDataView input, ColumnOptionsBase[] columns, IDataView keyData, Boolean autoConvert)
        D:\a\_work\1\s\src\Microsoft.ML.Data\Transforms\ValueToKeyMappingEstimator.cs(172,0): at Microsoft.ML.Transforms.ValueToKeyMappingEstimator.Fit(IDataView input)
        D:\a\_work\1\s\src\Microsoft.ML.Data\DataLoadSave\EstimatorChain.cs(68,0): at Microsoft.ML.Data.EstimatorChain`1.Fit(IDataView input)
        D:\a\_work\1\s\test\Microsoft.ML.TestFramework\DataPipe\TestDataPipeBase.cs(80,0): at Microsoft.ML.RunTests.TestDataPipeBase.TestEstimatorCore(IEstimator`1 estimator, IDataView validFitInput, IDataView validTransformInput, IDataView invalidInput, IDataView validForFitNotValidForTransformInput, Boolean shouldDispose)
        D:\a\_work\1\s\test\Microsoft.ML.Tests\TrainerEstimators\TrainerEstimators.cs(156,0): at Microsoft.ML.Tests.TrainerEstimators.TrainerEstimators.TestEstimatorMulticlassNaiveBayesTrainer()
      Output:
        Test TestEstimatorMulticlassNaiveBayesTrainer: aborted: passed

This is triggering this assert: https://github.com/dotnet/machinelearning/blob/f6ddd9b7dbb4bf500ded577195ddd1320c0e8761/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoaderCursor.cs#L829

Could this be another concurrency issue?

Known issue validation

Build: :mag_right: https://dev.azure.com/dnceng-public/public/_build/results?buildId=599035 Error message validated: [Microsoft.ML.Tests.TrainerEstimators.TrainerEstimators.TestEstimatorMulticlassNaiveBayesTrainer Assert failed: batch.Total:128 while _total + 1:0.] Result validation: :x: Known issue did not match with the provided build. Validation performed at: 3/12/2024 3:57:12 PM UTC

Report

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
0 0 0