1 write to RawType
Microsoft.ML.DataView (1)
DataViewType.cs (1)
26RawType = rawType ?? throw new ArgumentNullException(nameof(rawType));
495 references to RawType
Microsoft.Data.Analysis (15)
IDataView.Extension.cs (15)
125throw new NotSupportedException(String.Format(Microsoft.Data.Strings.NotSupportedColumnType, type.RawType.Name)); 155if (itemType.RawType == typeof(bool)) 159else if (itemType.RawType == typeof(byte)) 163else if (itemType.RawType == typeof(double)) 167else if (itemType.RawType == typeof(float)) 171else if (itemType.RawType == typeof(int)) 175else if (itemType.RawType == typeof(long)) 179else if (itemType.RawType == typeof(sbyte)) 183else if (itemType.RawType == typeof(short)) 187else if (itemType.RawType == typeof(uint)) 191else if (itemType.RawType == typeof(ulong)) 195else if (itemType.RawType == typeof(ushort)) 199else if (itemType.RawType == typeof(char)) 203else if (itemType.RawType == typeof(decimal)) 207else if (itemType.RawType == typeof(ReadOnlyMemory<char>))
Microsoft.ML.CodeGenerator (1)
Utils.cs (1)
76var getGenericGetGetterMethod = getGetGetterMethod.MakeGenericMethod(featureColumns[i].Type.RawType);
Microsoft.ML.Core (7)
Data\AnnotationUtils.cs (3)
227if (!(columnType is KeyDataViewType) || columnType.RawType != typeof(uint)) 251if (columnType is KeyDataViewType && columnType.RawType == typeof(uint)) 389if (type?.RawType == typeof(VBuffer<int>))
Data\ColumnTypeExtensions.cs (2)
17/// Whether this type is a standard scalar type completely determined by its <see cref="DataViewType.RawType"/> 71columnType.RawType.TryGetDataKind(out InternalDataKind result);
Data\IEstimator.cs (2)
68Contracts.CheckParam(!isKey || KeyDataViewType.IsValidDataType(itemType.RawType), nameof(itemType), "The item type must be valid for a key"); 171itemType = ColumnTypeExtensions.PrimitiveTypeFromType(itemType.RawType);
Microsoft.ML.Core.Tests (8)
UnitTests\ColumnTypes.cs (1)
53var rawType = tmp.RawType;
UnitTests\CoreBaseTestClass.cs (2)
89var result = vecType.ItemType.RawType.TryGetDataKind(out var kind); 133var result = type.RawType.TryGetDataKind(out var kind);
UnitTests\DataTypes.cs (1)
253Assert.True(typeof(TDst) == dstType.RawType);
UnitTests\ScoreSchemaTest.cs (4)
54Assert.Equal(expectedScoreColumnType.RawType, actualScoreColumnType.RawType); 111Assert.Equal(expectedScoreColumnType.RawType, actualScoreColumnType.RawType);
Microsoft.ML.Data (315)
Commands\ShowSchemaCommand.cs (4)
223var meth = del.GetMethodInfo().GetGenericMethodDefinition().MakeGenericMethod(type.RawType); 235Contracts.Assert(type.RawType == typeof(T)); 262var meth = del.GetMethodInfo().GetGenericMethodDefinition().MakeGenericMethod(type.ItemType.RawType); 273Contracts.Assert(type.ItemType.RawType == typeof(T));
Data\Conversion.cs (35)
386Contracts.Check(typeSrc.RawType == typeof(TSrc)); 387Contracts.Check(typeDst.RawType == typeof(TDst)); 440if (!KeyDataViewType.IsValidDataType(typeDst.RawType)) 442if (Marshal.SizeOf(keySrc.RawType) > Marshal.SizeOf(typeDst.RawType)) 444if (keySrc.Count > typeDst.RawType.ToMaxInt()) 465identity = typeSrc.RawType == typeDst.RawType; 466var key = (typeSrc.RawType, typeDst.RawType); 489Contracts.Check(type.RawType == typeof(TSrc), "Wrong TSrc type argument"); 515Contracts.Check(key.RawType == typeof(TSrc)); 543Contracts.Check(typeDst.RawType == typeof(TDst), "Wrong TDst type parameter"); 548Contracts.Assert(_tryParseDelegates.ContainsKey(typeDst.RawType)); 549return (TryParseMapper<TDst>)_tryParseDelegates[typeDst.RawType]; 554Contracts.Assert(key.RawType == typeof(TDst)); 576return Utils.MarshalInvoke(_getKeyParseMethodInfo, this, key.RawType, key); 581Contracts.Assert(key.RawType == typeof(TDst)); 624Contracts.CheckParam(type.RawType == typeof(T), nameof(type)); 628if (!t.IsStandardScalar() && !(t is KeyDataViewType) || !_isDefaultDelegates.TryGetValue(t.RawType, out del)) 645Contracts.CheckParam(type.RawType == typeof(T), nameof(type)); 668Contracts.Assert(_isDefaultDelegates.ContainsKey(t.RawType)); 669del = _isDefaultDelegates[t.RawType]; 671else if (!t.IsStandardScalar() || !_isNADelegates.TryGetValue(t.RawType, out del)) 684Contracts.CheckParam(type.ItemType.RawType == typeof(T), nameof(type)); 691Contracts.Assert(_hasZeroDelegates.ContainsKey(t.RawType)); 692del = _hasZeroDelegates[t.RawType]; 694else if (!t.IsStandardScalar() || !_hasNADelegates.TryGetValue(t.RawType, out del)) 708Contracts.CheckParam(type.RawType == typeof(T), nameof(type)); 711if (!_getNADelegates.TryGetValue(type.RawType, out del)) 726Contracts.CheckParam(type.RawType == typeof(T), nameof(type)); 729if (!_getNADelegates.TryGetValue(type.RawType, out del)) 741if (_isDefaultDelegates.TryGetValue(type.RawType, out isDefPred)) 756Contracts.CheckParam(type.RawType == typeof(T), nameof(type)); 759if (!_getNADelegates.TryGetValue(type.RawType, out del))
Data\DataViewUtils.cs (8)
485return Utils.MarshalInvoke(_getPoolCoreMethodInfo, type.RawType, pools, poolIdx); 542Utils.MarshalInvoke(_createInPipeMethodInfo, this, column.Type.RawType, input, activeToCol[c]); 737Contracts.Assert(typeof(T) == type.RawType); 868pipeType = typeof(ImplVec<>).MakeGenericType(vectorType.ItemType.RawType); 872pipeType = typeof(ImplOne<>).MakeGenericType(type.RawType); 1244return Utils.MarshalInvoke(_createGetterMethodInfo, this, Schema[col].Type.RawType, col); 1341getter = Utils.MarshalInvoke(GetVectorFlatteningGetter<int>, vectorType.ItemType.RawType, 1346getter = Utils.MarshalInvoke(GetSingleValueGetter<int>, colType.RawType,
Data\RowCursorUtils.cs (18)
39return Utils.MarshalInvoke(_getGetterAsDelegateCoreMethodInfo, row.Schema[col].Type.RawType, row, col); 65var methodInfo = del.GetMethodInfo().GetGenericMethodDefinition().MakeGenericMethod(typeSrc.RawType, typeDst.RawType); 77Contracts.CheckParam(typeDst.RawType == typeof(TDst), nameof(typeDst)); 86var methodInfo = del.GetMethodInfo().GetGenericMethodDefinition().MakeGenericMethod(typeSrc.RawType, typeof(TDst)); 92Contracts.Assert(typeof(TSrc) == typeSrc.RawType); 93Contracts.Assert(typeof(TDst) == typeDst.RawType); 129return Utils.MarshalInvoke(GetGetterAsStringBuilderCore<int>, typeSrc.RawType, typeSrc, row, col); 134Contracts.Assert(typeof(TSrc) == typeSrc.RawType); 164var methodInfo = del.GetMethodInfo().GetGenericMethodDefinition().MakeGenericMethod(typeSrc.ItemType.RawType, typeDst.RawType); 175Contracts.CheckParam(typeDst.RawType == typeof(TDst), nameof(typeDst)); 184var methodInfo = del.GetMethodInfo().GetGenericMethodDefinition().MakeGenericMethod(typeSrc.ItemType.RawType, typeof(TDst)); 196Contracts.CheckParam(typeDst.RawType == typeof(TDst), nameof(typeDst)); 201var methodInfo = del.GetMethodInfo().GetGenericMethodDefinition().MakeGenericMethod(typeSrc.ItemType.RawType, typeof(TDst)); 257Contracts.Assert(typeof(TSrc) == typeSrc.ItemType.RawType); 258Contracts.Assert(typeof(TDst) == typeDst.RawType); 310return Utils.MarshalInvoke(_getIsNewGroupDelegateCoreMethodInfo, type.RawType, cursor, col);
Data\SchemaAnnotationsExtensions.cs (1)
67/// key values are of <see cref="VectorDataViewType.ItemType"/> whose <see cref="DataViewType.RawType"/> matches
DataDebuggerPreview.cs (1)
48setters[i] = Utils.MarshalInvoke(_makeSetterMethodInfo, this, data.Schema[i].Type.RawType, cursor, i);
DataLoadSave\Binary\BinaryLoader.cs (7)
197var meth = del.GetMethodInfo().GetGenericMethodDefinition().MakeGenericMethod(Type.RawType); 215/// <typeparamref name="T"/> is the same type as <see cref="DataViewType.RawType"/>. 220_ectx.Assert(typeof(T) == Type.RawType); 509Type valueType = type.RawType; 517entryType = typeof(MetadataTableOfContentsEntry.ImplOne<>).MakeGenericType(type.RawType); 1455genType = genType.MakeGenericType(entry.Type.RawType); 2052=> Utils.MarshalInvoke(_noRowGetterMethodInfo, this, type.RawType);
DataLoadSave\Binary\BinarySaver.cs (7)
97Type writePipeType = typeof(WritePipe<>).MakeGenericType(col.Codec.Type.RawType); 289IValueCodec codec = (IValueCodec)methInfo.MakeGenericMethod(metaColumn.Type.RawType).Invoke(this, args); 352_host.Assert(typeof(T) == type.RawType); 754methInfo.MakeGenericMethod(col.Codec.Type.RawType).Invoke(this, args); 851_host.CheckParam(value.GetType() == type.RawType, nameof(value), "Value doesn't match type"); 895value = Utils.MarshalInvoke(_loadValueMethodInfo, this, type.RawType, stream, codec); 904_host.Assert(typeof(T) == codec.Type.RawType);
DataLoadSave\Binary\CodecFactory.cs (3)
89Contracts.Assert(!_simpleCodecTypeMap.ContainsKey(codec.Type.RawType)); 91_simpleCodecTypeMap.Add(codec.Type.RawType, codec); 107return _simpleCodecTypeMap.TryGetValue(type.RawType, out codec);
DataLoadSave\Binary\Codecs.cs (21)
125Contracts.Assert(type.RawType == typeof(T)); 791Contracts.Assert(type.RawType == typeof(VBuffer<T>)); 1151Type codecType = typeof(VBufferCodec<>).MakeGenericType(itemType.RawType); 1167Type codecType = typeof(VBufferCodec<>).MakeGenericType(itemType.RawType); 1191Contracts.Assert(type.RawType == typeof(T)); 1192Contracts.Assert(innerCodec.Type.RawType == type.RawType); 1243Contracts.CheckDecode(KeyDataViewType.IsValidDataType(itemType.RawType)); 1259type = new KeyDataViewType(itemType.RawType, itemType.RawType.ToMaxInt()); 1261type = new KeyDataViewType(itemType.RawType, count); 1264Type codecType = typeof(KeyCodecOld<>).MakeGenericType(itemType.RawType); 1288Contracts.Assert(type.RawType == typeof(T)); 1289Contracts.Assert(innerCodec.Type.RawType == type.RawType); 1340Contracts.CheckDecode(KeyDataViewType.IsValidDataType(itemType.RawType)); 1347Contracts.CheckDecode(count <= itemType.RawType.ToMaxInt()); 1349type = new KeyDataViewType(itemType.RawType, count); 1352Type codecType = typeof(KeyCodec<>).MakeGenericType(itemType.RawType); 1363if (!TryGetCodec(ColumnTypeExtensions.NumberTypeFromType(type.RawType), out innerCodec)) 1369Type codecType = typeof(KeyCodec<>).MakeGenericType(type.RawType);
DataLoadSave\Database\DatabaseLoaderCursor.cs (2)
173return Utils.MarshalInvoke(_createGetterDelegateMethodInfo, this, _bindings.Infos[col].ColType.RawType, col); 181Ch.Assert(colInfo.ColType.RawType == typeof(TValue));
DataLoadSave\FakeSchema.cs (3)
37del = Utils.MarshalInvoke(_getDefaultVectorGetterMethodInfo, vectorType.ItemType.RawType); 39del = Utils.MarshalInvoke(_getDefaultGetterMethodInfo, metaColumnType.RawType); 51curType = new KeyDataViewType(((PrimitiveDataViewType)curType).RawType, AllKeySizes);
DataLoadSave\Text\TextLoaderParser.cs (8)
81return Utils.MarshalInvoke(_getCreatorOneCoreMethodInfo, this, type.RawType, type); 87Contracts.Assert(typeof(T) == type.RawType); 94return Utils.MarshalInvoke(_getCreatorVecCoreMethodInfo, this, type.RawType, type); 100Contracts.Assert(typeof(T) == type.RawType); 108return Utils.MarshalInvoke(_getCreatorOneCoreMethodInfo, this, key.RawType, key); 114return Utils.MarshalInvoke(_getCreatorVecCoreMethodInfo, this, key.RawType, key); 262Contracts.Assert(typeof(TResult) == type.RawType); 445Contracts.Assert(typeof(TItem) == type.RawType);
DataLoadSave\Text\TextSaver.cs (3)
67writePipeType = typeof(VecValueWriter<>).MakeGenericType(vectorType.ItemType.RawType); 69writePipeType = typeof(ValueWriter<>).MakeGenericType(type.RawType); 101Contracts.Assert(type.RawType == typeof(T));
DataLoadSave\Transpose\TransposeLoader.cs (4)
653return Utils.MarshalInvoke(_getSlotCursorCoreMethodInfo, this, cursorType.RawType, inputCursor); 682Ch.Assert(cursor.Schema[0].Type.RawType == typeof(VBuffer<T>)); 807var meth = func.GetMethodInfo().GetGenericMethodDefinition().MakeGenericMethod(itemType.RawType); 814Ch.Assert(typeof(T) == type.RawType);
DataView\AppendRowsDataView.cs (1)
184return Utils.MarshalInvoke(_createTypedGetterMethodInfo, this, colType.RawType, col);
DataView\ArrayDataViewBuilder.cs (10)
69_host.CheckParam(type != null && type.RawType == typeof(T), nameof(type)); 100_host.CheckParam(itemType != null && itemType.RawType == typeof(T), nameof(itemType)); 113_host.CheckParam(itemType != null && itemType.RawType == typeof(T), nameof(itemType)); 125_host.CheckParam(itemType != null && itemType.RawType == typeof(T), nameof(itemType)); 138_host.CheckParam(itemType != null && itemType.RawType == typeof(T), nameof(itemType)); 149_host.CheckParam(itemType != null && itemType.RawType == typeof(T), nameof(itemType)); 161_host.CheckParam(itemType != null && itemType.RawType == typeof(T), nameof(itemType)); 332$"expected type: '{originColumnValue.Type.RawType}'."); 383Contracts.Assert(typeof(TOut) == type.RawType); 465Contracts.Assert(itemType.RawType == typeof(TOut));
DataView\CacheDataView.cs (5)
1221return Utils.MarshalInvoke(_createGetterDelegateMethodInfo, this, Schema[col].Type.RawType, col); 1228Ch.Assert(Schema[col].Type.RawType == typeof(TValue)); 1290pipeType = typeof(ImplVec<>).MakeGenericType(vectorType.ItemType.RawType); 1294pipeType = typeof(ImplOne<>).MakeGenericType(type.RawType); 1470Contracts.Assert(input.Schema[srcCol].Type.RawType == typeof(T));
DataView\DataViewConstructionUtils.cs (14)
86var info = Utils.MarshalInvoke(_getAnnotationInfoMethodInfo, annotation.Type.RawType, annotation.Name, annotations); 254Host.Assert(Nullable.GetUnderlyingType(outputType.GetElementType()) == vectorType.ItemType.RawType); 256Host.Assert(outputType.GetElementType() == vectorType.ItemType.RawType); 266Host.Assert(outputType.GetGenericArguments()[0] == vectorType.ItemType.RawType); 268genericType = vectorType.ItemType.RawType; 281Host.Assert(colType.RawType == Nullable.GetUnderlyingType(outputType)); 283Host.Assert(colType.RawType == outputType); 289var keyRawType = colType.RawType; 901if (itemType != annotationItemType.RawType) 905itemType.ToString(), annotationItemType.RawType.ToString()); 947Contracts.Assert(itemType == annotationVectorType.ItemType.RawType); 950return Utils.MarshalInvoke(_getVBufferGetterMethodInfo, this, annotationVectorType.ItemType.RawType) as ValueGetter<TDst>; 962Contracts.Assert(AnnotationType.RawType == typeT); 976return Utils.MarshalInvoke(_getGetterCoreMethodInfo, this, AnnotationType.RawType);
DataView\InternalSchemaDefinition.cs (2)
282if (itemType.RawType != dataItemType) 285colName, itemType.RawType, dataItemType);
DataView\LambdaColumnMapper.cs (4)
35if (typeSrc.RawType != typeof(TSrc)) 40if (typeDst.RawType != typeof(TDst)) 76.MakeGenericMethod(typeOrig.RawType, typeof(TSrc), typeof(TDst)); 111Host.Assert(typeDst.RawType == typeof(T3));
DataView\LambdaFilter.cs (2)
30if (typeSrc.RawType != typeof(TSrc)) 65.MakeGenericMethod(typeOrig.RawType, typeof(TSrc));
DataView\Transposer.cs (7)
244var type = ((ITransposeDataView)this).GetSlotType(col).ItemType.RawType; 362Ch.Assert(_view.Schema[_col].Type.RawType == typeof(T)); 519Ch.Assert(itemType.RawType == typeof(T)); 929return Utils.MarshalInvoke(_createCoreMethodInfo, type.RawType, view, col); 1011Contracts.Assert(_view.Schema[col].Type.RawType == typeof(T)); 1099Contracts.Assert(type.ItemType.RawType == typeof(T)); 1399return Utils.MarshalInvoke(_getRowCursorShimCoreMethodInfo, cursor.GetSlotType().ItemType.RawType, provider, cursor);
DataView\TypedCursor.cs (9)
145return colType is VectorDataViewType vectorType && vectorType.ItemType.RawType == itemType; 147return !(colType is VectorDataViewType) && colType.RawType == itemType; 253if (!actualType.Equals(expectedType.RawType)) 254throw Contracts.ExceptParam(nameof(actualType), $"The expected type '{expectedType.RawType}' does not match the type of the '{singleName}' member: '{actualType}'. Please change the {singleName} member to '{expectedType.RawType}'"); 386Ch.Assert(fieldType.GetGenericArguments()[0] == vectorType.ItemType.RawType); 388genericType = vectorType.ItemType.RawType; 402Ch.Assert(colType.RawType == Nullable.GetUnderlyingType(fieldType)); 404Ch.Assert(colType.RawType == fieldType);
Evaluators\EvaluatorBase.cs (2)
375return Utils.MarshalInvoke(CreateDictionary<int>, stratType.RawType, schema, stratCol, stratType, createAgg); 409Contracts.Assert(stratType.RawType == typeof(TStrat));
Evaluators\EvaluatorUtils.cs (10)
378Contracts.Check(typeSrc.RawType == typeof(TSrc)); 405return Utils.MarshalInvoke(AddTextColumn<int>, inputColType.RawType, env, 412Contracts.Check(typeSrc.RawType == typeof(TSrc)); 447return Utils.MarshalInvoke(AddKeyColumn<int>, inputColType.RawType, env, 463Contracts.CheckParam(typeof(T) == itemType.RawType, nameof(itemType), "Generic type does not match the item type"); 575if (keyValueItemType == null || keyValueItemType.RawType != typeof(T)) 578if (!(typeItemType is KeyDataViewType itemKeyType) || typeItemType.RawType != typeof(uint)) 613var keyValueMappers = Utils.MarshalInvoke(MapKeys<int>, keyValueType.RawType, views.Select(view => view.Schema).ToArray(), columnName, false, indices, keyNames); 681var keyValueMappers = Utils.MarshalInvoke(MapKeys<int>, keyValueType.RawType, views.Select(view => view.Schema).ToArray(), columnName, true, columnIndices, keyNames); 933idv = Utils.MarshalInvoke(AddVarLengthColumn<int>, vectorType.ItemType.RawType, env, idv,
Evaluators\MulticlassClassificationEvaluator.cs (1)
1061if (labelType is KeyDataViewType && (!labelCol.HasKeyValues() || labelType.RawType != typeof(uint)))
Model\Pfa\PfaUtils.cs (3)
184if (keyType.Count > 0 || keyType.RawType != typeof(ulong)) 189System.Type rawType = itemType.RawType; 232System.Type rawType = itemType.RawType;
Prediction\Calibrator.cs (1)
703getters[column.Index] = Utils.MarshalInvoke(_getPredictorGetterMethodInfo, this, type.RawType, predictorRow, column.Index);
Prediction\CalibratorCatalog.cs (1)
288setIdCol.Type is KeyDataViewType setIdType && setIdType.RawType == typeof(uint) &&
Scorers\BinaryClassifierScorer.cs (2)
72return Utils.MarshalInvoke(WrapCore<int>, keyType.ItemType.RawType, env, mapper, trainSchema); 221node.AddAttribute("to", predictedLabelCol.Value.Type.RawType);
Scorers\FeatureContributionCalculation.cs (2)
198var meth = del.GetMethodInfo().GetGenericMethodDefinition().MakeGenericMethod(typeSrc.RawType); 211return Utils.MarshalInvoke(_getValueGetterMethodInfo, this, typeSrc.RawType, input, colSrc);
Scorers\MulticlassClassificationScorer.cs (5)
145_getter = Utils.MarshalInvoke(_decodeInitMethodInfo, this, _type.ItemType.RawType, value); 187Utils.MarshalActionInvoke(SaveCore<int>, _type.ItemType.RawType, ctx); 193Contracts.Assert(_type.ItemType.RawType == typeof(T)); 235return Utils.MarshalInvoke(CreateBound<int>, _type.ItemType.RawType, env, (ISchemaBoundRowMapper)innerBound, _type, _getter, _metadataKind, _canWrap); 422return Utils.MarshalInvoke(WrapCore<int>, keyType.ItemType.RawType, env, mapper, trainSchema);
Scorers\PredictedLabelScorerBase.cs (2)
72_predColMetadata = Utils.MarshalInvoke(_keyValueMetadataFromMetadataMethodInfo, trainLabelColVecType.RawType, 81Contracts.Assert(metaCol.Type.RawType == typeof(T));
Scorers\RowToRowScorerBase.cs (1)
211return Utils.MarshalInvoke(_getGetterFromRowMethodInfo, type.RawType, row, col);
Scorers\SchemaBindablePredictorWrapper.cs (2)
163return Utils.MarshalInvoke(_getValueGetterMethodInfo, this, typeSrc.RawType, ScoreType.RawType, input, colSrc);
Transforms\ColumnBindingsBase.cs (1)
283var getter = Utils.MarshalInvoke(GetAnnotationGetterDelegate<int>, kvp.Value.RawType, inputBindings, i, kvp.Key);
Transforms\ColumnConcatenatingTransformer.cs (3)
678return Utils.MarshalInvoke(_makeIdentityGetterMethodInfo, this, OutputType.RawType, input); 680return Utils.MarshalInvoke(_makeGetterMethodInfo, this, OutputType.ItemType.RawType, input); 948castNode.AddAttribute("to", outColType.ItemType.RawType);
Transforms\ColumnCopying.cs (1)
221return Utils.MarshalInvoke(_makeGetterMethodInfo, type.RawType, input, colIndex);
Transforms\FeatureContributionCalculationTransformer.cs (1)
210return Utils.MarshalInvoke(_getValueGetterMethodInfo, this, _featureColumnType.RawType, input, ColMapNewToOld[iinfo]);
Transforms\Hashing.cs (26)
362if (srcType.RawType == typeof(uint)) 364else if (srcType.RawType == typeof(ulong)) 366else if (srcType.RawType == typeof(ushort)) 369Host.Assert(srcType.RawType == typeof(byte)); 373if (srcType.RawType == typeof(ReadOnlyMemory<char>)) 375else if (srcType.RawType == typeof(float)) 377else if (srcType.RawType == typeof(double)) 379else if (srcType.RawType == typeof(sbyte)) 381else if (srcType.RawType == typeof(short)) 383else if (srcType.RawType == typeof(int)) 385else if (srcType.RawType == typeof(long)) 387else if (srcType.RawType == typeof(byte)) 389else if (srcType.RawType == typeof(ushort)) 391else if (srcType.RawType == typeof(uint)) 393else if (srcType.RawType == typeof(ulong)) 395else if (srcType.RawType == typeof(DataViewRowId)) 398Host.Assert(srcType.RawType == typeof(bool)); 406Type rawType = srcType.ItemType.RawType; 452Host.Assert(srcType.ItemType.RawType == typeof(T)); 471Type rawType = srcType.ItemType.RawType; 1003Contracts.Assert(input.Schema[srcCol].Type.RawType == typeof(T)); 1380isZeroNode.AddAttribute("to", NumberDataViewType.Int64.RawType); 1390isZeroNode.AddAttribute("to", NumberDataViewType.Int64.RawType); 1400castNode.AddAttribute("to", NumberDataViewType.UInt32.RawType); 1434var t = NumberDataViewType.Int64.RawType; 1517t = t.MakeGenericType(itemType.RawType);
Transforms\KeyToValue.cs (6)
243new Type[] { srcItemType.RawType, types[iinfo].GetItemType().RawType }); 255Host.Assert(keyItemType.RawType == typeof(TKey)); 256Host.Assert(valItemType.RawType == typeof(TValue)); 320Parent.Host.Assert(typeKey.RawType == typeof(TKey)); 321Parent.Host.Assert(TypeOutput.RawType == typeof(TValue)); 540castNode.AddAttribute("to", TypeOutput.RawType);
Transforms\MetadataDispatcher.cs (4)
107Contracts.Check(type.RawType == typeof(TValue), "Incompatible types"); 129Contracts.Check(type.RawType == typeof(TValue), "Incompatible types"); 413Contracts.CheckParam(type.RawType == typeof(TValue), nameof(type), "Given type doesn't match type parameter"); 428Contracts.CheckParam(type.RawType == typeof(TValue), nameof(type), "Given type doesn't match type parameter");
Transforms\NAFilter.cs (4)
281genericArgument = vecType.ItemType.RawType; 286genericArgument = info.Type.RawType; 297Contracts.Assert(info.Type.RawType == typeof(T)); 309Contracts.Assert(info.Type.RawType == typeof(VBuffer<T>));
Transforms\NormalizeColumn.cs (2)
465Host.Check(typeSrc.RawType == typeof(TFloat)); 587Host.Check(typeSrc.RawType == typeof(TFloat));
Transforms\NormalizeColumnDbl.cs (6)
667host.Check(typeSrc.RawType == typeof(TFloat), "The column type must be R8."); 731host.Check(typeSrc.ItemType.RawType == typeof(TFloat), "The column type must be vector of Double."); 992host.Check(typeSrc.RawType == typeof(TFloat), "The column type must be Double."); 1057host.Check(typeSrc.ItemType.RawType == typeof(TFloat), "The column type must be vector of Double."); 1175host.Check(typeSrc.RawType == typeof(TFloat), "The column type must be Double."); 1260host.Check(typeSrc.ItemType.RawType == typeof(TFloat), "The column type must be vector of Double.");
Transforms\NormalizeColumnSng.cs (6)
825host.Check(typeSrc.RawType == typeof(TFloat), "The column type must be Single."); 888host.Check(typeSrc.ItemType.RawType == typeof(TFloat), "The column type must be vector of Single."); 1152host.Check(typeSrc.RawType == typeof(TFloat), "The column type must be Single."); 1217host.Check(typeSrc.ItemType.RawType == typeof(TFloat), "The column type must be vector of Single."); 1336host.Check(typeSrc.RawType == typeof(TFloat), "The column type must be Single."); 1421host.Check(typeSrc.ItemType.RawType == typeof(TFloat), "The column type must be vector of Single.");
Transforms\Normalizer.cs (1)
476itemType.RawType.TryGetDataKind(out InternalDataKind itemKind);
Transforms\RangeFilter.cs (1)
337var methodInfo = del.GetMethodInfo().GetGenericMethodDefinition().MakeGenericMethod(filter._type.RawType);
Transforms\RowShufflingTransformer.cs (4)
380pipeType = typeof(ImplVec<>).MakeGenericType(vectorType.ItemType.RawType); 384pipeType = typeof(ImplOne<>).MakeGenericType(type.RawType); 680return Utils.MarshalInvoke(_createGetterDelegateMethodInfo, this, Schema[col].Type.RawType, col); 687Ch.Assert(Schema[col].Type.RawType == typeof(TValue));
Transforms\SlotsDroppingTransformer.cs (4)
745return Utils.MarshalInvoke(_makeOneTrivialGetterMethodInfo, this, _srcTypes[iinfo].RawType); 766return Utils.MarshalInvoke(_makeVecTrivialGetterMethodInfo, this, vectorType.ItemType.RawType); 787return Utils.MarshalInvoke(_makeVecGetterMethodInfo, this, vectorType.ItemType.RawType, input, iinfo); 821return Utils.MarshalInvoke(_getSrcGetterMethodInfo, this, typeDst.RawType, row, iinfo);
Transforms\TransformBase.cs (1)
708return Utils.MarshalInvoke(_getSrcGetterMethodInfo, this, typeDst.RawType, row, iinfo);
Transforms\TypeConverting.cs (1)
371ectx.Assert(KeyDataViewType.IsValidDataType(key.RawType));
Transforms\ValueMapping.cs (14)
304if (valueType.RawType == typeof(uint)) 309else if (valueType.RawType == typeof(ulong)) 810var method = del.Method.GetGenericMethodDefinition().MakeGenericMethod(keyColumn.Type.RawType, valueColumn.Type.RawType); 901return Utils.MarshalInvoke(_getVectorMethodInfo, vectorType.ItemType.RawType, _mapping[key]); 903return Utils.MarshalInvoke(_getValueMethodInfo, ValueColumn.Type.RawType, _mapping[key]); 1090castNode.AddAttribute("to", itemType.RawType); 1222castNode.AddAttribute("to", typeValue.RawType); 1228castNode.AddAttribute("to", typeValue.RawType); 1234castNode.AddAttribute("to", typeValue.RawType); 1240castNode.AddAttribute("to", typeValue.RawType); 1246castNode.AddAttribute("to", typeValue.RawType); 1256castNode.AddAttribute("to", typeValue.RawType); 1266castNode.AddAttribute("to", typeValue.RawType);
Transforms\ValueToKeyMappingTransformer.cs (2)
762return Utils.MarshalInvoke(_makeGetterMethodInfo, this, type.RawType, input, iinfo); 893InternalDataKindExtensions.TryGetDataKind(_parent._unboundMaps[iinfo].OutputType.RawType, out dataKind);
Transforms\ValueToKeyMappingTransformerImpl.cs (12)
57return Utils.MarshalInvoke(_createCoreMethodInfo, itemType.RawType, itemType, sorted); 64Contracts.Assert(type.RawType == typeof(T)); 167Contracts.Assert(type.RawType == typeof(T)); 297return Utils.MarshalInvoke(CreateVec<int>, bldr.ItemType.RawType, row, col, count, bldr); 298return Utils.MarshalInvoke(CreateOne<int>, bldr.ItemType.RawType, row, col, autoConvert, count, bldr); 536return Utils.MarshalInvoke(LoadCodecCore<int>, codec.Type.RawType, ctx, ectx, codec, count); 767Contracts.Assert(ItemType.RawType == typeof(T)); 843return Utils.MarshalInvoke(CreateCore<int>, map.ItemType.RawType, host, schema, map, infos, textMetadata, iinfo); 1100TypedMap.ItemType.GetKeyCountAsInt32(_host) == 0 || !Utils.MarshalInvoke(_addMetadataCoreMethodInfo, this, srcMetaType.ItemType.RawType, srcMetaType.ItemType, builder)) 1110_host.Assert(srcMetaType.RawType == typeof(TMeta)); 1181TypedMap.ItemType.GetKeyCountAsInt32(_host) == 0 || !Utils.MarshalInvoke(_writeTextTermsCoreMethodInfo, this, srcMetaType.ItemType.RawType, srcMetaType.ItemType, writer)) 1191_host.Assert(srcMetaType.RawType == typeof(TMeta));
Utilities\ColumnCursor.cs (4)
57if (colType.RawType == typeof(T)) 67var meth = del.Method.GetGenericMethodDefinition().MakeGenericMethod(typeof(T), colType.RawType); 76if (elementType == colVectorType.ItemType.RawType) 88var meth = del.Method.GetGenericMethodDefinition().MakeGenericMethod(elementType, colVectorType.ItemType.RawType);
Microsoft.ML.DataView (24)
DataViewSchema.cs (6)
205Utils.MarshalActionInvoke(CheckGetter<int>, schema[i].Type.RawType, getter); 303if (type.RawType != typeof(TValue)) 304throw new ArgumentException($"{nameof(type)}.{nameof(type.RawType)} must be of type '{typeof(TValue).FullName}'.", nameof(type)); 327Utils.MarshalActionInvoke(AddDelegate<int>, type.RawType, name, type, getter, annotations); 344if (type.RawType != typeof(TValue)) 345throw new ArgumentException($"{nameof(type)}.{nameof(type.RawType)} must be of type '{typeof(TValue).FullName}'.", nameof(type));
DataViewType.cs (7)
34/// Code should not assume that a <see cref="RawType"/> uniquely identifiers a <see cref="DataViewType"/>. 36/// <see cref="RawType"/> of <see cref="uint"/>, but both are very different in the types of information conveyed in that number. 80if (typeof(IDisposable).GetTypeInfo().IsAssignableFrom(RawType.GetTypeInfo())) 81throw new ArgumentException("A " + nameof(PrimitiveDataViewType) + " cannot have a disposable " + nameof(RawType), nameof(rawType)); 276Debug.Assert(other == null || !(other is NumberDataViewType) || other.RawType != RawType); 280public override string ToString() => RawType.Name;
KeyDataViewType.cs (9)
105if (RawType == typeof(uint)) 107else if (RawType == typeof(ulong)) 109else if (RawType == typeof(ushort)) 111else if (RawType == typeof(byte)) 130/// Checks if the other item is the type of <see cref="KeyDataViewType"/>, if the <see cref="DataViewType.RawType"/> 142if (RawType != tmp.RawType) 151/// Checks if any object is the type of <see cref="KeyDataViewType"/>, if the <see cref="DataViewType.RawType"/> 165return Hashing.CombineHash(RawType.GetHashCode(), Count.GetHashCode());
SchemaDebuggerProxy.cs (1)
45var value = Utils.MarshalInvoke(GetValue<DataViewSchema.Column>, column.Type.RawType, annotations, column);
VectorType.cs (1)
91return typeof(VBuffer<>).MakeGenericType(itemType.RawType);
Microsoft.ML.Ensemble (2)
PipelineEnsemble.cs (2)
612return Utils.MarshalInvoke(CheckKeyLabelColumnCore<int>, mdType.ItemType.RawType, env, models, (KeyDataViewType)labelType, schema, labelCol.Index, mdType); 648env.Assert(keyValuesType.ItemType.RawType == typeof(T));
Microsoft.ML.Fairlearn (4)
Metrics\FairlearnMetricCatalog.cs (4)
197else if (column.Type.RawType == typeof(bool)) 203else if (column.Type.RawType == typeof(int)) 209else if (column.Type.RawType == typeof(float)) 215else if (column.Type.RawType == typeof(DateTime))
Microsoft.ML.FastTree (1)
TreeEnsembleFeaturizer.cs (1)
811return Utils.MarshalInvoke(AppendFloatMapper<int>, labelType.RawType, env, ch, input, labelName, (KeyDataViewType)labelType,
Microsoft.ML.ImageAnalytics (1)
VectorToImageTransform.cs (1)
347Contracts.Assert(typeof(TValue) == srcType.RawType);
Microsoft.ML.IntegrationTests (3)
Common.cs (3)
51Assert.Equal(types[column.Name], column.Type.RawType); 116(schemaPair.Item1.Type.RawType == schemaPair.Item2.Type.RawType));
Microsoft.ML.OnnxConverter (2)
OnnxUtils.cs (2)
347rawType = vectorType.ItemType.RawType; 349rawType = type.RawType;
Microsoft.ML.OnnxTransformer (15)
OnnxMapType.cs (4)
27DataViewTypeManager.Register(this, RawType, new OnnxMapTypeAttribute(keyType, valueType)); 33return RawType == other.RawType; 40return RawType.GetHashCode();
OnnxSequenceType.cs (4)
33DataViewTypeManager.Register(this, RawType, new OnnxSequenceTypeAttribute(elementType)); 39return RawType == other.RawType; 46return RawType.GetHashCode();
OnnxTransform.cs (3)
626var elemRawType = vectorType.ItemType.RawType; 635var type = _parent.Model.ModelInfo.OutputsInfo[_parent.MapDataViewColumnToOnnxOutputTensor(iinfo)].DataViewType.RawType; 801var type = input.Schema[colIndex].Type.RawType;
OnnxTypeParser.cs (4)
219/// The returned <see cref="DataViewType.RawType"/> should match the type system in ONNXRuntime's C# APIs. 283/// The returned <see cref="DataViewType.RawType"/> should match the type system in ONNXRuntime's C# APIs. 299var type = GetScalarDataViewType(typeProto.TensorType.ElemType).RawType; 320var type = GetScalarDataViewType(typeProto.TensorType.ElemType).RawType;
Microsoft.ML.Parquet (3)
PartitionedFileLoader.cs (3)
551_subGetters[i] = MarshalGetter(_subCursor.GetGetter<DataViewSchema.Column>, type.RawType, _subCursor.Schema[i]); 590getters[i] = Utils.MarshalInvoke(_createSubGetterDelegateCoreMethodInfo, this, type.RawType, i); 595getters[i] = Utils.MarshalInvoke(_createGetterDelegateCoreMethodInfo, this, type.RawType, idx, type);
Microsoft.ML.PerformanceTests (1)
HashBench.cs (1)
58if (type.RawType != typeof(T))
Microsoft.ML.Predictor.Tests (2)
TestTransposer.cs (2)
30Assert.Equal(typeof(T), itemType.RawType); 78Assert.True(typeof(T) == type.ItemType.RawType, $"{desc} had wrong type for slot cursor");
Microsoft.ML.Recommender (3)
MatrixFactorizationPredictor.cs (2)
96_host.Assert(matrixColumnIndexType.RawType == typeof(uint)); 97_host.Assert(matrixRowIndexType.RawType == typeof(uint));
RecommenderUtils.cs (1)
36return keyType?.Count > 0 && type.RawType == typeof(uint);
Microsoft.ML.Samples (2)
Dynamic\TensorFlow\TextClassification.cs (2)
68featuresType.ItemType.RawType, featuresType.Dimensions[0]); 73"Prediction/Softmax", predictionType.ItemType.RawType,
Microsoft.ML.Samples.GPU (2)
docs\samples\Microsoft.ML.Samples\Dynamic\TensorFlow\TextClassification.cs (2)
68featuresType.ItemType.RawType, featuresType.Dimensions[0]); 73"Prediction/Softmax", predictionType.ItemType.RawType,
Microsoft.ML.StandardTrainers (1)
Standard\MulticlassClassification\MetaMulticlassTrainer.cs (1)
94Host.Assert(type.RawType == typeof(T));
Microsoft.ML.TensorFlow (2)
TensorflowTransform.cs (2)
225return Utils.MarshalInvoke(CreateTensorValueGetter<int>, type.RawType, input, isVector, colIndex, tfShape); 647var type = Tf2MlNetType(_parent.TFOutputTypes[iinfo]).RawType;
Microsoft.ML.TestFramework (2)
DataPipe\TestDataPipeBase.cs (2)
885Type rawType = type.RawType; 935Type itemType = vectorType.ItemType.RawType;
Microsoft.ML.Tests (6)
Transformers\ValueMappingTests.cs (6)
380Assert.Equal(typeof(int), dColumn.ItemType.RawType); 383Assert.Equal(typeof(int), eColumn.ItemType.RawType); 386Assert.Equal(typeof(int), fColumn.ItemType.RawType); 411Assert.Equal(typeof(uint), dColumn.ItemType.RawType); 414Assert.Equal(typeof(uint), eColumn.ItemType.RawType); 417Assert.Equal(typeof(uint), fColumn.ItemType.RawType);
Microsoft.ML.TorchSharp (16)
AutoFormerV2\ObjectDetectionTrainer.cs (6)
482if (labelCol.Kind != SchemaShape.Column.VectorKind.VariableVector || labelCol.ItemType.RawType != typeof(UInt32)) 488if (boundingBoxCol.Kind != SchemaShape.Column.VectorKind.VariableVector || boundingBoxCol.ItemType.RawType != typeof(Single)) 494if (imageCol.ItemType.RawType != typeof(MLImage)) 626Microsoft.ML.Internal.Utilities.Utils.MarshalActionInvoke(SaveLabelValues<int>, labelColType.ItemType.RawType, ctx); 701var labelGetter = Microsoft.ML.Internal.Utilities.Utils.MarshalInvoke(_decodeInitMethodInfo, vecType.ItemType.RawType, value); 756var getter = Microsoft.ML.Internal.Utilities.Utils.MarshalInvoke(_makeLabelAnnotationGetter, this, keyType.ItemType.RawType, _parent.LabelColumn);
NasBert\NasBertTrainer.cs (2)
521var getter = Microsoft.ML.Internal.Utilities.Utils.MarshalInvoke(_makeLabelAnnotationGetter, this, keyType.ItemType.RawType, Parent.LabelColumn); 543var getter = Microsoft.ML.Internal.Utilities.Utils.MarshalInvoke(_makeLabelAnnotationGetter, this, keyType.ItemType.RawType, Parent.LabelColumn);
NasBert\NerTrainer.cs (2)
282Microsoft.ML.Internal.Utilities.Utils.MarshalActionInvoke(SaveLabelValues<int>, labelColType.ItemType.RawType, ctx); 347var labelGetter = Microsoft.ML.Internal.Utilities.Utils.MarshalInvoke(_decodeInitMethodInfo, vecType.ItemType.RawType, value);
NasBert\TextClassificationTrainer.cs (2)
219Microsoft.ML.Internal.Utilities.Utils.MarshalActionInvoke(SaveLabelValues<int>, labelColType.ItemType.RawType, ctx); 284var labelGetter = Microsoft.ML.Internal.Utilities.Utils.MarshalInvoke(_decodeInitMethodInfo, vecType.ItemType.RawType, value);
Roberta\QATrainer.cs (4)
533if (contextCol.Kind != SchemaShape.Column.VectorKind.Scalar || contextCol.ItemType.RawType != typeof(ReadOnlyMemory<char>)) 539if (questionCol.Kind != SchemaShape.Column.VectorKind.Scalar || questionCol.ItemType.RawType != typeof(ReadOnlyMemory<char>)) 545if (answerCol.Kind != SchemaShape.Column.VectorKind.Scalar || answerCol.ItemType.RawType != typeof(ReadOnlyMemory<char>)) 551if (answerIndexCol.Kind != SchemaShape.Column.VectorKind.Scalar || answerIndexCol.ItemType.RawType != typeof(int))
Microsoft.ML.Transforms (55)
CountFeatureSelection.cs (2)
355var methodInfo = del.GetMethodInfo().GetGenericMethodDefinition().MakeGenericMethod(colType.RawType); 367var methodInfo = del.GetMethodInfo().GetGenericMethodDefinition().MakeGenericMethod(colType.ItemType.RawType);
CustomMappingTransformer.cs (1)
161result[i] = Utils.MarshalInvoke(GetDstGetter<int>, dstRow.Schema[i].Type.RawType, dstRow, i, refresh);
Expression\CodeGen.cs (3)
68types[v.Index] = v.Type.RawType; 70types[node.Vars.Length] = node.ResultType.RawType; 76_meth = new MethodGenerator("lambda", typeof(Exec), node.ResultType.RawType, types);
GroupTransform.cs (2)
431IsSameKey = Utils.MarshalInvoke(_makeSameCheckerMethodInfo, type.RawType, row, col); 456var cons = type.MakeGenericType(colType.RawType).GetConstructor(new[] { typeof(DataViewRow), typeof(int) });
HashJoiningTransform.cs (1)
493return Utils.MarshalInvoke(mi, this, itemType.RawType, input, iinfo);
MissingValueIndicatorTransformer.cs (3)
250=> Utils.MarshalInvoke(_composeGetterOneMethodInfo, this, _infos[iinfo].InputType.RawType, input, iinfo); 469Type rawType = (inputType is VectorDataViewType vectorType) ? vectorType.ItemType.RawType : inputType.RawType;
MissingValueReplacing.cs (7)
243var meth = func.GetMethodInfo().GetGenericMethodDefinition().MakeGenericMethod(savedVectorType.ItemType.RawType); 249Host.Assert(repValue.GetType() == _replaceTypes[i].RawType || repValue.GetType() == _replaceTypes[i].GetItemType().RawType); 489Host.Assert(type.RawType == typeof(T) || type.GetItemType().RawType == typeof(T)); 519Host.Assert(repValue.GetType() == _replaceTypes[iinfo].RawType || repValue.GetType() == _replaceTypes[iinfo].GetItemType().RawType); 637=> Utils.MarshalInvoke(_composeGetterOneMethodInfo, this, _infos[iinfo].TypeSrc.RawType, input, iinfo); 878rawType = vectorType.ItemType.RawType; 880rawType = type.RawType;
MissingValueReplacingUtils.cs (18)
25if (type.RawType == typeof(float)) 27else if (type.RawType == typeof(double)) 32if (type.RawType == typeof(float)) 34else if (type.RawType == typeof(double)) 39if (type.RawType == typeof(float)) 41else if (type.RawType == typeof(double)) 54if (vectorType.ItemType.RawType == typeof(float)) 56else if (vectorType.ItemType.RawType == typeof(double)) 61if (vectorType.ItemType.RawType == typeof(float)) 63else if (vectorType.ItemType.RawType == typeof(double)) 68if (vectorType.ItemType.RawType == typeof(float)) 70else if (vectorType.ItemType.RawType == typeof(double)) 79if (vectorType.ItemType.RawType == typeof(float)) 81else if (vectorType.ItemType.RawType == typeof(double)) 86if (vectorType.ItemType.RawType == typeof(float)) 88else if (vectorType.ItemType.RawType == typeof(double)) 93if (vectorType.ItemType.RawType == typeof(float)) 95else if (vectorType.ItemType.RawType == typeof(double))
MutualInformationFeatureSelection.cs (1)
556var methodInfo = del.GetMethodInfo().GetGenericMethodDefinition().MakeGenericMethod(labelType.RawType);
OptionalColumnTransform.cs (5)
413return Utils.MarshalInvoke(_makeGetterVecMethodInfo, this, vectorType.ItemType.RawType, vectorType.Size); 414return Utils.MarshalInvoke(_makeGetterOneMethodInfo, this, columnType.RawType); 501return Utils.MarshalInvoke(_makeGetterVecMethodInfo, this, vectorType.ItemType.RawType, vectorType.Size); 502return Utils.MarshalInvoke(_makeGetterOneMethodInfo, this, columnType.RawType); 546Type type = columnType.RawType;
RandomFourierFeaturizing.cs (1)
730if (col.ItemType.RawType != typeof(float) || col.Kind != SchemaShape.Column.VectorKind.Vector)
StatefulCustomMappingTransformer.cs (2)
189getters[iinfo] = Utils.MarshalInvoke(GetDstGetter<int>, col.Type.RawType, dstRow, col.Name, refresh); 308_getters[iinfo] = Utils.MarshalInvoke(_parent.GetDstGetter<int>, _parent._bindings.Schema[i].Type.RawType, dstRow, _parent._bindings.Schema[i].Name, refresh);
Text\LdaTransform.cs (1)
1328if (col.ItemType.RawType != typeof(float) || col.Kind == SchemaShape.Column.VectorKind.Scalar)
Text\NgramHashingTransformer.cs (2)
1189if (itemKeyType.Count == 0 && !NgramUtils.IsValidNgramRawType(itemKeyType.RawType)) 1201if (!NgramUtils.IsValidNgramRawType(col.ItemType.RawType))
Text\NgramTransform.cs (5)
787((vectorType.RawType == typeof(VBuffer<UInt32>)) || (vectorType.RawType == typeof(VBuffer<UInt64>)) || 788(vectorType.RawType == typeof(VBuffer<UInt16>)))) 965if (itemKeyType.Count == 0 && !NgramUtils.IsValidNgramRawType(itemKeyType.RawType)) 977if (!NgramUtils.IsValidNgramRawType(col.ItemType.RawType))
UngroupTransform.cs (1)
506var rawItemType = info.ItemType.RawType;
Microsoft.ML.Vision (2)
ImageClassificationTrainer.cs (2)
822if (labelColumn.Type.RawType != typeof(uint)) 826labelColumn.Type.RawType.ToString());