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
Add Ax plugin for Hydra #321
Add Ax plugin for Hydra #321
Conversation
plugins/hydra_ax/README.md
Outdated
pip install hydra-ax | ||
``` | ||
|
||
We include an example of how to use this plugin. The file `plugins/hydra_ax/example/banana.py` implements the [Rosenbrock function (aka Banana function)](https://en.wikipedia.org/wiki/Rosenbrock_function). The return value of the function should be the value that we want to optimize. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remember to link this to the actual file in GitHub once this lands.
Trial = NewType("Trial", List[str]) | ||
|
||
# TODO: output directory is overwriting, job.num should be adjusted (depends on issue #284) | ||
# TODO: Support running multiple random seeds, aggregate mean and SEM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While chatting with the Ax team they suggested that maybe Ax would do a better job at this automatically. not sure I am convinced but worth discussing with them.
plugins/hydra_ax/hydra_plugins/ax_sweeper/conf/hydra/sweeper/ax.yaml
Outdated
Show resolved
Hide resolved
The next major version of Hydra will break compatibility (dropping Python <= 3.5, switching to OmegaConf 2.0 etc). |
You can also just ignore this and continue working against master, testing at the end that the plugin actually works against 0.11 as well (I suspect it will). |
@omry yeah I think I have most of the pieces in place now :) |
FYI: |
Master is now on OmegaConf 2.0 and Python >= 3.6. |
The name of the module was different from the name of the plugin. This caused some tests to fail.
no need to force push normally. you can just keep piling up the diffs. when it's all ready I can squash it at commit or you can have one last force push to clean things up. Force pushing makes it hard for others to interact with your diff and hard for me to see what changed since the last time. |
Will take care :) |
Heads up: |
* Use latest version of Ax * Fix incorrect package names * Add type hints * Remove all iterators
Let's try to finish this? |
Fixing the |
So we have two issues: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Getting there.
plugins/hydra_ax_sweeper/hydra_plugins/hydra_ax_sweeper/ax_sweeper.py
Outdated
Show resolved
Hide resolved
plugins/hydra_ax_sweeper/hydra_plugins/hydra_ax_sweeper/ax_sweeper.py
Outdated
Show resolved
Hide resolved
plugins/hydra_ax_sweeper/hydra_plugins/hydra_ax_sweeper/ax_sweeper.py
Outdated
Show resolved
Hide resolved
plugins/hydra_ax_sweeper/hydra_plugins/hydra_ax_sweeper/ax_sweeper.py
Outdated
Show resolved
Hide resolved
plugins/hydra_ax_sweeper/hydra_plugins/hydra_ax_sweeper/ax_sweeper.py
Outdated
Show resolved
Hide resolved
plugins/hydra_ax_sweeper/hydra_plugins/hydra_ax_sweeper/conf/hydra/sweeper/ax.yaml
Show resolved
Hide resolved
This pull request introduces 1 alert when merging 144e453 into af78b06 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging c08838d into df0b6a1 - view on LGTM.com new alerts:
|
plugins/hydra_ax_sweeper/hydra_plugins/hydra_ax_sweeper/ax_sweeper.py
Outdated
Show resolved
Hide resolved
plugins/hydra_ax_sweeper/hydra_plugins/hydra_ax_sweeper/conf/hydra/sweeper/ax.yaml
Outdated
Show resolved
Hide resolved
This pull request introduces 2 alerts when merging 77e037d into df0b6a1 - view on LGTM.com new alerts:
|
This pull request introduces 2 alerts when merging ece1aa5 into df0b6a1 - view on LGTM.com new alerts:
|
This pull request introduces 2 alerts when merging dbecffc into df0b6a1 - view on LGTM.com new alerts:
|
This pull request introduces 2 alerts when merging b961968 into df0b6a1 - view on LGTM.com new alerts:
|
plugins/examples/example_sweeper_plugin/tests/test_example_sweeper_plugin.py
Outdated
Show resolved
Hide resolved
This pull request introduces 2 alerts when merging b56e4dd into df0b6a1 - view on LGTM.com new alerts:
|
plugins/examples/example_sweeper_plugin/tests/test_example_sweeper_plugin.py
Show resolved
Hide resolved
This pull request introduces 2 alerts when merging 646aac9 into 45ba5e3 - view on LGTM.com new alerts:
|
plugins/hydra_ax_sweeper/hydra_plugins/hydra_ax_sweeper/ax_sweeper.py
Outdated
Show resolved
Hide resolved
This pull request introduces 2 alerts when merging 89d31cc into 5f8d689 - view on LGTM.com new alerts:
|
return z | ||
|
||
|
||
def test_launched_jobs(sweep_runner: TSweepRunner,) -> None: # noqa: F811 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add additional test covering:
- command line only usage (no config).
- mixed command line and config usage.
This pull request introduces 1 alert when merging b9148d1 into 4106845 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging a0546d2 into 4106845 - view on LGTM.com new alerts:
|
let's close this one? |
Motivation
Hydra Plugin to interface with Adaptive Experimentation Platform
Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
To be added
Related Issues and PRs
#291