Ax integrations with the Bluesky ecosystem#112
Conversation
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
| "metadata": {}, | ||
| "outputs": [], | ||
| "source": [ | ||
| "for _ in range(25):\n", |
There was a problem hiding this comment.
Question about Ax, you picked 0-25 as the range for optimization, does more trials improve the optimization process or is it just like an ensemble and averages out at the end?
I see in the markdown you mention the first few are random and rest is BO.
There was a problem hiding this comment.
Ax actually infers what optimization setup to run based on the parameters you pass in according to the docs: https://ax.readthedocs.io/en/stable/service.html#module-ax.service.ax_client.
If you want something more custom then you can pass in your own GenerationStrategy (which suggests new parameters, or Arms, to try).
| "cell_type": "markdown", | ||
| "metadata": {}, | ||
| "source": [ | ||
| "### Viewing each arm's objective values" |
There was a problem hiding this comment.
I am a huge fan of the visuals Ax provides.
| m = fim > threshold * fim.max() | ||
| m = fim > (threshold * fim.max()) | ||
| area = m.sum() | ||
| if area == 0.0: |
There was a problem hiding this comment.
When I had the simulated beamline without noise and the beam was off-screen, the total sum of the image that is above the threshold of 0.5 was 0.0. This leads to a divide by zero error a few lines down. Since the image is all the same value, there is no beam to extract and we can return 0.0 for everything.
This PR enables using https://ax.dev/ with the Bluesky ecosystem.
Closes #93