Skip to content

Commit

Permalink
code clean
Browse files Browse the repository at this point in the history
  • Loading branch information
anandhu-eng authored Nov 22, 2024
1 parent 3ede08f commit ff6e827
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/test-cm-based-submission-generation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ jobs:
- name: Run Submission Generation - ${{ matrix.case }} ${{ matrix.action }} ${{ matrix.category }} ${{ matrix.division }}
continue-on-error: true
run: |
case=${{ matrix.case }}
if [ "${{ matrix.case }}" == "case-3" ]; then
description="Submission generation (model_mapping.json not present but model name matches with official one)"
elif [ "${{ matrix.case }}" == "case-7" ]; then
Expand All @@ -81,19 +80,19 @@ jobs:
fi
# Dynamically set the log group to simulate a dynamic step name
echo "::group::$description"
eval cm ${{ matrix.action }} script --tags=generate,inference,submission --adr.submission-checker-src.tags=_branch.dev --clean --preprocess_submission=yes --results_dir=$PWD/submission_generation_tests/${{ matrix.case }}/ --run-checker --submitter=MLCommons --tar=yes --env.CM_TAR_OUTFILE=submission.tar.gz --division=${{ matrix.division }} --env.CM_DETERMINE_MEMORY_CONFIGURATION=yes --quiet $extra_run_args
cm ${{ matrix.action }} script --tags=generate,inference,submission --adr.submission-checker-src.tags=_branch.dev --clean --preprocess_submission=yes --results_dir=$PWD/submission_generation_tests/${{ matrix.case }}/ --run-checker --submitter=MLCommons --tar=yes --env.CM_TAR_OUTFILE=submission.tar.gz --division=${{ matrix.division }} --env.CM_DETERMINE_MEMORY_CONFIGURATION=yes --quiet $extra_run_args
exit_status=$?
echo "Exit status for the job ${description} ${exit_status}"
if [[ "${case}" == "case-5" || "${case}" == "case-6" ]]; then
if [[ "${{ matrix.case }}" == "case-5" || "${{ matrix.case }}" == "case-6" ]]; then
# For cases 5 and 6, exit status should be 0 if cm command fails, 1 if it succeeds
if [[ ${exit_status} -ne 0 ]]; then
exit 0
else
exit 1
exit ${exit_status}
fi
else
# For other cases, exit with the original status
test ${exit_status} -eq 0 || exit 1
test ${exit_status} -eq 0 || exit ${exit_status}
fi
echo "::endgroup::"

0 comments on commit ff6e827

Please sign in to comment.