Skip to content

Test failure, Assert in Microsoft.ML.Data.TextLoader.Cursor.MoveNextCore() #6377

Closed
@ericstj

Description

@ericstj

This appears to be a transient issue hit by CI.

Contracts.Assert(batch.Total == _total + 1, $"batch.Total:{batch.Total} while _total + 1:{_total + 1}.");

https://helixre107v0xdeko0k025g8.blob.core.windows.net/dotnet-machinelearning-refs-pull-6367-merge-a0de502d50da480fae/Microsoft.ML.TestFramework/1/console.146feb85.log?helixlogtype=result

    Microsoft.ML.RunTests.TestDataPipe.SavePipeCountTargetEncoding [FAIL]
�[31;1m�[m�[37m      Assert failed: batch.Total:64 while _total + 1:0.
�[m�[37m      Expected: True
�[m�[37m      Actual:   False
�[m�[30;1m      Stack Trace:
�[m�[37m        /__w/1/s/test/Microsoft.ML.TestFramework/GlobalBase.cs(80,0): at Microsoft.ML.Internal.Internallearn.Test.GlobalBase.AssertHandler(String msg, IExceptionContext ectx)
�[m�[37m        /__w/1/s/src/Microsoft.ML.Core/Utilities/Contracts.cs(781,0): at Microsoft.ML.Runtime.Contracts.DbgFailCore(String msg, IExceptionContext ctx)
�[m�[37m        /__w/1/s/src/Microsoft.ML.Core/Utilities/Contracts.cs(794,0): at Microsoft.ML.Runtime.Contracts.DbgFail(String msg)
�[m�[37m        /__w/1/s/src/Microsoft.ML.Core/Utilities/Contracts.cs(852,0): at Microsoft.ML.Runtime.Contracts.Assert(Boolean f, String msg)
�[m�[37m        /__w/1/s/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoaderCursor.cs(829,0): at Microsoft.ML.Data.TextLoader.Cursor.ParseParallel(ParallelState state)+MoveNext()
�[m�[37m        /__w/1/s/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoaderCursor.cs(291,0): at Microsoft.ML.Data.TextLoader.Cursor.MoveNextCore()
�[m�[37m        /__w/1/s/src/Microsoft.ML.Core/Data/RootCursorBase.cs(65,0): at Microsoft.ML.Data.RootCursorBase.MoveNext()
�[m�[37m        /__w/1/s/test/Microsoft.ML.TestFramework/DataPipe/TestDataPipeBase.cs(735,0): at Microsoft.ML.RunTests.TestDataViewBase.CheckSameValues(DataViewRowCursor curs1, DataViewRowCursor curs2, Boolean exactTypes, Boolean exactDoubles, Boolean checkId, Boolean checkIdCollisions)
�[m�[37m        /__w/1/s/test/Microsoft.ML.TestFramework/DataPipe/TestDataPipeBase.cs(685,0): at Microsoft.ML.RunTests.TestDataViewBase.CheckSameValues(IDataView view1, IDataView view2, Boolean exactTypes, Boolean exactDoubles, Boolean checkId)
�[m�[37m        /__w/1/s/test/Microsoft.ML.TestFramework/DataPipe/TestDataPipeBase.cs(429,0): at Microsoft.ML.RunTests.TestDataPipeBase.SaveLoadText(IDataView view, IHostEnvironment env, Boolean hidden, String suffix, String suffixBase, Boolean checkBaseline, Boolean forceDense, Boolean roundTrip, Boolean outputSchema, Boolean outputHeader, Int32 digitsOfPrecision, NumberParseOption parseOption)
�[m�[37m        /__w/1/s/test/Microsoft.ML.TestFramework/DataPipe/TestDataPipeBase.cs(245,0): at Microsoft.ML.RunTests.TestDataPipeBase.TestCore(String pathData, Boolean keepHidden, String[] argsPipe, Action`1 actLoader, String suffix, String suffixBase, Boolean checkBaseline, Boolean forceDense, Boolean logCurs, Boolean roundTripText, Boolean checkTranspose, Boolean checkId, Boolean baselineSchema, Int32 digitsOfPrecision, NumberParseOption parseOption)
�[m�[37m        /__w/1/s/test/Microsoft.ML.TestFramework/DataPipe/TestDataPipe.cs(1468,0): at Microsoft.ML.RunTests.TestDataPipe.SavePipeCountTargetEncoding()
�[m�[30;1m      Output:
�[m�[37m        Wrote 699 rows of length 63
�[m�[37m        
�[m�[37m        
�[m�[37m        Comparing /root/helix/work/workitem/e/TestOutput/SavePipe/SavePipeCountTargetEncoding-Data.txt and /root/helix/work/correlation/test/BaselineOutput/Common/SavePipe/SavePipeCountTargetEncoding-Data.txt
�[m�[37m        Output matches baseline: 'SavePipe/SavePipeCountTargetEncoding-Data.txt'
�[m�[37m        Test SavePipeCountTargetEncoding: aborted: passed

So _total+1 is 0. This would happen if _total was never initialized.

As far as I can tell this test is trying to save and reload data. I'm surprised to see it fail with these changes, perhaps there's an underlying transient issue. I can see one other mention of this issue here: #1474 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions