Skip to content

Commit

Permalink
Merge branch 'ko3n1g/ci/run-nemo-ci' into 'main'
Browse files Browse the repository at this point in the history
ci: Allow running nemo-ci

See merge request ADLR/megatron-lm!2509
  • Loading branch information
ko3n1g committed Jan 8, 2025
2 parents ad41174 + 6ce0da5 commit 05780f3
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 2 deletions.
18 changes: 16 additions & 2 deletions .gitlab/stages/01.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,8 @@ test:pypi_build_wheel:
PRE_RELEASE=$(sed -n "s/.*PRE_RELEASE = '\(.*\)'/\1/p" megatron/core/package_info.py)
sed -i "/^PRE_RELEASE/c\PRE_RELEASE = '${PRE_RELEASE}.dev$((RANDOM % 900000 + 100000))'" megatron/core/package_info.py
fi
- /opt/python/cp310-cp310/bin/python -m build
- /opt/python/cp311-cp311/bin/python -m build
- auditwheel repair dist/*.whl
Expand All @@ -353,6 +355,8 @@ test:pypi_test_wheel:
- RELEASE_NUMBER=$(python -c "from megatron import core; print(core.__version__)")
- >
echo "$EXPECTED_RELEASE_NUMBER" == "$RELEASE_NUMBER"
- test "$EXPECTED_RELEASE_NUMBER" == "$RELEASE_NUMBER"
- echo "RELEASE_NUMBER=$EXPECTED_RELEASE_NUMBER" | tee -a build.env
artifacts:
Expand Down Expand Up @@ -380,11 +384,15 @@ test:pypi_push_wheel:
export TWINE_USERNAME=$TWINE_PROD_USERNAME
export TWINE_PASSWORT=$TWINE_PROD_PASSWORD
fi
- pip install twine
- >
for i in 1 2 3 4 5; do
twine upload --verbose -u $TWINE_USERNAME -p $TWINE_PASSWORT --repository $REPOSITORY wheelhouse/* && break || sleep $(( 60*2**i ));
done
rules:
- if: $UNIT_TEST == 'yes' && $CI_PIPELINE_SOURCE == 'merge_request_event' && $CI_MERGE_REQUEST_TARGET_BRANCH_PROTECTED != "true"
allow_failure: true
Expand Down Expand Up @@ -418,6 +426,8 @@ test:gh_release:
"generate_release_notes": false
}'
)
- >
CMD=$(echo curl -L \
-X POST \
Expand All @@ -427,13 +437,14 @@ test:gh_release:
https://api.github.com/repos/NVIDIA/Megatron-LM/releases \
-d "$PAYLOAD"
)
if [[ "$PUBLISH_DRYRUN" == "yes" ]]; then
echo "$CMD"
else
eval "$CMD"
fi
test:notify_release:
needs: [test:pypi_test_wheel, test:pypi_push_wheel, test:gh_release]
extends: [.test_rules]
Expand All @@ -455,16 +466,19 @@ test:notify_release:
}
]
}'
- echo "$MESSAGE"
- >
CMD=$(echo curl \
-X POST \
-H "Content-type: application/json" \
--data "$MESSAGE" ${MCORE_NOTIFICATION_HOOK_MAIN}
)
if [[ "$PUBLISH_DRYRUN" == "yes" ]]; then
echo "$CMD"
else
eval "$CMD"
fi
20 changes: 20 additions & 0 deletions .gitlab/stages/02.functional-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,26 @@ functional:run_dev:
variables:
ENVIRONMENT: dev

functional:run_nemo:
extends: [.functional_tests_rules]
trigger:
project: 'dl/joc/nemo-ci'
branch: main-mirror
strategy: depend
inherit:
variables: true
variables:
MCORE_COMMIT: $CI_COMMIT_SHA
TEST_LLM_MODULE: true
TEST_ALIGNER_MODULE: false
TEST_DATA_CURATOR_MODULE: false
TESTS_TO_RUN_ON_THIS_COMMIT: nightly
rules:
- if: $FUNCTIONAL_TEST == "yes"
when: manual
allow_failure: true
- when: never

functional:notify:
extends: [.functional_tests_rules]
image: badouralix/curl-jq
Expand Down

0 comments on commit 05780f3

Please sign in to comment.