205 references to Except
Microsoft.ML.Core (9)
ComponentModel\ComponentCatalog.cs (1)
1139
throw env.
Except
($"Unable to locate an extension for the contract '{contractName}'. Ensure you have called {nameof(ComponentCatalog)}.{nameof(ComponentCatalog.RegisterAssembly)} with the Assembly that contains a class decorated with a '{attributeType.FullName}'.");
Data\AnnotationUtils.cs (1)
123
public static Exception ExceptGetAnnotation(this IExceptionContext ctx) => ctx.
Except
("Invalid call to GetAnnotation");
Data\IFileHandle.cs (4)
154
throw _ectx.
Except
("SimpleFileHandle has already been disposed");
164
throw _ectx.
Except
("CreateWriteStream called multiple times on SimpleFileHandle");
180
throw _ectx.
Except
("SimpleFileHandle hasn't been written yet");
185
throw _ectx.
Except
("Write stream for SimpleFileHandle hasn't been disposed");
Data\ProgressReporter.cs (1)
406
throw _ectx.
Except
("Event sent after the calculation lifetime expired.");
Utilities\Contracts.cs (1)
496
throw
Except
(ctx, msg);
Utilities\ResourceManagerUtils.cs (1)
287
return ch.
Except
("Download timed out");
Microsoft.ML.Data (100)
Commands\CrossValidationCommand.cs (1)
217
throw ch.
Except
("No overall metrics found");
Commands\EvaluateCommand.cs (1)
249
throw ch.
Except
("No overall metrics found");
Commands\TestCommand.cs (1)
126
throw ch.
Except
("No overall metrics found");
Commands\TrainTestCommand.cs (1)
216
throw ch.
Except
("No overall metrics found");
Data\DataViewUtils.cs (2)
1131
throw Ch.
Except
($"Invalid TValue: '{typeof(TValue)}', " +
1322
throw Ch.
Except
($"Invalid TValue: '{typeof(TValue)}', " +
Data\RowCursorUtils.cs (1)
456
throw ectx.
Except
($"Could not find column '{name}'");
DataLoadSave\Binary\BinaryLoader.cs (2)
2042
throw Ch.
Except
($"Invalid TValue: '{typeof(TValue)}', " +
2056
ValueGetter<T> del = (ref T value) => throw Ch.
Except
(RowCursorUtils.FetchValueStateError);
DataLoadSave\Database\DatabaseLoader.cs (1)
53
throw _host.
Except
("DatabaseLoader requires at least one Column");
DataLoadSave\Database\DatabaseLoaderCursor.cs (1)
166
throw Ch.
Except
($"Invalid TValue in GetGetter: '{typeof(TValue)}', " +
DataLoadSave\Text\TextLoader.cs (2)
1169
throw _host.
Except
("TextLoader options embedded in the file are invalid");
1594
throw host.
Except
($"{(memberInfo is FieldInfo ? "Field" : "Property")} '{memberInfo.Name}' is missing the {nameof(LoadColumnAttribute)} attribute");
DataLoadSave\Text\TextLoaderCursor.cs (1)
325
throw Ch.
Except
($"Invalid TValue in GetGetter: '{typeof(TValue)}', " +
DataLoadSave\TransformWrapper.cs (1)
43
void ICanSaveModel.Save(ModelSaveContext ctx) => throw _host.
Except
("Saving is not permitted.");
DataLoadSave\Transpose\TransposeLoader.cs (2)
696
throw Ch.
Except
($"Invalid TValue: '{typeof(TValue)}', " +
890
throw Ch.
Except
($"Invalid TValue: '{typeof(TValue)}', " +
DataView\AppendRowsDataView.cs (1)
196
throw Ch.
Except
($"Invalid TValue in GetGetter: '{typeof(TValue)}', " +
DataView\ArrayDataViewBuilder.cs (1)
331
throw Ch.
Except
($"Invalid TValue: '{typeof(TValue)}', " +
DataView\BatchDataViewMapperBase.cs (1)
125
throw Ch.
Except
($"Invalid TValue in GetGetter: '{typeof(TValue)}', " +
DataView\CacheDataView.cs (2)
127
throw env.
Except
("Prefetch array had column indices out of range");
1212
throw Ch.
Except
($"Invalid TValue: '{typeof(TValue)}', " +
DataView\DataViewConstructionUtils.cs (3)
73
throw env.
Except
($"Type should contain a member named {name}");
437
throw Host.
Except
($"Invalid TValue in GetGetter for column #{column}: '{typeof(TValue)}', " +
741
throw Ch.
Except
("Encountered null when iterating over data, this is not supported.");
DataView\EmptyDataView.cs (2)
62
return (ref DataViewRowId val) => throw Ch.
Except
(RowCursorUtils.FetchValueStateError);
82
return (ref TValue value) => throw Ch.
Except
(RowCursorUtils.FetchValueStateError);
DataView\Transposer.cs (2)
320
throw Ch.
Except
($"Invalid TValue: '{typeof(TValue)}', " +
1507
throw Ch.
Except
($"Invalid TValue: '{typeof(TValue)}', " +
EntryPoints\EntryPointNode.cs (23)
307
throw _ectx.
Except
($"Variable '{v.Name}' is used as {v.Type} and as {type}");
334
throw _ectx.
Except
($"Variable '{v.Name}' is used as {v.Type} and as {type}");
361
throw _ectx.
Except
($"Duplicate variable '{kvp.Key}' in subgraph.");
368
throw _ectx.
Except
($"Variable with name '{newName}' already exists in subgraph.");
370
throw _ectx.
Except
($"Variable with name '{oldName}' not found in subgraph.");
442
throw _host.
Except
("Stage ID must be alphanumeric.");
462
throw _host.
Except
("Cost cannot be negative.");
484
throw _host.
Except
($"Entry point '{entryPointName}' not found");
500
throw _host.
Except
($"The following required inputs were not provided: {String.Join(", ", missing)}");
629
throw _host.
Except
($"Unexpected input name: '{pair.Key}'");
631
throw _host.
Except
($"Unexpected input variable type: {valueType}");
647
throw _host.
Except
($"Input {pair.Key} may ONLY contain variables.");
651
throw _host.
Except
($"Unexpected input name: '{pair.Key}'");
673
throw _host.
Except
($"Unexpected input: '{pair.Key}'");
685
throw _host.
Except
("Only variables allowed as outputs");
690
throw _host.
Except
($"Output '{pair.Key}' can only be bound to a variable");
694
throw _host.
Except
($"Unexpected output name: '{pair.Key}");
697
throw _host.
Except
($"Output '{pair.Key}' has invalid type");
938
throw _host.
Except
($"Invalid parameter '{paramName}': parameter does not exist.");
940
throw _host.
Except
($"Invalid parameter '{paramName}': only simple parameters are supported.");
952
throw _host.
Except
($"Invalid parameter '{paramName}': parameter does not exist.");
960
throw _host.
Except
($"Key {uniqueName} already exists in binding map.");
1076
throw ectx.
Except
($"Unable to parse variable string '{jsonString}'");
EntryPoints\InputBuilder.cs (9)
447
throw ectx.
Except
($"Requested value '{value.Value<string>()}' is not a member of the Enum type '{type.Name}'");
499
throw ectx.
Except
($"Unsupported input type: {dt}");
506
throw ectx.
Except
($"Unexpected value for component '{type}', field '{pair.Key}': '{pair.Value}'");
512
throw ectx.
Except
($"The following required inputs were not provided for component '{type}': {string.Join(", ", missing)}");
540
throw ectx.
Except
($"Unexpected value type: {value.GetType()}");
553
throw ectx.
Except
($"Component type '{signatureType}' is not a valid signature type.");
558
throw ectx.
Except
($"Component '{name}' of kind '{kind}' is not found. Available components are: {string.Join(", ", available)}");
567
throw ectx.
Except
($"Unexpected value for component '{name}', field '{pair.Key}': '{pair.Value}'");
573
throw ectx.
Except
($"The following required inputs were not provided for component '{name}': {string.Join(", ", missing)}");
Evaluators\AnomalyDetectionEvaluator.cs (3)
668
throw Host.
Except
("Did not find the top-k results data view");
713
throw Host.
Except
("No overall metrics found");
745
throw Host.
Except
("Found multiple non-stratified rows in overall results data view");
Evaluators\BinaryClassifierEvaluator.cs (4)
1280
throw Host.
Except
("Cannot compute the predicted label from the probability column because it does not exist");
1361
throw ch.
Except
("No overall metrics found");
1365
throw ch.
Except
("No overall metrics found");
1421
throw ch.
Except
("Did not find p/r metrics");
Evaluators\EvaluatorUtils.cs (1)
654
throw env.
Except
($"Data view {i} doesn't contain a column '{columnName}'");
Evaluators\MamlEvaluator.cs (1)
174
throw ch.
Except
("No overall metrics found");
Evaluators\Metrics\BinaryClassificationMetrics.cs (1)
92
throw ectx.
Except
($"Could not find column '{name}'");
Evaluators\Metrics\RankingMetrics.cs (1)
53
throw ectx.
Except
($"Could not find column '{name}'");
Evaluators\MulticlassClassificationEvaluator.cs (2)
924
throw ch.
Except
("No overall metrics found");
927
throw ch.
Except
("No confusion matrix found");
Evaluators\MultiOutputRegressionEvaluator.cs (1)
666
throw ch.
Except
("No overall metrics found");
Evaluators\QuantileRegressionEvaluator.cs (1)
494
throw ch.
Except
("No overall metrics found");
Evaluators\RankingEvaluator.cs (1)
908
throw ch.
Except
("Did not find group summary metrics");
Prediction\Calibrator.cs (1)
667
throw env.
Except
("Predictor does not output a score");
Scorers\FeatureContributionCalculation.cs (4)
62
throw env.
Except
($"Number of top contribution must be non negative");
64
throw env.
Except
($"Number of bottom contribution must be non negative");
125
throw env.
Except
($"Number of top contribution must be non negative");
127
throw env.
Except
($"Number of bottom contribution must be non negative");
Scorers\RowToRowScorerBase.cs (1)
303
throw Ch.
Except
($"Invalid TValue in GetGetter: '{typeof(TValue)}', " +
Training\TrainerUtils.cs (1)
452
throw _env.
Except
($"Training resulted in a model of type {model.GetType().Name}.");
Transforms\ColumnConcatenatingEstimator.cs (2)
114
throw _host.
Except
($"Column '{sources[i]}' is key. " +
119
throw _host.
Except
($"Concatenated columns should have the same type. Column '{sources[i]}' has type of {col.ItemType}, " +
Transforms\ColumnSelecting.cs (1)
322
throw env.
Except
("Unsupported hide option specified");
Transforms\FeatureContributionCalculationTransformer.cs (2)
95
throw Host.
Except
($"Number of top contribution must be non negative");
97
throw Host.
Except
($"Number of bottom contribution must be non negative");
Transforms\GenerateNumberTransform.cs (1)
446
throw Ch.
Except
($"Invalid TValue in GetGetter: '{typeof(TValue)}', " +
Transforms\KeyToVector.cs (1)
270
throw Host.
Except
(errorMsg);
Transforms\LabelConvertTransform.cs (1)
227
throw Ch.
Except
($"Invalid TValue: '{typeof(TValue)}', " +
Transforms\NAFilter.cs (1)
432
throw Ch.
Except
($"Invalid TValue: '{typeof(TValue)}', " +
Transforms\PerGroupTransformBase.cs (1)
308
throw Ch.
Except
($"Invalid TValue in GetGetter: '{typeof(TValue)}', " +
Transforms\RangeFilter.cs (1)
327
throw Ch.
Except
($"Invalid TValue in GetGetter: '{typeof(TValue)}', " +
Transforms\RowShufflingTransformer.cs (1)
720
throw Ch.
Except
($"Invalid TValue: '{typeof(TValue)}', " +
Transforms\TransformBase.cs (1)
910
throw Ch.
Except
($"Invalid TValue in GetGetter: '{typeof(TValue)}', " +
Transforms\ValueMapping.cs (1)
890
throw env.
Except
($"Duplicate keys in data '{key}'");
Transforms\ValueToKeyMappingTransformerImpl.cs (2)
219
throw ch.
Except
($"Item '{term}' in 'terms' specification could not be parsed as '{ItemType}'");
532
throw ectx.
Except
("Unrecognized codec read");
Microsoft.ML.Ensemble (26)
EntryPoints\CreateEnsemble.cs (7)
154
throw host.
Except
("Unknown combiner kind");
186
throw host.
Except
("Unknown combiner kind");
219
throw host.
Except
("Unknown combiner kind");
243
throw host.
Except
("Unknown combiner kind");
270
throw host.
Except
("Unknown combiner kind");
294
throw host.
Except
("Unknown combiner kind");
398
throw env.
Except
(errorMsg);
OutputCombiners\BaseStacking.cs (1)
165
throw ch.
Except
("Unsupported label type");
PipelineEnsemble.cs (11)
244
throw Host.
Except
("Unknown prediction kind");
270
throw Host.
Except
("Unknown prediction kind");
526
throw env.
Except
("Combiner type incompatible with score column kind");
532
throw env.
Except
("Combiner type incompatible with score column kind");
537
throw env.
Except
("Combiner type incompatible with score column kind");
540
throw env.
Except
("Unknown score kind");
561
throw env.
Except
("Unknown score kind");
598
throw env.
Except
("Training schema for model 0 does not have a label column");
606
throw env.
Except
("Label is not binary");
610
throw env.
Except
("Label column of type key must have a vector of key values metadata");
628
throw env.
Except
("Cannot determine the number of classes the predictor outputs");
Selector\SubModelSelector\BaseSubModelSelector.cs (1)
95
throw Host.
Except
("Evaluator did not produce any overall metrics");
Trainer\EnsembleDistributionModelParameters.cs (2)
92
throw Host.
Except
("Predictor does not implement expected interface");
98
throw Host.
Except
("Predictor input type mismatch");
Trainer\EnsembleModelParameters.cs (2)
82
throw Host.
Except
("Predictor does not implement expected interface");
88
throw Host.
Except
("Predictor input type mismatch");
Trainer\Multiclass\EnsembleMulticlassModelParameters.cs (2)
74
throw Host.
Except
("Predictor does not implement expected interface");
80
throw Host.
Except
("Predictor input type mismatch");
Microsoft.ML.EntryPoints (4)
FeatureCombiner.cs (2)
58
throw ch.
Except
("No feature columns specified");
295
throw host.
Except
($"Column '{input.LabelColumn}' not found.");
TrainTestMacro.cs (2)
131
throw env.
Except
($"Invalid variable name '{varName}'.");
140
throw env.
Except
($"Invalid variable name '{varName}'.");
Microsoft.ML.FastTree (11)
BoostingFastTree.cs (6)
42
throw ch.
Except
("Ensemble compression cannot be done when forcing to write last ensemble (hl)");
45
throw ch.
Except
("Histogram pool size (ps) must be at least 2.");
48
throw ch.
Except
("Histogram pool size (ps) must be at most numLeaves - 1.");
51
throw ch.
Except
("Cannot perform pruning (pruning) without a validation set (valid).");
55
throw ch.
Except
("Cannot perform early stopping without a validation set (valid).");
58
throw ch.
Except
("Cannot perform tolerant pruning (prtol) without pruning (pruning) and a validation set (valid)");
FastTree.cs (2)
273
throw ch.
Except
("Number of trees should be a multiple of number bag size");
277
throw ch.
Except
("Gain confidence level must be in the range [0,1)");
Training\OptimizationAlgorithms\GradientDescent.cs (1)
120
throw ch.
Except
("No AdjustTreeOutputs defined. Objective function should define IStepSearch or AdjustTreeOutputsOverride should be set");
TreeEnsemble\TreeEnsembleCombiner.cs (1)
64
throw _host.
Except
("Model is not a tree ensemble");
TreeEnsembleFeaturizationEstimator.cs (1)
91
throw Env.
Except
($"{nameof(OptionsBase.TreesColumnName)}, {nameof(OptionsBase.LeavesColumnName)}, and {nameof(OptionsBase.PathsColumnName)} cannot be all null at the same time. " +
Microsoft.ML.ImageAnalytics (1)
ImagePixelExtractor.cs (1)
276
throw Host.
Except
("Image dimensions are too large");
Microsoft.ML.KMeansClustering (2)
KMeansModelParameters.cs (1)
156
throw Host.
Except
($"Incorrect number of features: expected {_dimensionality}, got {src.Length}");
KMeansPlusPlusTrainer.cs (1)
1674
throw host.
Except
("Failed to initialize clusters: too few examples");
Microsoft.ML.LightGbm (2)
LightGbmTrainerBase.cs (2)
786
throw ch.
Except
($"Dataset row count exceeded the maximum count of {Utils.ArrayMaxSize}");
1049
throw ch.
Except
("Size of array exceeded the " + nameof(Utils.ArrayMaxSize));
Microsoft.ML.Mkl.Components (1)
VectorWhitening.cs (1)
407
throw ch.
Except
("SVD did not converge.");
Microsoft.ML.OnnxConverter (1)
SaveOnnxCommand.cs (1)
116
throw env.
Except
(nameof(args.Model) + " and " + nameof(args.PredictiveModel) +
Microsoft.ML.OnnxTransformer (3)
OnnxTransform.cs (3)
719
throw Host.
Except
($"Output column {namedOnnxValue.Name} doesn't contain a DenseTensor of expected type {typeof(T)}");
739
throw Host.
Except
($"Output column {namedOnnxValue.Name} doesn't contain a DenseTensor of expected type {typeof(string)}");
1075
throw Host.
Except
($"Column {input} doesn't match input node names of model.");
Microsoft.ML.Parquet (3)
ParquetLoader.cs (2)
235
throw _host.
Except
("Parquet loader must be created with one file");
605
throw Ch.
Except
($"Invalid TValue: '{typeof(TValue)}', " +
PartitionedFileLoader.cs (1)
427
throw Ch.
Except
($"Invalid TValue: '{typeof(TValue)}', " +
Microsoft.ML.PerformanceTests (1)
BenchmarkBase.cs (1)
59
throw ch.
Except
($"{errorMessage}\n{name} could not be downloaded!");
Microsoft.ML.Sweeper (1)
Algorithms\SweeperProbabilityUtils.cs (1)
206
throw host.
Except
("Smart sweeper can only sweep over discrete and numeric parameters");
Microsoft.ML.TensorFlow (3)
TensorflowTransform.cs (1)
557
throw Host.
Except
("Variable length input columns not supported");
TensorflowUtils.cs (2)
222
throw ch.
Except
($"{errorMessage}\nMeta file could not be downloaded! " +
239
throw ectx.
Except
($"TensorFlow exception triggered while loading model from '{modelFile}'");
Microsoft.ML.TensorFlow.Tests (1)
TensorflowTests.cs (1)
1998
throw ch.
Except
($"{errorMessage}\nImage file could not be downloaded!");
Microsoft.ML.TimeSeries (2)
SequentialAnomalyDetectionTransformBase.cs (1)
164
throw host.
Except
("The alerting score can be only (0) RawScore, (1) PValueScore or (2) MartingaleScore.");
SequentialTransformerBase.cs (1)
1066
throw Ch.
Except
($"Invalid TValue in GetGetter: '{typeof(TValue)}', " +
Microsoft.ML.TorchSharp (3)
AutoFormerV2\ObjectDetectionTrainer.cs (1)
278
throw ch.
Except
($"{errorMessage}\nmodel file could not be downloaded!");
Roberta\QATrainer.cs (1)
262
throw ch.
Except
($"{errorMessage}\nmodel file could not be downloaded!");
TorchSharpBaseTrainer.cs (1)
188
throw ch.
Except
($"{errorMessage}\nmodel file could not be downloaded!");
Microsoft.ML.Transforms (28)
CustomMappingTransformer.cs (1)
71
throw _host.
Except
("Empty contract name for a transform: the transform cannot be saved");
Dracula\CountTableTransformer.cs (2)
147
throw _host.
Except
($"Could not find column {_columns[i].InputColumnName} in input schema");
475
throw env.
Except
($"The file {options.InitialCountsModel} does not contain a CountTableTransformer");
Dracula\CountTargetEncodingTransformer.cs (1)
178
throw env.
Except
($"The file {options.InitialCountsModel} does not contain a CountTableTransformer");
ExpressionTransformer.cs (2)
280
throw ectx.
Except
($"generating code failed: {errors[0].GetMessage()}");
941
throw Host.
Except
($"Column {inputColumnNames[j]} does not exist in the input schema");
GroupTransform.cs (2)
265
GroupColumnIndexes = GetColumnIds(inputSchema, _groupColumns, _ectx.
Except
);
266
KeepColumnIndexes = GetColumnIds(inputSchema, _keepColumns, _ectx.
Except
);
LambdaTransform.cs (1)
73
throw env.
Except
($"The class with contract '{contractName}' must derive from '{typeof(CustomMappingFactory<,>).FullName}' or from '{typeof(StatefulCustomMappingFactory<,,>).FullName}'.");
MissingValueDroppingTransformer.cs (2)
197
throw _parent.Host.
Except
($"Column '{srcCol.Name}' is not a vector column");
199
throw _parent.Host.
Except
($"Column '{srcCol.Name}' is of type {srcCol.Type.GetItemType()}, which does not support missing values");
MissingValueReplacingUtils.cs (1)
50
throw ch.
Except
("Imputation by slot is not allowed for vectors of unknown size.");
OptionalColumnTransform.cs (1)
492
throw Ch.
Except
($"Invalid TValue in GetGetter: '{typeof(TValue)}', " +
ProduceIdTransform.cs (1)
222
throw Ch.
Except
($"Invalid TValue in GetGetter: '{typeof(TValue)}', " +
StatefulCustomMappingTransformer.cs (2)
69
throw _host.
Except
("Empty contract name for a transform: the transform cannot be saved");
325
throw Ch.
Except
($"Invalid TValue in GetGetter: '{typeof(TValue)}', " +
SvmLight\SvmLightLoader.cs (4)
486
throw Ch.
Except
($"Invalid TValue: '{typeof(TValue)}', " +
568
throw env.
Except
("If the number of features is not specified, a dataset must be provided to infer it.");
578
throw env.
Except
("To use the text feature names option, a dataset must be provided");
707
throw ch.
Except
("No int parsable keys found during key transform inference");
SvmLight\SvmLightSaver.cs (4)
100
throw ch.
Except
($"Column {_labelCol} not found in data");
104
throw ch.
Except
($"Column {_featureCol} not found in data");
108
throw ch.
Except
($"Column {_groupCol} not found in data");
112
throw ch.
Except
($"Column {_weightCol} not found in data");
Text\NgramTransform.cs (1)
737
throw Host.
Except
("Unsupported weighting criteria");
Text\StopWordsRemovingTransformer.cs (1)
300
throw ch.
Except
(
Text\WordEmbeddingsExtractor.cs (2)
641
throw ch.
Except
($"{errorMessage}\nModel file for Word Embedding transform could not be found! " +
647
throw Host.
Except
($"Can't map model kind = {kind} to specific file, please refer to https://aka.ms/MLNetIssue for assistance");
Microsoft.ML.Vision (3)
DnnRetrainTransform.cs (3)
230
throw Host.
Except
($"Column {columnName} doesn't exist");
780
throw Host.
Except
("Variable length input columns not supported");
784
throw Host.
Except
("Non-vector columns are not supported and should be loaded as vector columns of size 1");