Skip to content
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

Merged
merged 3 commits into from
Oct 25, 2023
Merged

Make the git version appears in pip #5728

merged 3 commits into from
Oct 25, 2023

Conversation

alanwaketan
Copy link
Collaborator

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.
setup.py Show resolved Hide resolved
Copy link
Collaborator

@ManfeiBai ManfeiBai left a comment

Choose a reason for hiding this comment

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

LGTM

setup.py Show resolved Hide resolved
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'):
Copy link
Collaborator

@will-cromar will-cromar Oct 24, 2023

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.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sure, why not.

@alanwaketan
Copy link
Collaborator Author

@will-cromar Can you take another look?

Copy link
Collaborator

@will-cromar will-cromar left a 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'):
Copy link
Collaborator

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?

Copy link
Collaborator Author

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.

@alanwaketan
Copy link
Collaborator Author

Thanks all for the review. Pending CI now.

@alanwaketan alanwaketan merged commit ecc0e23 into master Oct 25, 2023
18 checks passed
ghpvnist pushed a commit to ghpvnist/xla that referenced this pull request Oct 31, 2023
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.
mbzomowski pushed a commit to mbzomowski-test-org/xla that referenced this pull request Nov 16, 2023
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.
chunnienc pushed a commit to chunnienc/xla that referenced this pull request Dec 14, 2023
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.
golechwierowicz pushed a commit that referenced this pull request Jan 12, 2024
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.
bhavya01 pushed a commit that referenced this pull request Apr 22, 2024
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants