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