dotnet / dotnet/machinelearning

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

Open
#7,060 0 comments 0 reactions 0 assignees View on GitHub
area-Core blocking-clean-ci Known Build Error untriaged
Dominant language
C#
Stars
9.4k
Forks
2k
Avg merge
2d 20h
Merged PRs (30d)
11

Description

## 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](https://github.com/dotnet/arcade/blob/main/Documentation/Projects/Build%20Analysis/KnownIssues.md#how-to-fill-out-a-known-issue-error-section).

```json
{
"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|

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.