1 write to Host
Microsoft.ML.Data (1)
Transforms\RowToRowTransformerBase.cs (1)
68
Host
= host;
133 references to Host
Microsoft.ML.Data (133)
Prediction\CalibratorCatalog.cs (4)
270
Host
.CheckValue(ctx, nameof(ctx));
273
Host
.Check(onnx.CanSaveOnnx(ctx), "Cannot be saved as ONNX.");
315
Host
.AssertValue(input);
318
Host
.Assert(input.IsColumnActive(input.Schema[_scoreColIndex]));
Transforms\ColumnConcatenatingTransformer.cs (4)
467
throw
Host
.ExceptSchemaMismatch(nameof(inputSchema), "input", srcName);
490
throw
Host
.ExceptSchemaMismatch(nameof(inputSchema), "input", srcName, itemType.ToString(), curType.ToString());
883
Host
.CheckValue(ctx, nameof(ctx));
902
Host
.CheckValue(ctx, nameof(ctx));
Transforms\ColumnCopying.cs (2)
215
Host
.AssertValue(input);
216
Host
.Assert(0 <= iinfo && iinfo < _columns.Length);
Transforms\FeatureContributionCalculationTransformer.cs (2)
182
throw
Host
.ExceptSchemaMismatch(nameof(schema), "input", _parent.ColumnPairs[0].inputColumnName);
185
throw
Host
.ExceptSchemaMismatch(nameof(schema), "feature", _parent.ColumnPairs[0].inputColumnName, "vector of Single", schema[_featureColumnIndex].Type.ToString());
Transforms\Hashing.cs (1)
1458
Host
.CheckValue(ctx, nameof(ctx));
Transforms\KeyToValue.cs (23)
185
Host
.CheckValue(ctx, nameof(ctx));
214
Host
.AssertValue(input);
215
Host
.Assert(0 <= iinfo && iinfo < _types.Length);
231
Host
.Check(typeVals != null, "Metadata KeyValues does not exist");
234
Host
.Check(typeVals.GetVectorSize() == srcItemType.GetKeyCountAsInt32(
Host
), "KeyValues metadata size does not match column type key count");
250
Host
.Assert(0 <= iinfo && iinfo < _parent.ColumnPairs.Length);
251
Host
.AssertValue(typeKey);
252
Host
.AssertValue(typeVal);
255
Host
.Assert(keyItemType.RawType == typeof(TKey));
256
Host
.Assert(valItemType.RawType == typeof(TValue));
260
Host
.Check(keyMetadata.Length == keyItemType.GetKeyCountAsInt32(
Host
));
293
Parent.
Host
.AssertValue(typeVal);
294
Parent.
Host
.Assert(0 <= iinfo && iinfo < Parent._types.Length);
319
Parent.
Host
.Assert(values.IsDense);
320
Parent.
Host
.Assert(typeKey.RawType == typeof(TKey));
321
Parent.
Host
.Assert(TypeOutput.RawType == typeof(TValue));
365
Parent.
Host
.AssertValue(input);
425
Parent.
Host
.Assert(islot < srcCount);
428
Parent.
Host
.Assert(slot < nextExplicitSlot);
432
Parent.
Host
.Assert(slot < nextExplicitSlot);
447
Parent.
Host
.Assert(islotSrc < srcCount);
Transforms\KeyToVector.cs (52)
258
int keyCount = _infos[i].TypeSrc.GetItemType().GetKeyCountAsInt32(
Host
);
270
throw
Host
.Except(errorMsg);
276
Host
.AssertValue(inputSchema);
281
throw
Host
.ExceptSchemaMismatch(nameof(inputSchema), "input", _parent.ColumnPairs[i].inputColumnName);
295
Host
.Assert(colIndex >= 0);
317
typeNames.Size != srcType.GetItemType().GetKeyCountAsInt32(
Host
))
366
Host
.Assert(0 <= iinfo && iinfo < _infos.Length);
368
Host
.Assert(typeSrc != null && typeSrc.IsKnownSize);
372
Host
.Assert(typeSrc.Size > 1);
383
Host
.Check(namesSlotSrc.Length == typeSrc.Size);
388
int keyCount = typeSrc.ItemType.GetKeyCountAsInt32(
Host
);
390
Host
.Assert(slotLim == (long)typeSrc.Size * keyCount);
395
Host
.Check(namesKeySrc.Length == keyCount);
421
Host
.Assert(slot == slotLim);
428
Host
.Assert(0 <= iinfo && iinfo < _infos.Length);
433
Host
.Assert(valueCount > 0);
436
int size = info.TypeSrc.GetItemType().GetKeyCountAsInt32(
Host
);
451
Host
.AssertValue(input);
452
Host
.Assert(0 <= iinfo && iinfo < _infos.Length);
469
Host
.AssertValue(input);
471
Host
.Assert(keyTypeSrc != null);
472
int size = keyTypeSrc.GetCountAsInt32(
Host
);
473
Host
.Assert(size == _types[iinfo].Size);
474
Host
.Assert(size > 0);
476
Host
.Assert(srcCol >= 0);
502
Host
.AssertValue(input);
505
Host
.Assert(srcVectorType != null);
508
Host
.Assert(keyTypeSrc != null);
509
Host
.Assert(_parent._columns[iinfo].OutputCountVector);
510
int size = keyTypeSrc.GetCountAsInt32(
Host
);
511
Host
.Assert(size == _types[iinfo].Size);
512
Host
.Assert(size > 0);
515
Host
.Assert(cv >= 0);
517
Host
.Assert(srcCol >= 0);
527
Host
.Check(cv == 0 || src.Length == cv);
548
Host
.AssertValue(input);
551
Host
.Assert(srcVectorType != null);
554
Host
.Assert(keyTypeSrc != null);
555
Host
.Assert(!_parent._columns[iinfo].OutputCountVector);
557
int size = keyTypeSrc.GetCountAsInt32(
Host
);
558
Host
.Assert(size > 0);
561
Host
.Assert(cv >= 0);
562
Host
.Assert(_types[iinfo].Size == size * cv);
571
Host
.Check(lenSrc == cv || cv == 0);
582
Host
.Assert(lenSrc == cntSrc);
585
Host
.Assert(count < cntSrc);
598
Host
.Assert(count < cntSrc);
616
Host
.CheckValue(ctx, nameof(ctx));
633
Host
.CheckValue(ctx, nameof(ctx));
670
int keyCount = srcItemType.GetKeyCountAsInt32(
Host
);
671
Host
.Assert(keyCount > 0);
718
var categoryRange = info.TypeSrc.GetItemType().GetKeyCountAsInt32(
Host
);
Transforms\Normalizer.cs (2)
764
Host
.CheckValue(ctx, nameof(ctx));
786
Host
.CheckValue(ctx, nameof(ctx));
Transforms\SlotsDroppingTransformer.cs (32)
483
throw
Host
.ExceptSchemaMismatch(nameof(inputSchema), "input", _parent.ColumnPairs[i].inputColumnName);
489
throw
Host
.ExceptSchemaMismatch(nameof(inputSchema), "input", _parent.ColumnPairs[i].inputColumnName);
521
Host
.AssertValue(slotDropper);
522
Host
.AssertValue(input);
523
Host
.AssertNonEmpty(slotsMin);
524
Host
.AssertNonEmpty(slotsMax);
525
Host
.Assert(slotsMin.Length == slotsMax.Length);
526
Host
.Assert(0 <= iinfo && iinfo < _parent.ColumnPairs.Length);
542
Host
.Assert(vectorType.IsKnownSize);
552
Host
.Assert(0 <= iinfo && iinfo < _parent.ColumnPairs.Length);
570
Host
.Assert(0 <= iinfo && iinfo < _parent.ColumnPairs.Length);
571
Host
.Assert(slotsMax != null && slotsMin != null);
572
Host
.Assert(slotsMax.Length == slotsMin.Length);
721
Host
.AssertValue(input);
722
Host
.Assert(0 <= iinfo && iinfo < _parent.ColumnPairs.Length);
740
Host
.AssertValue(input);
741
Host
.Assert(0 <= iinfo && iinfo < _parent.ColumnPairs.Length);
742
Host
.Assert(!(_srcTypes[iinfo] is VectorDataViewType));
743
Host
.Assert(_suppressed[iinfo]);
761
Host
.AssertValue(input);
762
Host
.Assert(0 <= iinfo && iinfo < _parent.ColumnPairs.Length);
764
Host
.Assert(_suppressed[iinfo]);
782
Host
.AssertValue(input);
783
Host
.Assert(0 <= iinfo && iinfo < _parent.ColumnPairs.Length);
785
Host
.Assert(!_suppressed[iinfo]);
809
Host
.AssertValue(input);
810
Host
.Assert(0 <= iinfo && iinfo < _parent.ColumnPairs.Length);
812
Host
.Assert(input.IsColumnActive(src));
818
Host
.CheckValue(typeDst, nameof(typeDst));
819
Host
.CheckValue(row, nameof(row));
833
Host
.Assert(colIndex >= 0);
881
Host
.CheckValue(ctx, nameof(ctx));
Transforms\TypeConverting.cs (3)
402
if (!CanConvertToType(
Host
, srcCol.Type, _parent._columns[i].OutputKind.ToInternalDataKind(), _parent._columns[i].OutputKeyCount,
405
throw
Host
.ExceptParam(nameof(inputSchema),
479
Host
.CheckValue(ctx, nameof(ctx));
Transforms\ValueMapping.cs (4)
1050
Host
.AssertValue(input);
1051
Host
.Assert(0 <= iinfo && iinfo < _columns.Length);
1061
Host
.CheckValue(ctx, nameof(ctx));
1069
throw
Host
.ExceptSchemaMismatch(nameof(_inputSchema), "input", inputColumnName);
Transforms\ValueToKeyMappingTransformer.cs (4)
736
_termMap[iinfo] = Bind(
Host
, inputSchema, _parent._unboundMaps[iinfo], _infos, _parent._textMetadata, iinfo);
746
Host
.Assert(colIndex >= 0);
904
Host
.CheckValue(ctx, nameof(ctx));
926
Host
.CheckValue(ctx, nameof(ctx));