Skip to content

How to get around the exception caused because of #5506 fix? #5612

Closed
@aforoughi1

Description

@aforoughi1

Using the AutoML version 0.17.2 and 0.17.4, I get a few exceptions during SdcaRegression (simillar to #4363)
However, a new behaviour using 0.17.4, I get the AggregateException (changes because of #5445).

Exception during AutoML iteration: System.InvalidOperationException: The weights/bias contain invalid values (NaN or Infinite). Potential causes: high learning rates, no normalization, high initial weights, etc.
at Microsoft.ML.Trainers.OnlineLinearTrainer2.TrainModelCore(TrainContext context) at Microsoft.ML.Trainers.TrainerEstimatorBase2.TrainTransformer(IDataView trainSet, IDataView validationSet, IPredictor initPredictor)
at Microsoft.ML.Data.EstimatorChain1.Fit(IDataView input) at Microsoft.ML.AutoML.RunnerUtil.TrainAndScorePipeline[TMetrics](MLContext context, SuggestedPipeline pipeline, IDataView trainData, IDataView validData, String groupId, String labelColumn, IMetricsAgent1
metricsAgent, ITransformer preprocessorTransform, FileInfo modelFileInfo, DataViewSchema modelInputSchema, IChannel logger)

System.AggregateException
HResult=0x80131500
Message=One or more errors occurred. (Operation was canceled.) (Operation was canceled.) (Operation was canceled.) (Operation was canceled.)
Source=System.Private.CoreLib
StackTrace:
at System.ThrowHelper.ThrowAggregateException(List1 exceptions) at System.Threading.Tasks.Task.WaitAllCore(Task[] tasks, Int32 millisecondsTimeout, CancellationToken cancellationToken) at System.Threading.Tasks.Parallel.Invoke(ParallelOptions parallelOptions, Action[] actions) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw(Exception source) at System.Threading.Tasks.Parallel.ThrowSingleCancellationExceptionOrOtherException(ICollection exceptions, CancellationToken cancelToken, Exception otherException) at System.Threading.Tasks.Parallel.Invoke(ParallelOptions parallelOptions, Action[] actions) at Microsoft.ML.Trainers.FastTree.ThreadTaskManager.ThreadTask.RunTask() at Microsoft.ML.Trainers.FastTree.LeastSquaresRegressionTreeLearner.FindBestSplitOfRoot(Double[] targets) at Microsoft.ML.Trainers.FastTree.LeastSquaresRegressionTreeLearner.FitTargets(IChannel ch, Boolean[] activeFeatures, Double[] targets) at Microsoft.ML.Trainers.FastTree.RandomForestLeastSquaresTreeLearner.FitTargets(IChannel ch, Boolean[] activeFeatures, Double[] weightedtargets, Double[] targets, Double[] weights) at Microsoft.ML.Trainers.FastTree.RandomForestOptimizer.TrainingIteration(IChannel ch, Boolean[] activeFeatures) at Microsoft.ML.Trainers.FastTree.FastTreeTrainerBase3.Train(IChannel ch)
at Microsoft.ML.Trainers.FastTree.FastTreeTrainerBase3.TrainCore(IChannel ch) at Microsoft.ML.Trainers.FastTree.FastForestRegressionTrainer.TrainModelCore(TrainContext context) at Microsoft.ML.Trainers.TrainerEstimatorBase2.TrainTransformer(IDataView trainSet, IDataView validationSet, IPredictor initPredictor)
at Microsoft.ML.AutoML.SmacSweeper.FitModel(IEnumerable1 previousRuns) at Microsoft.ML.AutoML.SmacSweeper.ProposeSweeps(Int32 maxSweeps, IEnumerable1 previousRuns)
at Microsoft.ML.AutoML.PipelineSuggester.SampleHyperparameters(MLContext context, SuggestedTrainer trainer, IEnumerable1 history, Boolean isMaximizingMetric, IChannel logger) at Microsoft.ML.AutoML.PipelineSuggester.GetNextInferredPipeline(MLContext context, IEnumerable1 history, DatasetColumnInfo[] columns, TaskKind task, Boolean isMaximizingMetric, CacheBeforeTrainer cacheBeforeTrainer, IChannel logger, IEnumerable1 trainerAllowList) at Microsoft.ML.AutoML.Experiment2.Execute()
at Microsoft.ML.AutoML.ExperimentBase2.Execute(ColumnInformation columnInfo, DatasetColumnInfo[] columns, IEstimator1 preFeaturizer, IProgress1 progressHandler, IRunner1 runner)
at Microsoft.ML.AutoML.ExperimentBase2.ExecuteTrainValidate(IDataView trainData, ColumnInformation columnInfo, IDataView validationData, IEstimator1 preFeaturizer, IProgress1 progressHandler) at Microsoft.ML.AutoML.ExperimentBase2.Execute(IDataView trainData, IDataView validationData, ColumnInformation columnInformation, IEstimator1 preFeaturizer, IProgress1 progressHandler)
at Microsoft.ML.AutoML.ExperimentBase2.Execute(IDataView trainData, IDataView validationData, String labelColumnName, IEstimator1 preFeaturizer, IProgress1 progressHandler) at AutoMLApp.Experiment2Template.Train() in C:\Users\abbas\OneDrive\Documents\WorkingProgress\MLStcokMarketPrediction\AutoMLApp\Class1.cs:line 446 at AutoMLApp.MlModelTemplate.BuildModel() in C:\Users\abbas\OneDrive\Documents\WorkingProgress\MLStcokMarketPrediction\AutoMLApp\Class1.cs:line 363 at AutoMLApp.MlExperimentsFactory.Experiment2Tasks(Kind kind, OutputLabels op, BinaryClassificationMetric optimizingMetric, List1 trainers) in C:\Users\abbas\OneDrive\Documents\WorkingProgress\MLStcokMarketPrediction\AutoMLApp\Class1.cs:line 177
at AutoMLApp.MlExperimentsFactory.<>c__DisplayClass30_1.b__1() in C:\Users\abbas\OneDrive\Documents\WorkingProgress\MLStcokMarketPrediction\AutoMLApp\Class1.cs:line 135
at AutoMLApp.MlExperimentsFactory.StartNew(String ticker, ExperimentElementCollection expColl, PredictionTestDataElement testData) in C:\Users\abbas\OneDrive\Documents\WorkingProgress\MLStcokMarketPrediction\AutoMLApp\Class1.cs:line 109
at AutoMLApp.Program.Main(String[] args) in C:\Users\abbas\OneDrive\Documents\WorkingProgress\MLStcokMarketPrediction\AutoMLApp\Program.cs:line 31

This exception was originally thrown at this call stack:
[External Code]

Inner Exception 1:
OperationCanceledException: Operation was canceled.

Metadata

Metadata

Assignees

No one assigned

    Labels

    AutoML.NETAutomating various steps of the machine learning processP2Priority of the issue for triage purpose: Needs to be fixed at some point.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions