|
| 1 | +# This workflow will test the submission generation using MLPerf Automation |
| 2 | + |
| 3 | +name: CM based Submission Generation |
| 4 | + |
| 5 | +on: |
| 6 | + pull_request: |
| 7 | + branches: [ "master", "dev" ] |
| 8 | + paths: |
| 9 | + - '.github/workflows/test-submission-generation.yml' |
| 10 | + - '**' |
| 11 | + - '!**.md' |
| 12 | +jobs: |
| 13 | + submission_generation: |
| 14 | + runs-on: ${{ matrix.os }} |
| 15 | + strategy: |
| 16 | + fail-fast: false |
| 17 | + matrix: |
| 18 | + os: [ubuntu-latest, windows-latest, macos-latest] |
| 19 | + python-version: [ "3.12" ] |
| 20 | + division: ["closed", "open", "closed-open"] |
| 21 | + category: ["datacenter", "edge"] |
| 22 | + case: ["closed"] |
| 23 | + action: ["run", "docker"] |
| 24 | + exclude: |
| 25 | + - os: macos-latest |
| 26 | + - os: windows-latest |
| 27 | + - category: "edge" |
| 28 | + |
| 29 | + steps: |
| 30 | + - uses: actions/checkout@v4 |
| 31 | + - name: Set up Python ${{ matrix.python-version }} |
| 32 | + uses: actions/setup-python@v3 |
| 33 | + with: |
| 34 | + python-version: ${{ matrix.python-version }} |
| 35 | + - name: Install dependencies |
| 36 | + run: | |
| 37 | + pip install cm4mlops |
| 38 | + - name: Pull repo where test cases are uploaded |
| 39 | + run: | |
| 40 | + git clone -b submission-generation-examples https://github.com/mlcommons/inference.git submission_generation_examples |
| 41 | + - name: Run Submission Generation - ${{ matrix.case }} ${{ matrix.action }} ${{ matrix.category }} ${{ matrix.division }} |
| 42 | + continue-on-error: true |
| 43 | + run: | |
| 44 | + if [ "${{ matrix.case }}" == "closed" ]; then |
| 45 | + description="Test submission - contains closed edge and datacenter" |
| 46 | + elif [ "${{ matrix.case }}" == "closed-power" ]; then |
| 47 | + description="Test submission - contains closed-power edge and datacenter results" |
| 48 | + fi |
| 49 | + # Dynamically set the log group to simulate a dynamic step name |
| 50 | + echo "::group::$description" |
| 51 | + cm ${{ matrix.action }} script --tags=generate,inference,submission --adr.compiler.tags=gcc --version=v5.0 --clean --preprocess_submission=yes --submission_base_dir=mysubmissions --results_dir=$PWD/submission_generation_tests/${{ matrix.case }}/ --run-checker --submitter=MLCommons --tar=yes --division=${{ matrix.division }} --env.CM_DETERMINE_MEMORY_CONFIGURATION=yes --quiet |
| 52 | + cm ${{ matrix.action }} script --tags=run,submission,checker --submitter_id_off=mysubmitter_id --tar=yes --submission_dir=mysubmissions/submissions --submission_tar_file=mysubmission.tar.gz |
0 commit comments