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 bug when loading AxClient from json and require Ax >= 0.3.5 #200

Merged
merged 3 commits into from
Apr 30, 2024

Conversation

AngelFP
Copy link
Member

@AngelFP AngelFP commented Apr 20, 2024

Fixes a bug where an AxClient could not be loaded from a json file because the SOBOL step had num_trials = 0. The fix is trivial (single line) if we require Ax >= 0.3.5.

@@ -171,9 +171,7 @@ def _tell(self, trials: List[Trial]) -> None:
current_step = generation_strategy.current_step
# Reduce only if there are still Sobol trials left.
if current_step.model == Models.SOBOL:
current_step.num_trials -= 1
Copy link
Member Author

Choose a reason for hiding this comment

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

This is the actual fix. Just removing this line.

The rest of the changes are simply due to requiring Ax > 0.3.5

@AngelFP AngelFP requested a review from RemiLehe April 20, 2024 03:43
@ax3l ax3l added the bug Something isn't working label Apr 30, 2024
Copy link
Collaborator

@ax3l ax3l left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you

@ax3l ax3l merged commit 63c2d49 into main Apr 30, 2024
8 checks passed
@ax3l ax3l deleted the bug/fix_json_issue branch April 30, 2024 20:39
@ax3l ax3l self-assigned this Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants