Skip to content
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

Fix hp search for non sigopt backends #13897

Merged
merged 1 commit into from Oct 6, 2021
Merged

Fix hp search for non sigopt backends #13897

merged 1 commit into from Oct 6, 2021

Conversation

sgugger
Copy link
Collaborator

@sgugger sgugger commented Oct 6, 2021

What does this PR do?

This PR fixes the bug introduced in #13572 for the hyperparameter search using Ray Tune or Optuna. More speficially the bug introduced is on this line

self.state.trial_params = hp_params(trial.assignments) if trial is not None else None

which used to be

self.state.trial_params = hp_params(trial) if trial is not None else None

For the HP backends different from SigOpt, the trial object has no assignmnents, hence the failure.

Fixes #13875

Copy link
Member

@LysandreJik LysandreJik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, LGTM!

@LysandreJik LysandreJik merged commit 8f2c07d into master Oct 6, 2021
@LysandreJik LysandreJik deleted the fix_hp_search branch October 6, 2021 15:52
lapisfluvialis pushed a commit to lapisfluvialis/transformers that referenced this pull request Oct 27, 2021
Albertobegue pushed a commit to Albertobegue/transformers that referenced this pull request Jan 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hyperparameter tuning example code is not working either with Ray or Optuna backend.
3 participants