1 write to Ch
Microsoft.ML.Core (1)
Data\RootCursorBase.cs (1)
41Ch = provider.Start("Cursor");
278 references to Ch
Microsoft.ML.Core (5)
Data\LinkedRootCursorBase.cs (1)
33Ch.AssertValue(input, nameof(input));
Data\LinkedRowRootCursorBase.cs (3)
26Ch.CheckValue(schema, nameof(schema)); 27Ch.Check(active == null || active.Length == schema.Count); 37Ch.Check(column.Index < Schema.Count);
Data\RootCursorBase.cs (1)
52Ch.Dispose();
Microsoft.ML.Data (219)
Data\DataViewUtils.cs (34)
1031Ch.AssertValue(schema); 1032Ch.AssertValue(activeToCol); 1033Ch.AssertValue(colToActive); 1034Ch.AssertValue(pipes); 1035Ch.AssertValue(batchInputs); 1036Ch.AssertValueOrNull(quitAction); 1037Ch.Assert(colToActive.Length == schema.Count); 1038Ch.Assert(activeToCol.Length + (int)ExtraIndex._Lim == pipes.Length); 1039Ch.Assert(pipes.All(p => p != null)); 1072Ch.Assert(!_disposed); 1079Ch.Assert(pipe.Remaining == _remaining); 1095Ch.Assert(nextBatch.HasException || nextBatch.BatchId > Batch); 1096Ch.Assert(nextBatch.HasException || nextBatch.Count > 0); 1102Ch.Assert(!nextBatch.HasException); 1112Ch.CheckParam(column.Index < _colToActive.Length, nameof(column)); 1125Ch.CheckParam(IsColumnActive(column), nameof(column), "requested column not active."); 1126Ch.CheckParam(column.Index < _colToActive.Length, nameof(column), "requested column is not active or valid for the Schema."); 1131throw Ch.Except($"Invalid TValue: '{typeof(TValue)}', " + 1185Ch.CheckNonEmpty(cursors, nameof(cursors)); 1206Ch.Assert(cursor.Position < 0); 1237Ch.Check(_icursor >= 0, RowCursorUtils.FetchValueStateError); 1254Ch.AssertValue(cursor); 1255Ch.Assert(col < cursor.Schema.Count); 1256Ch.Assert(cursor.IsColumnActive(Schema[col])); 1257Ch.Assert(type.Equals(cursor.Schema[col].Type)); 1263Ch.Check(_icursor >= 0, RowCursorUtils.FetchValueStateError); 1271Ch.Assert(!_disposed); 1280Ch.Assert(_currentCursor.Batch > _batch); 1290Ch.Assert(Position < 0 || stats.Batch > _batch); 1294Ch.Assert(stats.Batch == _currentCursor.Batch); 1303Ch.CheckParam(column.Index < _colToActive.Length, nameof(column)); 1316Ch.CheckParam(IsColumnActive(column), nameof(column), "requested column not active"); 1317Ch.CheckParam(column.Index < _colToActive.Length, nameof(column), "requested column not active or is invalid for the schema. "); 1322throw Ch.Except($"Invalid TValue: '{typeof(TValue)}', " +
Data\RowCursorUtils.cs (9)
554Ch.AssertValue(parent); 555Ch.AssertValue(active); 556Ch.Assert(active.Length == parent.Schema.Count); 572Ch.CheckParam(column.Index < Schema.Count, nameof(column)); 573Ch.CheckParam(IsColumnActive(column), nameof(column.Index), "Requested column is not active."); 579Ch.Check(IsGood, "Cannot call value getter in current state"); 589Ch.CheckParam(column.Index < Schema.Count, nameof(column)); 592Ch.Assert(_parent._row.IsColumnActive(column)); 601Ch.Check(IsGood, RowCursorUtils.FetchValueStateError);
DataLoadSave\Binary\BinaryLoader.cs (15)
1250Ch.AssertValueOrNull(rand); 1367_exMarshaller.ThrowIfSet(Ch); 1447protected IExceptionContext Ectx { get { return Parent.Ch; } } 1564Contracts.AssertValue(parent.Ch); 1969Ch.CheckParam(column.Index < _colToActivesIndex.Length, nameof(column)); 1975Ch.Assert(!_disposed); 2002_exMarshaller.ThrowIfSet(Ch); 2011Ch.Assert(more == pipeMoved); 2037Ch.CheckParam(column.Index < _colToActivesIndex.Length, nameof(column), "requested column not active."); 2042throw Ch.Except($"Invalid TValue: '{typeof(TValue)}', " + 2056ValueGetter<T> del = (ref T value) => throw Ch.Except(RowCursorUtils.FetchValueStateError); 2067Ch.Check(IsGood, RowCursorUtils.FetchValueStateError); 2086Ch.Check(IsGood, RowCursorUtils.FetchValueStateError); 2090Ch.Assert(pos / _rowsPerBlock < _blockShuffleOrder.Length); 2093Ch.Assert(0 <= blockPos && blockPos < _parent.RowCount);
DataLoadSave\Database\DatabaseLoaderCursor.cs (9)
38Ch.Assert(active == null || active.Length == parent._bindings.OutputSchema.Count); 39Ch.CheckValue(source, nameof(source)); 52Ch.Assert(_getters[i] != null); 110Ch.Check(IsGood, RowCursorUtils.FetchValueStateError); 147Ch.Check(column.Index < _bindings.Infos.Length); 160Ch.CheckParam(column.Index < _getters.Length, nameof(column), "requested column not valid."); 161Ch.Check(IsColumnActive(column)); 166throw Ch.Except($"Invalid TValue in GetGetter: '{typeof(TValue)}', " + 181Ch.Assert(colInfo.ColType.RawType == typeof(TValue));
DataLoadSave\Text\TextLoaderCursor.cs (18)
89Ch.Assert(active == null || active.Length == parent._bindings.OutputSchema.Count); 90Ch.AssertValue(reader); 91Ch.AssertValue(stats); 92Ch.Assert(srcNeeded >= 0); 93Ch.Assert(cthd > 0); 118Ch.Assert(v != null); 120Ch.Assert(_getters[i] != null); 204Ch.Check(IsGood, RowCursorUtils.FetchValueStateError); 306Ch.Check(column.Index < _bindings.Infos.Length); 319Ch.CheckParam(column.Index < _getters.Length, nameof(column), "requested column not valid."); 320Ch.Check(IsColumnActive(column)); 325throw Ch.Except($"Invalid TValue in GetGetter: '{typeof(TValue)}', " + 332Ch.AssertValue(_rows); 333Ch.Assert(_rows.Count == 1); 339Ch.Assert(batch.Exception == null); 343Ch.Assert(info.Line > 0); 344Ch.AssertNonEmpty(info.Text); 839throw Ch.ExceptDecode(state.ParsingException,
DataLoadSave\Transpose\TransposeLoader.cs (17)
763Ch.AssertValue(columnsNeeded); 766Ch.AssertValue(_parent._colTransposers); 767Ch.AssertValue(_parent._colTransposersLock); 768Ch.Assert(!_parent.HasRowData); 796Ch.Assert(0 <= col && col < Schema.Count); 797Ch.Assert(_colToActivesIndex[col] >= 0); 799Ch.Assert(((ITransposeDataView)_parent).GetSlotType(col).Size == _parent._header.RowCount); 814Ch.Assert(typeof(T) == type.RawType); 823Ch.Assert(buff.Length == 1); 834Ch.Assert(type is VectorDataViewType); 835Ch.Assert(typeof(T) == type.GetItemType().RawType); 849Ch.Check(IsGood, RowCursorUtils.FetchValueStateError); 861Ch.Assert(cMore == more); 871Ch.CheckParam(column.Index <= _colToActivesIndex.Length, nameof(column)); 884Ch.CheckParam(column.Index <= _colToActivesIndex.Length && IsColumnActive(column), nameof(column), "requested column not active"); 885Ch.AssertValue(_getters[_colToActivesIndex[column.Index]]); 890throw Ch.Except($"Invalid TValue: '{typeof(TValue)}', " +
DataView\AppendRowsDataView.cs (22)
175Ch.AssertNonEmpty(Sources); 183Ch.AssertValue(colType); 191Ch.CheckParam(column.Index <= Getters.Length && IsColumnActive(column), nameof(column), "requested column not active"); 196throw Ch.Except($"Invalid TValue in GetGetter: '{typeof(TValue)}', " + 206Ch.Check(column.Index < Schema.Count, "Column index is out of range"); 248Ch.AssertValue(_currentCursor); 255Ch.Check(Position >= 0, RowCursorUtils.FetchValueStateError); 258Ch.Assert(0 <= _currentSourceIndex && _currentSourceIndex < Sources.Length); 259Ch.Assert(_currentCursor != null); 269Ch.AssertValue(_currentCursor); 292Ch.Dispose(); 316Ch.AssertValue(rand); 319Ch.AssertValue(counts); 320Ch.Assert(Sources.Length == counts.Length); 324Ch.Assert(counts[i] >= 0); 327_sampler = new MultinomialWithoutReplacementSampler(Ch, counts, rand); 342Ch.Check(IsGood, RowCursorUtils.FetchValueStateError); 354Ch.Check(Position >= 0, RowCursorUtils.FetchValueStateError); 355Ch.Assert(0 <= _currentSourceIndex && _currentSourceIndex < Sources.Length); 371Ch.Assert(pos < _cursorSet.Length); 374Ch.Assert(r); 384Ch.Dispose();
DataView\ArrayDataViewBuilder.cs (13)
268Ch.AssertValue(view); 269Ch.AssertValueOrNull(rand); 270Ch.Assert(view.Schema.Count >= 0); 292Ch.Check(IsGood, RowCursorUtils.FetchValueStateError); 301Ch.Check(IsGood, RowCursorUtils.FetchValueStateError); 312Ch.Check(column.Index < Schema.Count); 325Ch.Check(column.Index < Schema.Count); 326Ch.Check(column.Index < _active.Length && _active[column.Index], "the requested column is not active"); 331throw Ch.Except($"Invalid TValue: '{typeof(TValue)}', " + 337Ch.Check(IsGood, RowCursorUtils.FetchValueStateError); 344Ch.Assert(Position < _view._rowCount); 350Ch.Assert(IsGood); 351Ch.Assert(0 <= Position && Position < _view._rowCount);
DataView\BatchDataViewMapperBase.cs (7)
120Ch.AssertValue(_getters); 122Ch.Assert(getter != null); 125throw Ch.Except($"Invalid TValue in GetGetter: '{typeof(TValue)}', " + 135Ch.Check(IsGood, "Cannot call ID getter in current state"); 142Ch.Check(column.Index < _parent.SchemaBindings.AsSchema.Count); 156Ch.Assert(_lastInBatchInLookAheadCursorDel()); 161Ch.Assert(good);
DataView\EmptyDataView.cs (4)
55Ch.AssertValue(schema); 62return (ref DataViewRowId val) => throw Ch.Except(RowCursorUtils.FetchValueStateError); 81Ch.CheckParam(IsColumnActive(column), nameof(column), "requested column not active"); 82return (ref TValue value) => throw Ch.Except(RowCursorUtils.FetchValueStateError);
DataView\LambdaFilter.cs (1)
167Ch.Assert(typeof(T1) == typeof(T2));
DataView\Transposer.cs (9)
1489Ch.CheckParam(column.Index == 0, nameof(column)); 1502Ch.CheckParam(column.Index == 0, nameof(column)); 1503Ch.CheckParam(_getter != null, nameof(column), "requested column not active"); 1507throw Ch.Except($"Invalid TValue: '{typeof(TValue)}', " + 1516Ch.Check(_slotCursor.SlotIndex >= 0, RowCursorUtils.FetchValueStateError); 1550Ch.CheckParam(column.Index == 0, nameof(column)); 1563Ch.CheckParam(column.Index == 0, nameof(column)); 1564return _slotCursor.GetGetterWithVectorType<TValue>(Ch); 1571Ch.Check(_slotCursor.SlotIndex >= 0, RowCursorUtils.FetchValueStateError);
DataView\ZipDataView.cs (3)
120Ch.AssertNonEmpty(srcCursors); 121Ch.AssertValue(predicate); 146Ch.Check(IsGood, RowCursorUtils.FetchValueStateError);
Transforms\BootstrapSamplingTransformer.cs (2)
198Ch.AssertValue(rgen); 236Ch.Assert(_remaining >= 0);
Transforms\NAFilter.cs (3)
404Ch.Check(IsColumnActive(column)); 420Ch.Assert(IsColumnActive(Schema[col])); 432throw Ch.Except($"Invalid TValue: '{typeof(TValue)}', " +
Transforms\PerGroupTransformBase.cs (11)
252Ch.AssertValue(parent); 255Ch.AssertValue(input); 256Ch.AssertValue(groupCursor); 257Ch.AssertValue(active); 280Ch.Check(column.Index < _parent.GetBindings().ColumnCount); 303Ch.AssertValue(_getters); 305Ch.Assert(getter != null); 308throw Ch.Except($"Invalid TValue in GetGetter: '{typeof(TValue)}', " + 318Ch.Check(IsGood, RowCursorUtils.FetchValueStateError); 337Ch.Assert(good); 339Ch.Assert(_groupCursor.Position >= 0);
Transforms\RangeFilter.cs (15)
319Ch.Check(0 <= column.Index && column.Index < Schema.Count); 320Ch.Check(IsColumnActive(column)); 327throw Ch.Except($"Invalid TValue in GetGetter: '{typeof(TValue)}', " + 357Ch.Assert(Parent._type == NumberDataViewType.Single); 362Ch.Check(IsGood, RowCursorUtils.FetchValueStateError); 369Ch.Assert(Parent._type == NumberDataViewType.Single); 375Ch.Assert(Parent._type == NumberDataViewType.Single); 390Ch.Assert(Parent._type == NumberDataViewType.Double); 395Ch.Check(IsGood, RowCursorUtils.FetchValueStateError); 402Ch.Assert(Parent._type == NumberDataViewType.Double); 408Ch.Assert(Parent._type == NumberDataViewType.Double); 425Ch.Assert(Parent._type.GetKeyCount() > 0); 431Ch.Check(IsGood, RowCursorUtils.FetchValueStateError); 440Ch.Assert(Parent._type is KeyDataViewType); 446Ch.Assert(Parent._type is KeyDataViewType);
Transforms\RowShufflingTransformer.cs (25)
505Ch.AssertValue(input); 506Ch.AssertValue(rand); 508Ch.Assert(_blockSize > 0); 509Ch.Assert(_bufferDepth > 0); 510Ch.Assert(poolRows > 0); 582Ch.Assert(requested >= _blockSize); 586Ch.Assert(0 <= circularIndex && circularIndex < _pipeIndices.Length); 590Ch.Assert(0 <= pipeIndex && pipeIndex < _pipeIndices.Length); 618Ch.Assert(_liveCount > 0); 619Ch.Assert(_deadCount < _blockSize || _doneConsuming); 620Ch.Assert(0 <= _circularIndex && _circularIndex < _pipeIndices.Length); 651throw Ch.Except(_producerTaskException, "Shuffle input cursor reader failed with an exception"); 671Ch.CheckParam(column.Index < _colToActivesIndex.Length, nameof(column)); 672Ch.Assert((_colToActivesIndex[column.Index] >= 0) == _input.IsColumnActive(column)); 678Ch.Assert(0 <= col && col < _colToActivesIndex.Length); 679Ch.Assert(_colToActivesIndex[col] >= 0); 685Ch.Assert(0 <= col && col < _colToActivesIndex.Length); 686Ch.Assert(_colToActivesIndex[col] >= 0); 687Ch.Assert(Schema[col].Type.RawType == typeof(TValue)); 693Ch.AssertValue(pipe); 694Ch.Assert(pipe is ShufflePipe<TValue>); 699Ch.Assert(_pipeIndex == _pipeIndices[_circularIndex]); 714Ch.CheckParam(column.Index < _colToActivesIndex.Length, nameof(column)); 715Ch.CheckParam(_colToActivesIndex[column.Index] >= 0, nameof(column), "requested column not active"); 720throw Ch.Except($"Invalid TValue: '{typeof(TValue)}', " +
Transforms\SkipTakeFilter.cs (2)
241Ch.Assert(skip >= 0); 242Ch.Assert(take >= 0);
Microsoft.ML.Parquet (24)
ParquetLoader.cs (11)
451Ch.AssertValue(columnsNeeded); 452Ch.AssertValue(parent._parquetStream); 456_parquetConversions = new ParquetConversions(Ch); 491Ch.CheckParam(IsColumnActive(Schema[col]), nameof(col)); 539Ch.CheckParam(IsColumnActive(Schema[col]), nameof(col)); 540Ch.CheckValue(valueConverter, nameof(valueConverter)); 546Ch.Check(Position >= 0, RowCursorUtils.FetchValueStateError); 600Ch.CheckParam(IsColumnActive(column), nameof(column), "requested column not active"); 605throw Ch.Except($"Invalid TValue: '{typeof(TValue)}', " + 617Ch.Check(IsGood, RowCursorUtils.FetchValueStateError); 627Ch.CheckParam(column.Index < _colToActivesIndex.Length, nameof(column));
PartitionedFileLoader.cs (13)
422Ch.Check(IsColumnActive(column)); 427throw Ch.Except($"Invalid TValue: '{typeof(TValue)}', " + 438Ch.Check(IsGood, RowCursorUtils.FetchValueStateError); 449Ch.Check(column.Index < Schema.Count); 478Ch.Warning($"Failed to load file {path} due to a loader exception. Moving on to the next file. Ex: {e.Message}"); 492Ch.Warning(MessageSensitivity.Schema, e.Message); 522Ch.Warning($"File at index {_fileOrder.Current} is missing a path. Loading of file is being skipped."); 609Ch.Check(col >= 0 && col < SubColumnCount); 626Ch.Check(col >= 0 && col < _colValues.Length); 627Ch.AssertValue(type); 632throw Ch.Except("Invalid TValue: '{0}' of the conversion.", typeof(TValue)); 707Ch.Warning($"Path {path} did not have {dirCount} directories necessary for parsing."); 735Ch.Warning($"Could not parse column values from the path {path}. Ex: {e.Message}");
Microsoft.ML.Transforms (30)
GroupTransform.cs (8)
518Ch.AssertValue(predicate); 568Ch.CheckParam(column.Index < _active.Length, nameof(column)); 581Ch.Assert(_leadingCursor.Position >= 0); 595Ch.Assert(groupSize > 0); 605Ch.Assert(res); 652throw Ch.ExceptParam(nameof(column), "Column #{0} is not active", column); 660Ch.AssertValue(_aggregators[column.Index - _groupCount]); 661return _aggregators[column.Index - _groupCount].GetGetter<TValue>(Ch);
StatefulFilterTransform.cs (5)
146Ch.AssertValue(input); 147Ch.AssertValue(columnsNeeded); 156CursorChannelAttribute.TrySetCursorChannel(_parent._host, _src, Ch); 157CursorChannelAttribute.TrySetCursorChannel(_parent._host, _dst, Ch); 158CursorChannelAttribute.TrySetCursorChannel(_parent._host, _state, Ch);
SvmLight\SvmLightLoader.cs (10)
474Ch.Check(IsGood, "cannot call getter with cursor in its current state"); 475Ch.Assert(_isActive); 481Ch.CheckParam(column.Index == 0, nameof(column)); 482Ch.CheckParam(_isActive, nameof(column), "requested column not active"); 486throw Ch.Except($"Invalid TValue: '{typeof(TValue)}', " + 496Ch.Check(IsGood, "Cannot call ID getter in current state"); 503Ch.CheckParam(column.Index == 0, nameof(column)); 509Ch.AssertValue(_currReader); 510Ch.Assert(-1 <= _fileIdx && _fileIdx < _parent._files.Count); 524Ch.AssertValue(_parent._files);
UngroupTransform.cs (7)
513Ch.Assert(_fixedSize > 0 || _sizeGetters.Length > 0); 531Ch.Assert(Position < 0 || (0 <= _pivotColPosition && _pivotColPosition < _pivotColSize)); 601Ch.Check(column.Index < _ungroupBinding.InputColumnCount); 614Ch.CheckParam(column.Index < _ungroupBinding.InputColumnCount, nameof(column)); 623Ch.Check(result != null, "Unexpected getter type requested"); 641Ch.Check(Input.Position >= 0, RowCursorUtils.FetchValueStateError); 643Ch.Assert(cachedPosition <= Input.Position);