Skip to content

build: add dynamic git-versioning and drop rc0 pre-release tag#4212

Merged
ko3n1g merged 3 commits intoNVIDIA:mainfrom
ko3n1g:dynamic-git-versioning
Apr 9, 2026
Merged

build: add dynamic git-versioning and drop rc0 pre-release tag#4212
ko3n1g merged 3 commits intoNVIDIA:mainfrom
ko3n1g:dynamic-git-versioning

Conversation

@ko3n1g
Copy link
Copy Markdown
Contributor

@ko3n1g ko3n1g commented Apr 8, 2026

Summary

  • megatron/core/package_info.py: drop rc0 pre-release tag (PRE_RELEASE = '') and append +<short-sha> to __version__ at import time using only the git binary
  • .github/workflows/_build_test_publish_wheel.yml: set NO_VCS_VERSION=1 in both the step env (for the host python call that computes EXPECTED_RELEASE_NUMBER) and in the docker run -e flag (for the manylinux build container where git is unavailable)

The opt-out flag NO_VCS_VERSION=1 keeps wheel version strings clean (e.g. 0.18.0 instead of 0.18.0+abc1234) while still allowing local installs to carry the SHA for traceability.

Example

>>> import megatron.core; megatron.core.__version__
'0.18.0+f63874e'

# Opt-out:
NO_VCS_VERSION=1 python -c "import megatron.core; print(megatron.core.__version__)"
0.18.0

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: oliver könig <okoenig@nvidia.com>
@ko3n1g ko3n1g requested review from a team as code owners April 8, 2026 15:30
@svcnvidia-nemo-ci svcnvidia-nemo-ci marked this pull request as draft April 8, 2026 15:31
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

This PR has been automatically converted to draft because all PRs must start as drafts.

When you are ready for review, click Ready for Review to begin the review process. This will:

  1. Add the oncall reviewer (optional reviewer)
  2. Add required review teams based on your changes

See the contribution guide for more details.

@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot bot commented Apr 8, 2026

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@svcnvidia-nemo-ci svcnvidia-nemo-ci added this to the Core 0.16 milestone Apr 8, 2026
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: oliver könig <okoenig@nvidia.com>
@ko3n1g
Copy link
Copy Markdown
Contributor Author

ko3n1g commented Apr 8, 2026

/ok to test

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: oliver könig <okoenig@nvidia.com>
@ko3n1g
Copy link
Copy Markdown
Contributor Author

ko3n1g commented Apr 8, 2026

/ok to test

@ko3n1g ko3n1g marked this pull request as ready for review April 8, 2026 16:13
@svcnvidia-nemo-ci svcnvidia-nemo-ci requested a review from a team April 8, 2026 16:13
@svcnvidia-nemo-ci svcnvidia-nemo-ci added the Final Review PR is in the "final review" stage label Apr 9, 2026
@ko3n1g ko3n1g merged commit 2f5c62c into NVIDIA:main Apr 9, 2026
90 of 96 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

complexity: low Final Review PR is in the "final review" stage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants