Skip to content

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

Merged
merged 22 commits into from
Jun 10, 2025

Conversation

jackzhxng
Copy link
Contributor

@jackzhxng jackzhxng commented May 21, 2025

@jackzhxng jackzhxng requested a review from lucylq as a code owner May 21, 2025 00:43
Copy link

pytorch-bot bot commented May 21, 2025

🔗 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 (image):

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.

jackzhxng added a commit that referenced this pull request May 21, 2025
ghstack-source-id: 3e26c22
Pull Request resolved: #11029
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label May 21, 2025
jackzhxng added a commit that referenced this pull request May 22, 2025
ghstack-source-id: 20a87fd
Pull Request resolved: #11029
jackzhxng added a commit that referenced this pull request May 22, 2025
ghstack-source-id: 6009f90
Pull Request resolved: #11029
@jackzhxng jackzhxng added the release notes: none Do not include this in the release notes label May 23, 2025
@jackzhxng
Copy link
Contributor Author

@jackzhxng has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

1 similar comment
@jackzhxng
Copy link
Contributor Author

@jackzhxng has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@jackzhxng
Copy link
Contributor Author

@jackzhxng has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@jackzhxng
Copy link
Contributor Author

@jackzhxng has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@jackzhxng
Copy link
Contributor Author

@jackzhxng has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D75263989

@jackzhxng jackzhxng linked an issue Jun 5, 2025 that may be closed by this pull request
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D75263989

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D75263989

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D75263989

jackzhxng added a commit that referenced this pull request Jun 6, 2025
Pull Request resolved: #11029




@imported-using-ghimport

Differential Revision: [D75263989](https://our.internmc.facebook.com/intern/diff/D75263989/)
ghstack-source-id: 288807821
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D75263989

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D75263989

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D75263989

@facebook-github-bot facebook-github-bot merged commit f557501 into gh/jackzhxng/11/base Jun 10, 2025
101 of 104 checks passed
@facebook-github-bot facebook-github-bot deleted the gh/jackzhxng/11/head branch June 10, 2025 03:45
jackzhxng added a commit that referenced this pull request Jun 10, 2025
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}")
Copy link
Contributor

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(
Copy link
Contributor

Choose a reason for hiding this comment

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

not just use importlib?

Copy link
Contributor

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")
Copy link
Contributor

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?

kedarnath03 pushed a commit to kedarnath03/executorch that referenced this pull request Jun 25, 2025
kedarnath03 pushed a commit to kedarnath03/executorch that referenced this pull request Jun 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported release notes: none Do not include this in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[etLLM] New config system to export_llama
4 participants