Skip to content

[AutoML] Early stopping in CLI based on the exploration time #3641

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

Merged
6 changes: 3 additions & 3 deletions src/mlnet/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Program
public static void Main(string[] args)
{
var telemetry = new MlTelemetry();

int exitCode = 0;
// Create handler outside so that commandline and the handler is decoupled and testable.
var handler = CommandHandler.Create<NewCommandSettings>(
(options) =>
Expand Down Expand Up @@ -70,7 +70,7 @@ public static void Main(string[] args)
logger.Log(LogLevel.Debug, e.ToString());
logger.Log(LogLevel.Info, Strings.LookIntoLogFile);
logger.Log(LogLevel.Error, Strings.Exiting);
return;
exitCode = -1;
}
});

Expand Down Expand Up @@ -101,7 +101,7 @@ public static void Main(string[] args)
}

parser.InvokeAsync(parseResult).Wait();
Environment.Exit(0);
Environment.Exit(exitCode);
}
}
}