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