@@ -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