42 references to Check
Microsoft.ML.Core (42)
CommandLine\CmdParser.cs (3)
1487Contracts.Check(!IsCollection || AllowMultiple, "Collection arguments must allow multiple"); 1488Contracts.Check(!Unique || IsCollection, "Unique only applicable to collection arguments"); 1544Contracts.Check(_signatureType != null, "ComponentFactory Arguments need a SignatureType set.");
ComponentModel\LoadableClassAttribute.cs (1)
209Contracts.Check(sigType.BaseType == typeof(System.MulticastDelegate), "LoadableClass signature type must be a delegate type");
Data\AnnotationUtils.cs (1)
381Contracts.Check(colIndex >= 0, nameof(colIndex));
Data\IEstimator.cs (1)
89Contracts.Check(source.IsValid, nameof(source));
Data\ModelHeader.cs (1)
643Contracts.Check(Utils.Size(modelSignature) == 8, "Model signature must be eight characters");
EntryPoints\ModuleArgs.cs (14)
165Contracts.Check(_inf == null, 167Contracts.Check(_max == null || ((IComparable)_max).CompareTo(value) != -1, 169Contracts.Check(_sup == null || ((IComparable)_sup).CompareTo(value) == 1, 184Contracts.Check(_sup == null, 186Contracts.Check(_min == null || ((IComparable)_min).CompareTo(value) != 1, 188Contracts.Check(_inf == null || ((IComparable)_inf).CompareTo(value) == -1, 203Contracts.Check(_min == null, 205Contracts.Check(_max == null || ((IComparable)_max).CompareTo(value) == 1, 207Contracts.Check(_sup == null || ((IComparable)_sup).CompareTo(value) == 1, 222Contracts.Check(_max == null, 224Contracts.Check(_min == null || ((IComparable)_min).CompareTo(value) == -1, 226Contracts.Check(_inf == null || ((IComparable)_inf).CompareTo(value) == -1, 237Contracts.Check(val is IComparable, "Type for range attribute must support IComparable"); 241Contracts.Check(_type == val.GetType(), "All Range attribute values must be of the same type");
Utilities\HybridMemoryStream.cs (8)
156Contracts.Check(!_disposed, "Stream already disposed"); 163Contracts.Check(_memStream.CanRead, "attempt to perform operation on closed stream"); 189Contracts.Check(!_disposed, "Stream already disposed"); 199Contracts.Check(!_disposed, "Stream already disposed"); 206Contracts.Check(!_disposed, "Stream already disposed"); 213Contracts.Check(!_disposed, "Stream already disposed"); 226Contracts.Check(!_disposed, "Stream already disposed"); 233Contracts.Check(!_disposed, "Stream already disposed");
Utilities\MathUtils.cs (1)
61Contracts.Check(x.Length == y.Length, "Input and output must be same length.");
Utilities\MinWaiter.cs (2)
78Contracts.Check(_maxWaiters > 0, "All waiters have been retired, Wait should not be called at this point"); 102Contracts.Check(_maxWaiters > 0, "Attempt to retire more waiters than were initially declared");
Utilities\ReservoirSampler.cs (2)
164Contracts.Check(!_locked, "Cannot continue to sample after Lock() has been called"); 248Contracts.Check(_locked, "Call Lock() before the call to GetSample()");
Utilities\Stats.cs (2)
29Contracts.Check(rangeSize <= (long)int.MaxValue * int.MaxValue, 128Contracts.Check(alphas.Length == result.Length,
Utilities\Utils.cs (1)
770Contracts.Check(schema.Count > 0, nameof(schema));
Utilities\VBufferUtils.cs (5)
115Contracts.Check(a.Length == b.Length, "Vectors must have the same dimensionality."); 166Contracts.Check(a.Length == b.Length, "Vectors must have the same dimensionality."); 591Contracts.Check(src.Length == dst.Length, "Vectors must have the same dimensionality."); 878Contracts.Check(src.Length == dst.Length, "Vectors must have the same dimensionality."); 1169Contracts.Check(a.Length == b.Length, "Vectors must have the same dimensionality.");