Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add remaining gh actions for cm submission generation #587

Merged
merged 13 commits into from
Nov 22, 2024
31 changes: 30 additions & 1 deletion .github/workflows/test-cm-based-submission-generation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,29 @@ jobs:
python-version: [ "3.12" ]
division: ["closed", "open", "closed-open"]
category: ["datacenter", "edge"]
case: ["closed", "closed-no-compliance", "closed-power", "closed-failed-power-logs", "case-3", "case-7", "case-8"]
case: ["closed", "closed-no-compliance", "closed-power", "closed-failed-power-logs", "case-1", "case-2", "case-3", "case-5", "case-6", "case-7", "case-8"]
action: ["run", "docker"]
exclude:
- os: macos-latest
- os: windows-latest
- category: "edge"
- case: case-1
division: closed
- case: case-1
division: closed-open
- case: case-2
division: closed
- case: case-2
division: closed-open
- case: case-5
division: closed
- case: case-5
division: closed-open
- case: case-6
division: closed
- case: case-6
division: closed-open

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
Expand Down Expand Up @@ -63,5 +80,17 @@ jobs:
# Dynamically set the log group to simulate a dynamic step name
echo "::group::$description"
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

if [[ "${{ matrix.case }}" -eq 5 || "${{ matrix.case }}" -eq 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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How's exit_status populated?

exit 0
else
exit 1
fi
else
# For other cases, exit with the original status
test $exit_status -eq 0 || exit 1
fi
echo "::endgroup::"

Loading