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