Dynamically determine the version of the pip package.#3259
Merged
guangy10 merged 1 commit intopytorch:release/0.2from Apr 23, 2024
Merged
Dynamically determine the version of the pip package.#3259guangy10 merged 1 commit intopytorch:release/0.2from
guangy10 merged 1 commit intopytorch:release/0.2from
Conversation
Use the logic from https://github.com/pytorch/torcharrow/blob/15a7f7124d4c73c8c541547aef072264baab63b7/setup.py#L21 to play nicely with the pytorch ecosystem CI build environment. Test Plan: ``` $ ./install_requirements.sh ... Successfully installed executorch-0.2.0a0+1ba292a $ python >>> from executorch import version >>> version.__version__ '0.2.0a0+1ba292a' >>> version.git_version '1ba292ae4071c4eede8ea14e8f10ffd973a085b4' >>> ^D $ grep Version /home/dbort/.conda/envs/executorch-tmp/lib/python3.10/site-packages/executorch-0.2.0a0+1ba292a.dist-info/METADATA Metadata-Version: 2.1 Version: 0.2.0a0+1ba292a ``` Temporarily commented out the call to `setup()` in `setup.py` then imported it. ``` $ python >>> from setup import Version >>> Version.string '0.2.0a0+1ba292a' >>> Version.git_hash '1ba292ae4071c4eede8ea14e8f10ffd973a085b4' >>> Version.write_to_python_file("/tmp/version.py") >>> ^D $ cat /tmp/version.py from typing import Optional __all__ = ["__version__", "git_version"] __version__ = "0.2.0a0+1ba292a" git_version: Optional[str] = '1ba292ae4071c4eede8ea14e8f10ffd973a085b4' ``` ``` $ BUILD_VERSION="5.5.5" python >>> from setup import Version >>> Version.string '5.5.5' ```
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/3259
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 1a499e0 with merge base d3326a2 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Contributor
Author
|
I can see the jobs using the new version logic: |
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Use the logic from
https://github.com/pytorch/torcharrow/blob/15a7f7124d4c73c8c541547aef072264baab63b7/setup.py#L21 to play nicely with the pytorch ecosystem CI build environment.
Test Plan:
Temporarily commented out the call to
setup()insetup.pythen imported it.