From df77b511db1b6988923592a386085d7b47d864b2 Mon Sep 17 00:00:00 2001 From: ANANDHU S <71482562+anandhu-eng@users.noreply.github.com> Date: Thu, 31 Oct 2024 12:17:46 +0530 Subject: [PATCH] Test commit - Dynamic step name --- .../test-cm-based-submission-generation.yml | 48 ++++++------------- 1 file changed, 15 insertions(+), 33 deletions(-) diff --git a/.github/workflows/test-cm-based-submission-generation.yml b/.github/workflows/test-cm-based-submission-generation.yml index 7b7d138ae..7eb6b3df2 100644 --- a/.github/workflows/test-cm-based-submission-generation.yml +++ b/.github/workflows/test-cm-based-submission-generation.yml @@ -10,7 +10,7 @@ on: # - '**' # kept on for all the path instead of submission generation CM script so that this could help in trapping any bugs in any recent submission checker modification also # - '!**.md' jobs: - Case-3: + submission_generation: runs-on: ${{ matrix.os }} strategy: fail-fast: false @@ -19,6 +19,7 @@ jobs: python-version: [ "3.12" ] division: ["closed", "open"] category: ["datacenter", "edge"] + case: ["case-3", "case-7"] exclude: - os: macos-latest - os: windows-latest @@ -37,36 +38,17 @@ jobs: - name: Pull repo where test cases are uploaded run: | git clone -b submission-generation-tests https://github.com/anandhu-eng/inference.git submission_generation_tests - - name: Submission generation(model_mapping.json not present but model name is matching with the official one in submission checker) - ${{ matrix.category }} ${{ matrix.division }} + - name: Run Submission Generation - ${{ matrix.case }} ${{ matrix.category }} ${{ matrix.division }} run: | - cm run script --tags=generate,inference,submission --clean --preprocess_submission=yes --results_dir=submission_generation_tests/case-3/ --run-checker --submitter=MLCommons --tar=yes --env.CM_TAR_OUTFILE=submission.tar.gz --division=${{ matrix.division }} --category=${{ matrix.category }} --env.CM_DETERMINE_MEMORY_CONFIGURATION=yes --quiet - Case-7: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - python-version: [ "3.12" ] - division: ["closed", "open"] - category: ["datacenter", "edge"] - exclude: - - os: macos-latest - - os: windows-latest - - division: "open" - - category: "edge" - steps: - - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python3 -m pip install cmind - cm pull repo --url=${{ github.event.pull_request.head.repo.html_url }} --checkout=${{ github.event.pull_request.head.ref }} - - name: Pull repo where test cases are uploaded - run: | - git clone -b submission-generation-tests https://github.com/anandhu-eng/inference.git submission_generation_tests - - name: Submission generation(sut_info.json is not completely filled but the SUT folder name is in required format(hardware_name-implementation-device-framework-run_config)) - ${{ matrix.category }} ${{ matrix.division }} - run: | - cm run script --tags=generate,inference,submission --clean --preprocess_submission=yes --results_dir=submission_generation_tests/case-7/ --run-checker --submitter=MLCommons --tar=yes --env.CM_TAR_OUTFILE=submission.tar.gz --division=${{ matrix.division }} --category=${{ matrix.category }} --env.CM_DETERMINE_MEMORY_CONFIGURATION=yes --quiet + if [ "${{ matrix.case }}" == "case-3" ]; then + #results_dir="submission_generation_tests/case-3/" + description="Submission generation (model_mapping.json not present but model name matches with official one)" + elif [ "${{ matrix.case }}" == "case-7" ]; then + #results_dir="submission_generation_tests/case-7/" + description="Submission generation (sut_info.json incomplete, SUT folder name in required format)" + fi + # Dynamically set the log group to simulate a dynamic step name + echo "::group::$description" + cm run script --tags=generate,inference,submission --clean --preprocess_submission=yes --results_dir=submission_generation_tests/${{ matrix.case }}/ --run-checker --submitter=MLCommons --tar=yes --env.CM_TAR_OUTFILE=submission.tar.gz --division=${{ matrix.division }} --category=${{ matrix.category }} --env.CM_DETERMINE_MEMORY_CONFIGURATION=yes --quiet + echo "::endgroup::" +