Skip to content

Bugfix for Runnable.optimize() #129

Open
ben-c-2013 wants to merge 9 commits intomainfrom
bugfix_ax-optimize
Open

Bugfix for Runnable.optimize() #129
ben-c-2013 wants to merge 9 commits intomainfrom
bugfix_ax-optimize

Conversation

@ben-c-2013
Copy link
Collaborator

Fixed a bug in Runnable.optimize() by updating the import command from ax import optimize as bayes_opt to from ax.service.managed_loop import optimize as bayes_opt.

Also improved Runnable.is_scan(), made Runnable.extract_beam_function() work for multi-shot runs that are not a scan and edited some doc strings.

…m ax. Also improved Runnable.is_scan(), made Runnable.extract_beam_function() work for multi-shot runs that are not a scan and edited some doc strings.
@ben-c-2013 ben-c-2013 added the bug Something isn't working label Sep 30, 2025

# perform optimization
from ax import optimize as bayes_opt
from ax.service.managed_loop import optimize as bayes_opt
Copy link
Collaborator

Choose a reason for hiding this comment

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

Where did this change?

Maybe enforce ax version number in project def ?

Copy link
Collaborator

@kyrsjo kyrsjo Dec 18, 2025

Choose a reason for hiding this comment

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

Here:

"ax-platform",

Copy link
Collaborator Author

@ben-c-2013 ben-c-2013 Dec 19, 2025

Choose a reason for hiding this comment

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

Yes, we should indeed restrict this to e.g. > 1.0.0 and <=1.2.1.

@ben-c-2013
Copy link
Collaborator Author

For the record, the last version that had ax.optimize was v0.5.0. Since v1.0.0, this has been removed and replaced. Seems like ax.service.managed_loop.optimize implemented here is also not the correct method. See e.g. https://pypi.org/project/ax-platform/1.2.1/ for updated documentation.

@kyrsjo
Copy link
Collaborator

kyrsjo commented Feb 17, 2026

OK, so postpone for now until the correct way is found?

@ben-c-2013
Copy link
Collaborator Author

OK, so postpone for now until the correct way is found?

Yes, or the method is probably the same one as this one: https://pypi.org/project/ax-platform/1.2.1/

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