-
Notifications
You must be signed in to change notification settings - Fork 480
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
Make the git version appears in pip #5728
Conversation
Summary: This change makes the git version appears in pip by default. For any official release, we should turn that off by setting VERSIONED_XLA_BUILD=0. Here is how it looks like: torch 2.2.0a0+git6ac8451 torch-xla 2.2.0+git43cd6b5 Test Plan: Manual.
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.
LGTM
setup.py
Outdated
@@ -101,9 +101,9 @@ def get_git_head_sha(base_dir): | |||
|
|||
def get_build_version(xla_git_sha): | |||
version = os.getenv('TORCH_XLA_VERSION', '2.2.0') | |||
if _check_env_flag('VERSIONED_XLA_BUILD', default='0'): | |||
if _check_env_flag('VERSIONED_XLA_BUILD', default='1'): |
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.
Since this variable looks otherwise unused, what do you think of changing the name to be more explicit, e.g. APPEND_GIT_SHA
?
"VERSIONED_XLA_BUILD
" makes me think of releases, which is the opposite of what we want.
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.
Sure, why not.
@will-cromar Can you take another look? |
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.
Thanks!
@@ -101,9 +101,9 @@ def get_git_head_sha(base_dir): | |||
|
|||
def get_build_version(xla_git_sha): | |||
version = os.getenv('TORCH_XLA_VERSION', '2.2.0') | |||
if _check_env_flag('VERSIONED_XLA_BUILD', default='0'): | |||
if _check_env_flag('GIT_VERSIONED_XLA_BUILD', default='TRUE'): |
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.
Do you know if nightly_release
this is going to be TRUE
or true
?
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.
It doesn't matter. _check_env_flag
will convert everything to upper case.
Thanks all for the review. Pending CI now. |
Summary: This change makes the git version appears in pip by default. For any official release, we should turn that off by setting VERSIONED_XLA_BUILD=0. Here is how it looks like: torch 2.2.0a0+git6ac8451 torch-xla 2.2.0+git43cd6b5 Test Plan: Manual.
Summary: This change makes the git version appears in pip by default. For any official release, we should turn that off by setting VERSIONED_XLA_BUILD=0. Here is how it looks like: torch 2.2.0a0+git6ac8451 torch-xla 2.2.0+git43cd6b5 Test Plan: Manual.
Summary: This change makes the git version appears in pip by default. For any official release, we should turn that off by setting VERSIONED_XLA_BUILD=0. Here is how it looks like: torch 2.2.0a0+git6ac8451 torch-xla 2.2.0+git43cd6b5 Test Plan: Manual.
Summary: This change makes the git version appears in pip by default. For any official release, we should turn that off by setting VERSIONED_XLA_BUILD=0. Here is how it looks like: torch 2.2.0a0+git6ac8451 torch-xla 2.2.0+git43cd6b5 Test Plan: Manual.
Summary: This change makes the git version appears in pip by default. For any official release, we should turn that off by setting VERSIONED_XLA_BUILD=0. Here is how it looks like: torch 2.2.0a0+git6ac8451 torch-xla 2.2.0+git43cd6b5 Test Plan: Manual.
Summary:
This change makes the git version appears in pip by default. For any official release, we should turn that off by setting VERSIONED_XLA_BUILD=0.
Here is how it looks like:
torch 2.2.0a0+git6ac8451
torch-xla 2.2.0+git43cd6b5
Test Plan:
Manual.