Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
154 commits
Select commit Hold shift + click to select a range
5c2ae01
chore: Add codeowners file
ko3n1g Sep 24, 2025
454e7b5
ADLR/megatron-lm!4065 - ci: Add main/dev branching to queuemanager
ko3n1g Sep 24, 2025
c0188dc
ADLR/megatron-lm!4090 - cp: `!4084 - ci: Send dev alerts to separate …
ko3n1g Sep 29, 2025
4808e33
ci(hotfix): Nightly runs
ko3n1g Sep 30, 2025
a43c048
ADLR/megatron-lm!4127 - ADLR/megatron-lm!4084 - ci: Send dev alerts t…
ko3n1g Oct 3, 2025
c862095
ADLR/megatron-lm!4128 - ci: Auto-cherrypick MR into main
ko3n1g Oct 3, 2025
372fc9f
Merge remote-tracking branch 'origin/main' into dev_pull_main_Oct_09
yanring Oct 9, 2025
f9bb58c
ci: Re-add safe-imports
ko3n1g Oct 10, 2025
2a6ca17
ci: No legacy for unit test extended
ko3n1g Oct 10, 2025
54825ab
ci: Reduce number of repeats
ko3n1g Oct 10, 2025
15819b6
ci: Fix notification channel
ko3n1g Oct 10, 2025
879a7a1
ADLR/megatron-lm!4106 - [DEV] Add muon and layer-wise distributed opt…
FDecaYed Oct 10, 2025
4bdc4e2
ADLR/megatron-lm!4060 - Update dev branch README
sbhavani Oct 11, 2025
eff3f6a
ADLR/megatron-lm!4223 - Ko3n1g/cp/4213 to dev
ko3n1g Oct 12, 2025
c7590d8
ADLR/megatron-lm!4070 - [DEV] Support Qwen3next
yuzhongw-nvidia Oct 13, 2025
c7dee4b
!4236 - [Dev] Formatting dev branch code to avoid linting pipeline fa…
ko3n1g Oct 14, 2025
4c3a1be
!4211 - ci(fix): Cherrypicking from forks
ko3n1g Oct 14, 2025
7c350f5
!4239 - ci: Check out dev for formatting
ko3n1g Oct 14, 2025
46687cd
ci: Fix formatting
ko3n1g Oct 14, 2025
50ed5eb
ci: Fix linting
ko3n1g Oct 14, 2025
b01ad5b
ADLR/megatron-lm!4225 - [Dev][NVFP4][MOE] Proper NVFP4 Zero Padding f…
BestJuly Oct 14, 2025
061bc37
ADLR/megatron-lm!4248 - ADLR/megatron-lm!4159 - Fix ProcessGroupColle…
skyw Oct 15, 2025
b007b91
ADLR/megatron-lm!4207 - Refactor dev functional tests.
Oct 15, 2025
32e9518
ci: No batch short anymore
ko3n1g Oct 15, 2025
9568a15
fallback to eager attn config
nrailg Oct 10, 2025
b4c7979
adding cp support to eager attn
nrailg Oct 11, 2025
bbc762d
ADLR/megatron-lm!4231 - [Dev] fix(dataset): fix the divergence when u…
BestJuly Oct 15, 2025
ac0fc23
refine the code
yuzhongw-nvidia Oct 15, 2025
370aa4a
Refine dot_product_attention_context_parallel.py
yuzhongw-nvidia Oct 16, 2025
df41a69
ADLR/megatron-lm!4254 - [Dev] Fix dev nightly functional tests.
Oct 16, 2025
bf1a503
ADLR/megatron-lm!4232 - [DEV] improve muon and layer-wise dist opt un…
FDecaYed Oct 17, 2025
6802bec
ADLR/megatron-lm!4296 - [DEV] fix(MoE): Fix parameter initialization
cuichenx Oct 20, 2025
a6ca591
[Dev] Fix attention output gate for TE2.8
yanring Oct 21, 2025
7843324
Cleanup UT and toml
yanring Oct 21, 2025
a48a416
Clean up functional test
yanring Oct 21, 2025
1a6a98e
Merge remote-tracking branch 'origin/main' into zijiey/pull-main-Oct-20
yanring Oct 21, 2025
12839ed
build: Fix jet
ko3n1g Oct 21, 2025
a8bad4b
ADLR/megatron-lm!4312 - [dev] Set tensor-parallel attributes irrespec…
yaoyu-33 Oct 21, 2025
d9153a5
ADLR/megatron-lm!4237 - [Dev] perf(MoE): Add the Hybrid-EP backend to…
Autumn1998 Oct 22, 2025
2e56506
ADLR/megatron-lm!4235 - [dev] Support multimodule communication
shifangx Oct 22, 2025
1c8bf21
Merge branch 'dev' into 'zijiey/pull-main-Oct-20'
yanring Oct 23, 2025
97ef777
chore: Update golden values.
yanring Oct 23, 2025
3bf9b87
cp: !4298 - ci: Refactor testsytem - Removal of JET Artifacts
ko3n1g Oct 23, 2025
265f4ee
ci: Add copyright-checker for GitHub
ko3n1g Oct 23, 2025
bec6582
ADLR/megatron-lm!4298 - ci: Refactor testsytem - Removal of JET Artif…
ko3n1g Oct 23, 2025
855aa49
ci: Fix copyright checker (#1889) (#1890)
ko3n1g Oct 23, 2025
6068fa9
ci: Run on dev
ko3n1g Oct 23, 2025
8856794
ci: Bump copyright header (#1894)
ko3n1g Oct 23, 2025
beceec6
ci: Allow runs on dev branch
ko3n1g Oct 23, 2025
13b6a36
ci: Linting on push
ko3n1g Oct 23, 2025
14a0a23
ci: Run linting only on PR
ko3n1g Oct 23, 2025
8e03549
ci(fix): HAS_RUN_TESTS_LABEL
ko3n1g Oct 23, 2025
da84298
ci: Fix linting
ko3n1g Oct 23, 2025
38166a6
ci: Add codeowners to dev branch (#1898)
ko3n1g Oct 23, 2025
620826b
ci(fix): dynamic inference tests
ko3n1g Oct 23, 2025
829ae2f
ci(fix): No copyright on push
ko3n1g Oct 23, 2025
f737697
ci: Move test optimizer into its own bucket (#1909)
ko3n1g Oct 24, 2025
176a2ed
ci: Update container image tags to use github.sha
ko3n1g Oct 24, 2025
d3d2048
Ko3n1g/chore/merge main into dev (#1903)
ko3n1g Oct 24, 2025
1ef95d9
ci: Fix approval bot
ko3n1g Oct 24, 2025
9b8d703
ci: Fix dev branch CI (#1922)
chtruong814 Oct 24, 2025
10d280a
Ko3n1g/ci/cherrypick automation dev (#1926)
ko3n1g Oct 24, 2025
017c7b3
ci: Fix dev
ko3n1g Oct 24, 2025
598d41f
Ko3n1g/chore/merge main into dev20251025 (#1943)
ko3n1g Oct 25, 2025
4fc8520
ci: Fix branch of approval bot (#1945)
ko3n1g Oct 25, 2025
574a009
ci(fix): Approval gate
ko3n1g Oct 26, 2025
8243834
ci: Approval gate
ko3n1g Oct 26, 2025
106516c
ci: Approval gate rule
ko3n1g Oct 26, 2025
ef48a13
ci: Update golden values dev
ko3n1g Oct 26, 2025
3281c01
ci: Approval gate
ko3n1g Oct 26, 2025
8fe0c3a
ci: Approval bot
ko3n1g Oct 26, 2025
a33936d
ci: Increase time limit for main tests
ko3n1g Oct 26, 2025
5176823
ci: Auto-assign milestone (#1952)
ko3n1g Oct 26, 2025
4b6ba60
ci: Run on push to release branch (#1960) (#1962)
ko3n1g Oct 26, 2025
221747d
[DEV] support split qkv in muon (#1915)
FDecaYed Oct 27, 2025
c2410fc
Merge branch 'dev' into nrwu/eagercp
yuzhongw-nvidia Oct 27, 2025
9069e12
[Dev] feat(moe): Fine-grained activation offloading (#1912)
lhb8125 Oct 27, 2025
a0a1866
ci: Add golden values for gpt_dynamic_inference_tp1_pp1_583m_cuda_gra…
ko3n1g Oct 27, 2025
c9fb78b
ci: Add more golden values
ko3n1g Oct 27, 2025
6f51284
ci: Aggregate throughput
ko3n1g Oct 27, 2025
eb07b69
Update dev branch codeowners (#1963)
chtruong814 Oct 27, 2025
fa384d2
[Dev] JIT for MoE router and preprocess (#1918)
yaox12 Oct 27, 2025
65c8f40
tests: Fix paths for test_cases
ko3n1g Oct 27, 2025
2155c47
Revert "[Dev] feat(moe): Fine-grained activation offloading (#1912)"
ko3n1g Oct 27, 2025
d95e86a
fix: Missing logger (#1966)
ko3n1g Oct 27, 2025
113cefb
ci: Update copyright checker (#1974)
ko3n1g Oct 27, 2025
d9e0806
[Dev] Update symmetric registration interface to sync-up with upstrea…
youngeunkwon0405 Oct 28, 2025
cc33e00
cp: `Megatron-FSDP Expert Parallel (DeepSeek-v3) Support` into `dev` …
chtruong814 Oct 28, 2025
13edb58
Revert "cp: `Megatron-FSDP Expert Parallel (DeepSeek-v3) Support` int…
ko3n1g Oct 28, 2025
c22c2aa
[Was PR1912][Dev] feat(moe): Fine-grained activation offloading (#1969)
lhb8125 Oct 28, 2025
bada8f9
ci(fix): `Run tests` label (#1970) (#2006)
ko3n1g Oct 29, 2025
ccf794e
Renaming golden values (#2020)
lhb8125 Oct 29, 2025
7342f67
Ko3n1g/chore/sync main to dev (#2018)
ko3n1g Oct 29, 2025
0d0f29c
Ko3n1g/fix/golden values (#2037)
ko3n1g Oct 29, 2025
1d1ac73
cp: `Megatron-FSDP Expert Parallel (DeepSeek-v3) Support` into `dev` …
chtruong814 Oct 30, 2025
2c85448
Update golden values due to PR #2007 (#2057)
chtruong814 Oct 31, 2025
402bc50
Add DeepSeek-V3 GB200 NVL72 optimization guide (#2059)
sbhavani Oct 31, 2025
4959f1f
ci(hotfix): Disable flaky tests
ko3n1g Oct 31, 2025
4008d3d
[DEV] feat(MoE): Refactor cuda_graph_scope (#1917)
buptzyb Oct 31, 2025
44539d1
Add mirror to main workflow (#2042)
chtruong814 Oct 31, 2025
41c6e66
ci: Remove cluster specific golden values (#2069)
ko3n1g Oct 31, 2025
9d05926
ci: Disable inference test
ko3n1g Nov 2, 2025
effebd8
[Dev] feat(moe): Support placing MTP layers into standalone stages (#…
BestJuly Nov 2, 2025
1d9edcf
[Dev] A Guide to Reproduce DeepSeek-V3 Pre-training Performance on GB…
yaox12 Nov 3, 2025
eb0783b
[Dev] Minor updates to the guide (#2103)
yaox12 Nov 3, 2025
ad226e4
Revert "[Dev] feat(moe): Support placing MTP layers into standalone s…
ko3n1g Nov 3, 2025
35eeab7
Reapply "[Dev] feat(moe): Support placing MTP layers into standalone …
ko3n1g Nov 3, 2025
21355dd
ci: Disable broken unit
ko3n1g Nov 3, 2025
4facf29
[Dev] Fixes for gpt-oss (#2116)
cuichenx Nov 4, 2025
bd199dc
[Dev] Support LayerWiseDistributedOptimizer with torch_dist checkpoin…
BoxiangW Nov 4, 2025
ee14b5b
[Dev] Nemotron nano v2 vl (#2115)
cuichenx Nov 4, 2025
09abfad
[DEV] remove training dependency from megatron core for fsdp checkpoi…
ananthsub Nov 4, 2025
ec37ae3
[Dev] Fix UT `TestPartialCudaGraph` which incorrectly set MTP in UT (…
BestJuly Nov 4, 2025
f3cbf03
ci: Restore `gpt3_moe_mcore_te_tp4_ep2_etp2_pp2_scoped_cudagraph`
ko3n1g Nov 4, 2025
ecbfe70
chore: Fix autoformatter (#2073) (#2134)
ko3n1g Nov 4, 2025
79e8592
add device and dtype to empty inv_dt init (#2137)
maanug-nv Nov 5, 2025
3c1b98e
Remove DS-V3 doc - draft being updated (#2155)
sbhavani Nov 6, 2025
b2fdd94
[DEV] torch_dist fixes, speed improvements and memory reduction for l…
FDecaYed Nov 6, 2025
6cc224d
[Dev] Fix Qwen3-Next hang on Blackwell, add a flag to control torch.c…
yuzhongw-nvidia Nov 6, 2025
f4bd87e
[dev] Fix cuda graph scope check in `language_model.py` (#2158)
ananthsub Nov 6, 2025
3207c23
[Dev] Remove experimental tags for fused kernels (#2172)
Nov 10, 2025
ae4cda5
Merge branch 'main' into dev
FDecaYed Nov 11, 2025
3cbe5c6
[DEV] pull changes from main(f150f42e3929f7f2171e3687e67990332a76285b…
ko3n1g Nov 11, 2025
f545d76
fallback to eager attn config
nrailg Oct 10, 2025
53cac6d
adding cp support to eager attn
nrailg Oct 11, 2025
f943607
refine the code
yuzhongw-nvidia Oct 15, 2025
b65cb5c
Refine dot_product_attention_context_parallel.py
yuzhongw-nvidia Oct 16, 2025
6f5f12f
fix CI: copyright, linting, and import
yuzhongw-nvidia Oct 27, 2025
6b59d71
fix(transformer_config): Initialize cuda_graph_scope if not set regar…
cuichenx Nov 11, 2025
442a7f2
[Dev] fix(offloading): Accuracy mismatch when offloading and recomput…
lhb8125 Nov 11, 2025
4abf166
refine the code
yuzhongw-nvidia Nov 6, 2025
b5e8f58
Merge branch 'nrwu/eagercp' into eagercp
yuzhongw-nvidia Nov 11, 2025
6b01330
Ko3n1g/chore/update dev release settings (#2099)
ko3n1g Nov 11, 2025
d7d71e0
Merge remote-tracking branch 'github/main' into dev
ko3n1g Nov 11, 2025
56019e6
[DEV] Cherry-pick: M4 + Dist Checkpoint: Replace global parallel stat…
yaoyu-33 Nov 11, 2025
2c2ee22
[Dev] Remove redundant reduce in aux_loss logging (#2094)
BestJuly Nov 12, 2025
b7c1e75
[DEV] Make CUDA graph compatible with FP8 params (tensorwise & blockw…
kunlunl Nov 12, 2025
ca68395
remove workflow
ko3n1g Nov 12, 2025
1d502cd
[Dev] Reduce Overhead in Timers (#2208)
yaox12 Nov 12, 2025
a2048c8
Revert "[DEV] Cherry-pick: M4 + Dist Checkpoint: Replace global paral…
ko3n1g Nov 12, 2025
a2a1c89
[Dev] replay: Cherry-pick: M4 + Dist Checkpoint: Replace global paral…
yaoyu-33 Nov 12, 2025
8427584
[Dev]Revert torch ckpt format change for LayerwiseDistOpt (#2228)
BoxiangW Nov 13, 2025
7020e1f
[Dev] Add more tests for LayerwiseDistOpt with dist_ckpt (#2132)
BoxiangW Nov 13, 2025
693587d
[Dev] Add muon golden value (#2247)
BoxiangW Nov 14, 2025
b55a544
bump deps
ko3n1g Nov 14, 2025
bfbf13f
Merge remote-tracking branch 'github/dev' into ko3n1g/chore/main-to-dev
ko3n1g Nov 14, 2025
658931e
ci: Create weekly dev branch (#2223)
ko3n1g Nov 14, 2025
1211348
[20251111] Ko3n1g/chore/main to dev (#2211)
ko3n1g Nov 14, 2025
71fa2e6
Revert "[20251111] Ko3n1g/chore/main to dev (#2211)" (#2266)
chtruong814 Nov 17, 2025
0bf9ff9
chroe: [Dev]Disable muon test for now (#2275)
BoxiangW Nov 17, 2025
565202f
Fixes of Merge main into dev
ko3n1g Nov 17, 2025
4b78163
Replay: [20251111] Ko3n1g/chore/main to dev (#2267)
ko3n1g Nov 17, 2025
d1a31a3
[Dev] MuonClip support (non-split version) on dev branch (#2194)
BoxiangW Nov 18, 2025
74457c1
Merge branch 'dev' into eagercp
yuzhongw-nvidia Nov 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 4 additions & 46 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,54 +1,12 @@
megatron/core/ @NVIDIA/core-adlr @NVIDIA/core-nemo

megatron/core/models/gpt/ @NVIDIA/gpt

megatron/core/models/multimodal/ @NVIDIA/multi-modal

megatron/core/models/mamba/ @NVIDIA/hybrid-mamba

megatron/core/datasets/ @NVIDIA/datasets

megatron/core/distributed/fsdp/ @NVIDIA/megatron-fsdp

megatron/core/transformer/fsdp_dtensor_checkpoint.py @NVIDIA/megatron-fsdp

megatron/core/dist_checkpointing/ @NVIDIA/dist-checkpointing

megatron/core/optimizer/distrib_optimizer/ @NVIDIA/dist-optimizer

megatron/core/inference/modelopt_support @NVIDIA/quantization-and-inference

megatron/core/datasets/ @NVIDIA/datasets

megatron/core/pipeline_parallel/ @NVIDIA/pipeline-parallelism

megatron/core/transformer/ @NVIDIA/core-adlr @NVIDIA/core-nemo

megatron/core/transformer/moe/ @NVIDIA/core-adlr @NVIDIA/core-devtech

megatron/core/inference/ @NVIDIA/inference

megatron/core/parallel_state.py @NVIDIA/core-nemo

megatron/core/post_training/ @NVIDIA/post-training

megatron/post_training/ @NVIDIA/post-training
* @NVIDIA/core-nemo @NVIDIA/core-devtech

.gitlab/ @NVIDIA/ci
.github/ @NVIDIA/ci
.gitlab-ci.yml @NVIDIA/ci
docker/ @NVIDIA/ci
tests/unit_tests/run_ci_test.sh @NVIDIA/ci
tests/test_utils/python_scripts/
tests/test_utils/python_scripts/
tests/functional_tests/python_test_utils/ @NVIDIA/ci
tests/functional_tests/shell_test_utils/ @NVIDIA/ci
megatron/core/transformer/transformer_block.py @NVIDIA/ci
megatron/core/transformer/transformer_layer.py @NVIDIA/ci
tests/functional_tests/test_cases/ @NVIDIA/ci
tests/functional_tests/recipes/ @NVIDIA/ci
tests/unit_tests/ @NVIDIA/ci

megatron/rl/ @NVIDIA/reinforcement-learning
examples/rl/ @NVIDIA/reinforcement-learning
test/unit_tests/test_rl_utils.py @NVIDIA/reinforcement-learning
train_rl.py @NVIDIA/reinforcement-learning
pyproject.toml @NVIDIA/ci
uv.lock @NVIDIA/ci
1 change: 1 addition & 0 deletions .github/workflows/build-test-publish-wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ name: Build, test, and publish a PyPi wheel (to testpypi).
on:
push:
branches:
- dev
- main
- "pull-request/[0-9]+"
- "deploy-release/*"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/cherry-pick-release-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ on:
push:
branches:
- main
- dev

jobs:
cherry-pick:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/cicd-approve-test-queue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ jobs:

workflow_id = workflow["id"]
workflow_name = workflow["display_title"]
pr_info = workflow.get("pull_requests", [{}])[0]
pr_number = pr_info.get("number", "unknown")
print(f"Approving workflow {workflow_name} with Run Id: {workflow_id}")

deployment_url = f"actions/runs/{workflow_id}/pending_deployments"
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/cicd-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,13 @@ jobs:
id: check-membership
env:
IS_MAIN_BRANCH: ${{ github.ref == 'refs/heads/main' }}
IS_DEV_BRANCH: ${{ github.ref == 'refs/heads/dev' }}
IS_MERGE_GROUP: ${{ github.event_name == 'merge_group' }}
SCHEDULED_JOB: ${{ github.event_name == 'schedule' }}
run: |
PR_AUTHOR=${{ fromJSON(steps.get-pr-info.outputs.pr-info || '{}').user.login }}

if [ "${{ env.SCHEDULED_JOB }}" == "true" ] || [ "${IS_MAIN_BRANCH}" == "true" ] || [ "${IS_MERGE_GROUP}" == "true" ]; then
if [ "${{ env.SCHEDULED_JOB }}" == "true" ] || [ "${IS_MAIN_BRANCH}" == "true" ] || [ "${IS_DEV_BRANCH}" == "true" ] || [ "${IS_MERGE_GROUP}" == "true" ]; then
echo "is_maintainer=true" | tee -a $GITHUB_OUTPUT
exit 0
fi
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/copyright-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ name: Copyright check
on:
push:
branches:
- dev
- main
- "pull-request/[0-9]+"
- "deploy-release/*"
merge_group:
Expand Down
129 changes: 129 additions & 0 deletions .github/workflows/mirror-to-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
# Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Mirror Dev to Main

on:
push:
branches:
- "pull-request/[0-9]+"

jobs:
cherry-pick-to-main:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.PAT }}

- name: Get PR info
id: get-pr-info
uses: nv-gha-runners/get-pr-info@main

- name: Configure Git
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "GitHub Actions Bot"

- name: Cherry-pick to main
env:
GH_TOKEN: ${{ secrets.PAT }}
run: |
set -x

PR_NUMBER=${{ fromJSON(steps.get-pr-info.outputs.pr-info || '{}').number }}
BASE_REF="${{ fromJSON(steps.get-pr-info.outputs.pr-info).base.ref }}"
HAS_MIRROR_MAIN_LABEL=$(gh pr view $PR_NUMBER --json labels | jq '[.labels[].name] | any(. == "mirror-to-main")' || echo "false")
TARGET_BRANCH="cherry-pick-$PR_NUMBER-into-main"

# Skip if not labeled with mirror-to-main
if [ "$HAS_MIRROR_MAIN_LABEL" != "true" ]; then
echo "PR is not labeled with mirror-to-main, will not mirror to main."
exit 0
fi

# Skip if not targeting dev
if [ "$BASE_REF" != "dev" ]; then
echo "PR is not targeting dev, will not mirror to main."
exit 0
fi

# Check if target branch already exists
if git ls-remote --heads origin "refs/heads/$TARGET_BRANCH" | grep -q .; then
echo "Target branch already exists, will not cherry-pick again."
exit 0
fi

# Get PR details
PR_AUTHOR="${{ fromJSON(steps.get-pr-info.outputs.pr-info).user.login }}"
PR_TITLE="${{ fromJSON(steps.get-pr-info.outputs.pr-info).title }}"
SOURCE_BRANCH="${{ fromJSON(steps.get-pr-info.outputs.pr-info).head.ref }}"
SOURCE_REPO="${{ fromJSON(steps.get-pr-info.outputs.pr-info).head.repo.full_name }}"

# Fetch all branches
git fetch origin dev

# Handle forks vs same repo
if [ "$SOURCE_REPO" = "${{ github.repository }}" ]; then
git fetch origin "$SOURCE_BRANCH"
git checkout "$SOURCE_BRANCH"
else
git fetch "https://github.com/$SOURCE_REPO.git" "$SOURCE_BRANCH"
git checkout FETCH_HEAD
fi

# Find commit range to cherry-pick
START_COMMIT=$(git merge-base origin/dev HEAD)
END_COMMIT=$(git rev-parse HEAD)

# Create cherry-pick branch from main
git fetch origin main
git checkout main
git checkout -b "$TARGET_BRANCH"

# Cherry-pick commits
if ! git cherry-pick "$START_COMMIT..$END_COMMIT"; then
# Comment on the original PR about the failure
COMMENT_BODY=$(cat <<'EOF'
❌ **Cherry-pick to main failed**

The cherry-pick encountered conflicts and could not be completed automatically.

**Next steps:**
1. Manually create a PR with these changes to main
2. Resolve any conflicts
EOF
)

gh pr comment $PR_NUMBER --body "$COMMENT_BODY"
exit 1
fi

# Push branch
git push -u origin "$TARGET_BRANCH"

# Create PR to main
gh pr create \
--base main \
--head "$TARGET_BRANCH" \
--title "cp: \`$PR_TITLE ($PR_NUMBER)\` into \`main\`" \
--body "[🤖]: Hi @$PR_AUTHOR 👋<br><br>We've cherry-picked \`$PR_TITLE (#$PR_NUMBER)\` into \`main\` for you! 🚀<br><br>Please review and approve this cherry-pick at your convenience!" \
--label "cherry-pick" \
--reviewer "$PR_AUTHOR"

75 changes: 0 additions & 75 deletions .github/workflows/multi-approval-bot.yml

This file was deleted.

1 change: 1 addition & 0 deletions .gitlab/stages/00.pre.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ pre:create_ci_branches_dev:
- branch: ci-dev-rebuild-mcore-nemo-image
- branch: ci-dev-mr
- branch: ci-dev-nightly
- branch: ci-dev-weekly
- branch: ci-dev-upgrade-dependencies
tags:
- arch/amd64
Expand Down
12 changes: 6 additions & 6 deletions .gitlab/stages/04.functional-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ functional:configure:
- |
RECORD_CHECKPOINTS=$([[ "$CI_MERGE_REQUEST_LABELS" == *"Record checkpoints"* || "$FUNCTIONAL_TEST_RECORD_CHECKPOINTS" == "yes" ]] && echo "true" || echo "false")
- |
if [[ "$FUNCTIONAL_TEST_SCOPE" == "release" || "$FUNCTIONAL_TEST_SCOPE" == "pre-release" ]]; then
if [[ "$FUNCTIONAL_TEST_SCOPE" == "release" || "$FUNCTIONAL_TEST_SCOPE" == "weekly" ]]; then
FUNCTIONAL_TEST_NAME=$(eval echo $FUNCTIONAL_TEST_NAME)
RELEASE_ARGS=(
"--run-name"
Expand Down Expand Up @@ -172,15 +172,15 @@ functional:run_dev_dgx_h100:
functional:run_nemo:
extends: [.functional_tests_rules]
trigger:
project: "dl/joc/nemo-ci"
project: 'dl/joc/nemo-ci'
branch: main-mirror
strategy: depend
inherit:
variables: true
variables:
MCORE_COMMIT: $CI_COMMIT_SHA
TEST_NEMO2_MODULE: "True"
ALLOW_FAILURE_DEPENDENCY: "True"
MCORE_MR_COMMIT: $CI_COMMIT_SHA
TEST_NEMO2_MODULE: 'True'
ALLOW_FAILURE_DEPENDENCY: 'True'
TESTS_TO_RUN_ON_THIS_COMMIT: nightly
rules:
- if: $FUNCTIONAL_TEST == "yes"
Expand Down Expand Up @@ -217,7 +217,7 @@ functional:x_notify:
- export RO_API_TOKEN=${PROJECT_ACCESS_TOKEN_MCORE}
- export GITLAB_ENDPOINT
- export CONTEXT=$FUNCTIONAL_TEST_SCOPE
- export TAG_TEAM=$([[ "$CI_COMMIT_BRANCH" == "main" ]] && echo "1" || "0")
- export TAG_TEAM=$([[ "$CI_COMMIT_BRANCH" == "main" || "$CI_COMMIT_BRANCH" == "dev" ]] && echo "1" || "0")
- export TEAM_SLUG=$SLACK_ADMIN
- |
python tests/test_utils/python_scripts/notify.py \
Expand Down
Loading
Loading