29 references to CheckDecode
Microsoft.ML.Core (1)
Data\Repository.cs (1)
540ExceptionContext.CheckDecode(entry.Length < int.MaxValue, "Repository stream too large to read into memory");
Microsoft.ML.Data (26)
DataLoadSave\Binary\BinaryLoader.cs (15)
255_ectx.CheckDecode(0 <= compLen, "negative compressed block length detected"); 256_ectx.CheckDecode(0 <= decompLen, "negative decompressed block length detected"); 261_ectx.CheckDecode(Header.HeaderSize <= offset && offset <= _parent._header.TailOffset - compLen, "block offset out of range"); 326ch.CheckDecode(0 < mtocCount && mtocCount < int.MaxValue, 337ch.CheckDecode(!string.IsNullOrEmpty(kind), "Metadata kind must be non-empty string"); 338ch.CheckDecode(kinds.Add(kind), "Duplicate metadata kind read from file"); 346ch.CheckDecode(Header.HeaderSize <= blockOffset && blockOffset <= _parent._header.TailOffset, 349ch.CheckDecode(ublockSize <= long.MaxValue, "Metadata block size out of range"); 351ch.CheckDecode(0 < blockSize && blockSize <= _parent._header.TailOffset - blockOffset, 1047_host.CheckDecode(header.Signature == Header.SignatureValue, 1077_host.CheckDecode(header.RowCount >= 0, "Row count cannot be negative"); 1078_host.CheckDecode(header.ColumnCount >= 0, "Column count cannot be negative"); 1088_host.CheckDecode(tailSig == Header.TailSignatureValue, "Incorrect tail signature"); 1129ch.CheckDecode(Header.HeaderSize <= lookupOffset && lookupOffset <= _header.TailOffset - 16 * lookupLen, 1133ch.CheckDecode(metadataTocOffset == 0 || Header.HeaderSize <= metadataTocOffset && metadataTocOffset <= _header.TailOffset,
DataLoadSave\TransformerChain.cs (1)
296env.CheckDecode(roles != null, "Predictor model must contain role mappings");
DataLoadSave\Transpose\TransposeLoader.cs (4)
575_host.CheckDecode(header.Signature == Header.SignatureValue, 596_host.CheckDecode(header.RowCount >= 0, "Row count cannot be negative"); 597_host.CheckDecode(header.ColumnCount >= 0, "Column count cannot be negative"); 607_host.CheckDecode(tailSig == Header.TailSignatureValue, "Incorrect tail signature");
Dirty\ModelParametersBase.cs (1)
44Host.CheckDecode(cbFloat == sizeof(float), "This file was saved by an incompatible version");
EntryPoints\PredictorModelImpl.cs (2)
52env.CheckDecode(roles != null, "Predictor model must contain role mappings"); 56env.CheckDecode(Predictor != null, "Predictor model must contain a predictor");
Utilities\ModelFileUtils.cs (3)
193env.CheckDecode(ent != null, "Loader is not found."); 314h.CheckDecode(!string.IsNullOrWhiteSpace(roleStr), "Role name must not be empty"); 315h.CheckDecode(!string.IsNullOrWhiteSpace(colStr), "Column name must not be empty");
Microsoft.ML.Mkl.Components (2)
VectorWhitening.cs (2)
238ectx.CheckDecode(Utils.Size(model) == valueCount * valueCount, "Invalid model size."); 240ectx.CheckDecode(FloatUtils.IsFinite(model[i]), "Found NaN or infinity in the model.");