Skip to content

Exception in AutoML Hyperparam Sweeper #1666

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
daholste opened this issue Nov 19, 2018 · 2 comments
Closed

Exception in AutoML Hyperparam Sweeper #1666

daholste opened this issue Nov 19, 2018 · 2 comments
Labels
AutoML.NET Automating various steps of the machine learning process bug Something isn't working wontfix This will not be worked on

Comments

@daholste
Copy link
Contributor

System information

  • OS version/distro: Windows 10
  • .NET Version (eg., dotnet --info): .NET Core 2.1

Source code / logs

System.InvalidOperationException: Value not in correct range
   at Microsoft.ML.Runtime.Contracts.Check(Boolean f, String msg) in C:\MLDotNet\src\Microsoft.ML.Core\Utilities\Contracts.cs:line 496
   at Microsoft.ML.Runtime.Sweeper.FloatValueGenerator.NormalizeValue(IParameterValue value) in C:\MLDotNet\src\Microsoft.ML.Sweeper\Parameters.cs:line 442
   at Microsoft.ML.Runtime.Sweeper.Algorithms.SweeperProbabilityUtils.ParameterSetAsFloatArray(IHost host, IValueGenerator[] sweepParams, ParameterSet ps, Boolean expandCategoricals) in C:\MLDotNet\src\Microsoft.ML.Sweeper\Algorithms\SweeperProbabilityUtils.cs:line 207
   at Microsoft.ML.Runtime.Sweeper.Algorithms.KdoSweeper.SampleChild(ParameterSet parent, Double fitness, Int32 n, IRunResult[] previousRuns, Double rMean, Double rVar, Boolean isMetricMaximizing) in C:\MLDotNet\src\Microsoft.ML.Sweeper\Algorithms\KdoSweeper.cs:line 206
   at Microsoft.ML.Runtime.Sweeper.Algorithms.KdoSweeper.GenerateChildConfigurations(IRunResult[] history, Int32[] parentIndicies, Double[] weights, IRunResult[] previousRuns, Double rMean, Double rVar) in C:\MLDotNet\src\Microsoft.ML.Sweeper\Algorithms\KdoSweeper.cs:line 187
   at Microsoft.ML.Runtime.Sweeper.Algorithms.KdoSweeper.GenerateCandidateConfigurations(Int32 numOfCandidates, IRunResult[] previousRuns) in C:\MLDotNet\src\Microsoft.ML.Sweeper\Algorithms\KdoSweeper.cs:line 176
   at Microsoft.ML.Runtime.Sweeper.Algorithms.KdoSweeper.ProposeSweeps(Int32 maxSweeps, IEnumerable`1 previousRuns) in C:\MLDotNet\src\Microsoft.ML.Sweeper\Algorithms\KdoSweeper.cs:line 153
   at Microsoft.ML.Runtime.PipelineInference.PipelineOptimizerBase.SampleHyperparameters(SuggestedLearner learner, ISweeper sweeper, Boolean isMaximizingMetric, PipelinePattern[] history) in C:\MLDotNet\src\Microsoft.ML.PipelineInference\Interfaces\IPipelineOptimizer.cs:line 143
   at Microsoft.ML.Runtime.PipelineInference.RocketEngine.SampleHyperparameters(SuggestedLearner learner, PipelinePattern[] history) in C:\MLDotNet\src\Microsoft.ML.PipelineInference\AutoMlEngines\RocketEngine.cs:line 128
   at Microsoft.ML.Runtime.PipelineInference.RocketEngine.NextCandidates(PipelinePattern[] history, Int32 numCandidates, Boolean defaultHyperParams, Boolean uniformRandomTransforms) in C:\MLDotNet\src\Microsoft.ML.PipelineInference\AutoMlEngines\RocketEngine.cs:line 309
   at Microsoft.ML.Runtime.PipelineInference.RocketEngine.GetNextCandidates(IEnumerable`1 history, Int32 numCandidates, RoleMappedData dataRoles) in C:\MLDotNet\src\Microsoft.ML.PipelineInference\AutoMlEngines\RocketEngine.cs:line 266
   at Microsoft.ML.Runtime.PipelineInference.AutoInference.AutoMlMlState.MainLearningLoop(Int32 batchSize, Int32 numOfTrainingRows) in C:\MLDotNet\src\Microsoft.ML.PipelineInference\AutoInference.cs:line 213
@justinormont justinormont added the bug Something isn't working label Nov 19, 2018
@daholste
Copy link
Contributor Author

daholste commented Nov 19, 2018

I've also seen this exception in the same method:

System.ArgumentException: Array was not a two-dimensional array.
   at System.Array.SetValue(Object value, Int32 index1, Int32 index2)
   at Microsoft.ML.Runtime.Sweeper.Algorithms.SweeperProbabilityUtils.Normalize(Double[] weights) in C:\MLDotNet\src\Microsoft.ML.Sweeper\Algorithms\SweeperProbabilityUtils.cs:line 145
   at Microsoft.ML.Runtime.PipelineInference.PipelineOptimizerBase.LearnerHistoryToWeights(PipelinePattern[] history, Boolean isMaximizingMetric) in C:\MLDotNet\src\Microsoft.ML.PipelineInference\Interfaces\IPipelineOptimizer.cs:line 131
   at Microsoft.ML.Runtime.PipelineInference.RocketEngine.GetTopLearners(IEnumerable`1 history) in C:\MLDotNet\src\Microsoft.ML.PipelineInference\AutoMlEngines\RocketEngine.cs:line 211
   at Microsoft.ML.Runtime.PipelineInference.RocketEngine.GetNextCandidates(IEnumerable`1 history, Int32 numCandidates, RoleMappedData dataRoles) in C:\MLDotNet\src\Microsoft.ML.PipelineInference\AutoMlEngines\RocketEngine.cs:line 236
   at Microsoft.ML.Runtime.PipelineInference.AutoInference.AutoMlMlState.MainLearningLoop(Int32 batchSize, Int32 numOfTrainingRows) in C:\MLDotNet\src\Microsoft.ML.PipelineInference\AutoInference.cs:line 213

I'm going to try replacing


with

for(var i = 0; i < weights.Length; i++)
{
   weights[i] = 1;
}

@justinormont justinormont added the AutoML.NET Automating various steps of the machine learning process label Nov 19, 2018
@TomFinley
Copy link
Contributor

Hi @daholste and @rogancarr . As you've found with this, this code in particular is highly unstable and not quite ready for primetime. I think someone has a plan, or at least a desire, to have it continue to be developed, but not of course as part of the ML.NET repository. Our plan is pursuant to #689, as well as out of absolute necessity as we're getting rid of the ML.NET legacy API, is that it will be removed in a couple weeks.

Maybe once it is moved to its new home (wherever that may be), people that actually develop it can offer greater support than we can. Sorry about that!

@shmoradims shmoradims added the wontfix This will not be worked on label Nov 26, 2018
@ghost ghost locked as resolved and limited conversation to collaborators Mar 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
AutoML.NET Automating various steps of the machine learning process bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

4 participants