Skip to content

Commit 34da894

Browse files
committed
Merge branch 'main' into super-v3-pr
2 parents f7a84ba + 987269b commit 34da894

201 files changed

Lines changed: 1108 additions & 262 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.dev.commit‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
9374a4d328641a2fbbad4fd41cf038b539dcf1e6
1+
c72c4599012297cfbd1d57e006b544478b6bbf78

‎.github/actions/test-template/action.yml‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ inputs:
5252
test-data-path:
5353
description: "Test data path"
5454
required: true
55+
script_dir:
56+
description: "Subdirectory within launch_scripts/ for functional tests (active or flaky)"
57+
required: false
58+
default: "active"
5559
runner:
5660
description: "Runner to use for test"
5761
required: true
@@ -197,7 +201,7 @@ runs:
197201
echo "📝 Stored MCore commit SHA: ${{ github.event.inputs.mcore_commit }}"
198202
fi
199203
200-
timeout $(( ${{ inputs.timeout }} * 60 ))s bash tests/${{ inputs.is_unit_test == 'true' && 'unit_tests' || 'functional_tests' }}/${{ inputs.script }}.sh || EXIT_CODE=$?
204+
timeout $(( ${{ inputs.timeout }} * 60 ))s bash tests/${{ inputs.is_unit_test == 'true' && 'unit_tests' || format('functional_tests/launch_scripts/{0}', inputs.script_dir) }}/${{ inputs.script }}.sh || EXIT_CODE=$?
201205
202206
if [[ "$EXIT_CODE" -eq 124 ]]; then
203207
echo "::error:: Test timed out after ${{ inputs.timeout }} minutes. Please reach out to the PIC."

‎.github/workflows/cicd-main.yml‎

Lines changed: 105 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ jobs:
295295
296296
check-labels:
297297
runs-on: ubuntu-latest
298-
needs: [pre-flight]
298+
needs: [pre-flight, cicd-container-build]
299299
outputs:
300300
needs_more_tests: ${{ steps.check.outputs.needs_more_tests }}
301301
steps:
@@ -438,22 +438,51 @@ jobs:
438438
test-data-path: ${{ needs.pre-flight.outputs.test_data_path }}
439439
runner: ${{ needs.pre-flight.outputs.runner_prefix }}-gpu-x2
440440

441+
generate-test-matrix:
442+
needs: [pre-flight, cicd-container-build]
443+
runs-on: ubuntu-latest
444+
outputs:
445+
matrix_l0: ${{ steps.scan.outputs.matrix_l0 }}
446+
matrix_l1: ${{ steps.scan.outputs.matrix_l1 }}
447+
matrix_l2: ${{ steps.scan.outputs.matrix_l2 }}
448+
matrix_flaky: ${{ steps.scan.outputs.matrix_flaky }}
449+
steps:
450+
- uses: actions/checkout@v4
451+
- id: scan
452+
shell: bash
453+
run: |
454+
get_timeout() {
455+
local f="$1"
456+
local t
457+
t=$(grep -m1 '^# CI_TIMEOUT=' "$f" | cut -d= -f2)
458+
echo "${t:-30}"
459+
}
460+
for tier in L0 L1 L2; do
461+
entries=""
462+
for f in tests/functional_tests/launch_scripts/active/${tier}_*.sh; do
463+
name=$(basename "$f" .sh)
464+
timeout=$(get_timeout "$f")
465+
entries="${entries}{\"script\":\"${name}\",\"timeout\":${timeout}},"
466+
done
467+
matrix="{\"include\":[${entries%,}]}"
468+
echo "matrix_${tier,,}=${matrix}" | tee -a "$GITHUB_OUTPUT"
469+
done
470+
entries=""
471+
for f in tests/functional_tests/launch_scripts/flaky/L*.sh; do
472+
[ -f "$f" ] || continue
473+
name=$(basename "$f" .sh)
474+
timeout=$(get_timeout "$f")
475+
entries="${entries}{\"script\":\"${name}\",\"timeout\":${timeout}},"
476+
done
477+
echo "matrix_flaky={\"include\":[${entries%,}]}" | tee -a "$GITHUB_OUTPUT"
478+
441479
# L0: runs on every PR, main push, and schedule
442480
cicd-functional-tests-l0:
443481
strategy:
444482
fail-fast: false
445483
max-parallel: 16
446-
matrix:
447-
include:
448-
- script: L0_Launch_training
449-
timeout: 50
450-
- script: L0_Launch_converter
451-
- script: L0_Launch_data
452-
- script: L0_Launch_models_deepseek
453-
- script: L0_Launch_models_qwen3
454-
- script: L0_Launch_recipes_llama_1b
455-
- script: L0_Launch_utils
456-
needs: [pre-flight, cicd-unit-tests-core, cicd-unit-tests-diffusion]
484+
matrix: ${{ fromJSON(needs.generate-test-matrix.outputs.matrix_l0) }}
485+
needs: [pre-flight, generate-test-matrix, cicd-unit-tests-core, cicd-unit-tests-diffusion]
457486
runs-on: ${{ needs.pre-flight.outputs.runner_prefix }}-gpu-x2
458487
if: |
459488
(
@@ -519,30 +548,8 @@ jobs:
519548
strategy:
520549
fail-fast: false
521550
max-parallel: 16
522-
matrix:
523-
include:
524-
- script: L1_Launch_models_gemma1
525-
- script: L1_Launch_models_gemma2
526-
- script: L1_Launch_models_gemma3
527-
- script: L1_Launch_models_glm
528-
- script: L1_Launch_models_gpt_oss
529-
- script: L1_Launch_models_ministral3
530-
- script: L1_Launch_models_mistral
531-
- script: L1_Launch_models_nemotron
532-
- script: L1_Launch_models_nemotronh
533-
- script: L1_Launch_models_olmoe
534-
- script: L1_Launch_models_qwen2
535-
- script: L1_Launch_models_qwen25_vl
536-
- script: L1_Launch_models_qwen35_vl
537-
- script: L1_Launch_models_qwen3_vl
538-
- script: L1_Launch_post_training_quantization
539-
# - script: L1_Launch_quantization_export
540-
- script: L1_Launch_recipes_gpt_oss
541-
- script: L1_Launch_recipes_llama_3b
542-
- script: L1_Launch_recipes_ministral3
543-
- script: L1_Launch_recipes_nemotronh
544-
- script: L1_Launch_recipes_qwen
545-
needs: [pre-flight, cicd-unit-tests-core, cicd-unit-tests-diffusion, check-labels]
551+
matrix: ${{ fromJSON(needs.generate-test-matrix.outputs.matrix_l1) }}
552+
needs: [pre-flight, generate-test-matrix, cicd-unit-tests-core, cicd-unit-tests-diffusion, check-labels]
546553
runs-on: ${{ needs.pre-flight.outputs.runner_prefix }}-gpu-x2
547554
if: |
548555
(
@@ -609,29 +616,8 @@ jobs:
609616
strategy:
610617
fail-fast: false
611618
max-parallel: 16
612-
matrix:
613-
include:
614-
- script: L2_Launch_ckpts_mbridge_to_mlm_llama32_1b
615-
- script: L2_Launch_ckpts_mlm_to_mbridge_llama32_1b
616-
- script: L2_Launch_ckpts_mbridge_to_mlm_qwen3_4b
617-
- script: L2_Launch_ckpts_mlm_to_mbridge_qwen3_4b
618-
# NemotronH 4B ckpt jobs skipped until hybrid_layer_pattern rename lands
619-
# - script: L2_Launch_ckpts_mbridge_to_mlm_nemotronh_4b
620-
# - script: L2_Launch_ckpts_mlm_to_mbridge_nemotronh_4b
621-
- script: L2_Launch_models_gemma_vl
622-
- script: L2_Launch_models_llama_nemotron
623-
- script: L2_Launch_models_nemotron_vl
624-
- script: L2_Launch_models_nemotronh_quantization
625-
- script: L2_Launch_models_qwen_quantization
626-
- script: L2_Launch_models_qwen_vl_quantization
627-
- script: L2_Launch_quantization_aware_training
628-
- script: L2_Launch_recipes_gemma_vl
629-
- script: L2_Launch_recipes_llama_cuda_graphs
630-
- script: L2_Launch_recipes_llama_distill
631-
- script: L2_Launch_recipes_qwen_vl
632-
- script: L2_Launch_models_flux
633-
- script: L2_Launch_models_wan
634-
needs: [pre-flight, cicd-unit-tests-core, cicd-unit-tests-diffusion]
619+
matrix: ${{ fromJSON(needs.generate-test-matrix.outputs.matrix_l2) }}
620+
needs: [pre-flight, generate-test-matrix, cicd-unit-tests-core, cicd-unit-tests-diffusion]
635621
runs-on: ${{ needs.pre-flight.outputs.runner_prefix }}-gpu-x2
636622
if: |
637623
(
@@ -693,6 +679,66 @@ jobs:
693679
test-data-path: ${{ needs.pre-flight.outputs.test_data_path }}
694680
runner: ${{ needs.pre-flight.outputs.runner_prefix }}-gpu-x2
695681

682+
cicd-functional-tests-flaky:
683+
if: github.event_name == 'workflow_dispatch'
684+
strategy:
685+
fail-fast: false
686+
max-parallel: 16
687+
matrix: ${{ fromJSON(needs.generate-test-matrix.outputs.matrix_flaky) }}
688+
needs: [pre-flight, generate-test-matrix, cicd-unit-tests-core, cicd-unit-tests-diffusion]
689+
runs-on: ${{ needs.pre-flight.outputs.runner_prefix }}-gpu-x2
690+
name: ${{ matrix.script }}
691+
environment: nemo-ci
692+
env:
693+
HF_HOME: /home/TestData/HF_HOME
694+
TRANSFORMERS_OFFLINE: "1"
695+
HF_HUB_OFFLINE: "1"
696+
steps:
697+
- name: Checkout
698+
uses: actions/checkout@v4
699+
with:
700+
submodules: recursive
701+
702+
- name: Update MCore submodule (if triggered from MCore)
703+
if: ${{ github.event.inputs.mcore_ref != '' }}
704+
run: |
705+
echo "🔄 Updating MCore submodule for functional tests..."
706+
cd 3rdparty/Megatron-LM
707+
git fetch ${{ github.event.inputs.mcore_repo || 'origin' }} ${{ github.event.inputs.mcore_ref }}
708+
git checkout ${{ github.event.inputs.mcore_ref }}
709+
710+
ACTUAL_COMMIT=$(git rev-parse HEAD)
711+
EXPECTED_COMMIT="${{ github.event.inputs.mcore_ref }}"
712+
713+
echo "🧪 FUNCTIONAL TESTS - MCore verification:"
714+
echo "Expected: ${EXPECTED_COMMIT}"
715+
echo "Actual: ${ACTUAL_COMMIT}"
716+
717+
if [ "${ACTUAL_COMMIT}" != "${EXPECTED_COMMIT}" ]; then
718+
echo "❌ ERROR: MCore commit mismatch!"
719+
exit 1
720+
fi
721+
722+
echo "✅ MCore commit verified"
723+
echo "📦 Container: ${{ env.container-registry }}/megatron-bridge:${{ github.sha }}"
724+
git log -1 --oneline
725+
726+
- name: main
727+
uses: ./.github/actions/test-template
728+
with:
729+
script_dir: flaky
730+
script: ${{ matrix.script }}
731+
timeout: ${{ fromJSON(matrix.timeout || '30') }}
732+
is_unit_test: "false"
733+
has-azure-credentials: "true"
734+
azure-client-id: ${{ secrets.AZURE_CLIENT_ID }}
735+
azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}
736+
azure-subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
737+
PAT: ${{ secrets.PAT }}
738+
container-image: ${{ env.container-registry }}/megatron-bridge:${{ github.sha }}
739+
test-data-path: ${{ needs.pre-flight.outputs.test_data_path }}
740+
runner: ${{ needs.pre-flight.outputs.runner_prefix }}-gpu-x2
741+
696742
Nemo_CICD_Test:
697743
needs:
698744
- pre-flight

0 commit comments

Comments
 (0)