Skip to content

ConvergenceWarning while trainning #965

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

Open
medphisiker opened this issue Sep 26, 2020 · 3 comments
Open

ConvergenceWarning while trainning #965

medphisiker opened this issue Sep 26, 2020 · 3 comments
Labels
enhancement A new improvement or feature

Comments

@medphisiker
Copy link

Hello,
auto-sklearn works great for my. But during training I often get messages like this:

/usr/local/lib/python3.6/dist-packages/sklearn/linear_model/_stochastic_gradient.py:557: ConvergenceWarning: Maximum number of iteration reached before convergence. Consider increasing max_iter to improve the fit.
  ConvergenceWarning)

Sometimes these lines are repeated about 100-200 times one after the other.

Please tell me if there is any way to increase this 'max_iter' for stochastic_gradient using by auto-sklearn?
I tried increasing the time by using "time_left_for_this_task" and "per_run_time_limit". But it didn't help.

@mfeurer
Copy link
Contributor

mfeurer commented Sep 29, 2020

Thanks for reporting these warnings. They are actually nothing to worry about. Auto-sklearn tries all kinds of configurations, and if one does not work (due to an algorithm not converging) it will look in other areas of the configuration space.

The reason why this happens so often is due to the way we train the SGD: we train it first for 2 iterations, and then iteratively double the amount of iterations until we end up with 1024 iterations. It's very likely then that after 2 iterations such a warning is emitted (and also after 4 etc).

I'm leaving this open so that we actually hide this warning.

@medphisiker
Copy link
Author

medphisiker commented Sep 30, 2020

I understand this is how your algorithm works, but sklearn doesn't know this and issues warnings. =)
Thank you for your quick and complete response.

Probably, are you planning to write a popular science article on how your algorithm works?
Something like this popular science article How We Implement Hyperband in Optuna.
It would be very interesting to read )
And these cute hand-drawn graphics =)

@franchuterivera franchuterivera added the enhancement A new improvement or feature label Feb 17, 2021
@github-actions
Copy link
Contributor

github-actions bot commented May 5, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs for the next 7 days. Thank you for your contributions.

@github-actions github-actions bot added the stale label May 5, 2021
@mfeurer mfeurer removed the stale label May 6, 2021
@eddiebergman eddiebergman linked a pull request Nov 17, 2021 that will close this issue
@eddiebergman eddiebergman removed a link to a pull request Nov 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A new improvement or feature
Projects
None yet
Development

No branches or pull requests

3 participants