-
Notifications
You must be signed in to change notification settings - Fork 607
Introduce hydra framework with backwards compatibility #11029
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
Introduce hydra framework with backwards compatibility #11029
Conversation
[ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/11029
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (1 Unrelated Failure)As of commit bfd2dec with merge base c2aa614 ( FLAKY - The following job failed but was likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
@jackzhxng has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
1 similar comment
@jackzhxng has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@jackzhxng has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Differential Revision: [D75263989](https://our.internmc.facebook.com/intern/diff/D75263989) [ghstack-poisoned]
@jackzhxng has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@jackzhxng has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
This pull request was exported from Phabricator. Differential Revision: D75263989 |
Differential Revision: [D75263989](https://our.internmc.facebook.com/intern/diff/D75263989) [ghstack-poisoned]
This pull request was exported from Phabricator. Differential Revision: D75263989 |
Differential Revision: [D75263989](https://our.internmc.facebook.com/intern/diff/D75263989) [ghstack-poisoned]
This pull request was exported from Phabricator. Differential Revision: D75263989 |
Differential Revision: [D75263989](https://our.internmc.facebook.com/intern/diff/D75263989) [ghstack-poisoned]
This pull request was exported from Phabricator. Differential Revision: D75263989 |
Differential Revision: [D75263989](https://our.internmc.facebook.com/intern/diff/D75263989) [ghstack-poisoned]
Pull Request resolved: #11029 @imported-using-ghimport Differential Revision: [D75263989](https://our.internmc.facebook.com/intern/diff/D75263989/) ghstack-source-id: 288807821
This pull request was exported from Phabricator. Differential Revision: D75263989 |
Differential Revision: [D75263989](https://our.internmc.facebook.com/intern/diff/D75263989) [ghstack-poisoned]
This pull request was exported from Phabricator. Differential Revision: D75263989 |
Differential Revision: [D75263989](https://our.internmc.facebook.com/intern/diff/D75263989) [ghstack-poisoned]
This pull request was exported from Phabricator. Differential Revision: D75263989 |
f557501
into
gh/jackzhxng/11/base
This PR was created by the merge bot to help merge the original PR into the main branch. ghstack PR number: #11029 by @jackzhxng ^ Please use this as the source of truth for the PR details, comments, and reviews ghstack PR base: https://github.com/pytorch/executorch/tree/gh/jackzhxng/11/base ghstack PR head: https://github.com/pytorch/executorch/tree/gh/jackzhxng/11/head Merge bot PR base: https://github.com/pytorch/executorch/tree/gh/jackzhxng/10/orig Merge bot PR head: https://github.com/pytorch/executorch/tree/gh/jackzhxng/11/orig @diff-train-skip-merge --------- Co-authored-by: Jack Zhang <[email protected]>
# The import runs the main function of export_llama_hydra with the remaining args | ||
# under the Hydra framework. | ||
sys.argv = [arg for arg in sys.argv if arg != "--hydra"] | ||
print(f"running with {sys.argv}") |
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.
did you mean to print this?
# under the Hydra framework. | ||
sys.argv = [arg for arg in sys.argv if arg != "--hydra"] | ||
print(f"running with {sys.argv}") | ||
runpy.run_module( |
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.
not just use importlib?
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.
oh nevermind. you are running this module not importing it
cs.store(name="llm_config", node=LlmConfig) | ||
|
||
|
||
@hydra.main(version_base=None, config_name="llm_config") |
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.
i dont think i know enough about hydra but is there a test that showcases the use?
ghstack-source-id: 3f0d943 Pull Request resolved: pytorch/executorch#11029
ghstack-source-id: 854baa2 Pull Request resolved: pytorch/executorch#11029
Stack from ghstack (oldest at bottom):
Differential Revision: D75263989