Skip to content

Prevent milli second conversion for ConstantStream #58

Prevent milli second conversion for ConstantStream

Prevent milli second conversion for ConstantStream #58

# This workflow will test the MLPerf Inference Submission Generation using MLPerf Automation
name: MLC based MLPerf Inference Submission Generation
on:
pull_request:
branches: [ "main", "dev" ]
paths:
- '.github/workflows/test-mlperf-inference-submission-generation.yml'
- '**'
- '!**.md'
workflow_call:
inputs:
ref:
required: true
type: string
repo-url:
required: true
type: string
jobs:
submission_generation:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: [ "3.12" ]
division: ["closed", "open", "closed-open"]
category: ["datacenter", "edge"]
round: ["4.1", "5.0"]
case: ["closed"]
action: ["run", "docker"]
exclude:
- os: macos-latest
- os: windows-latest
- category: "edge"
- round: "4.1"
- case: "closed-edge"
include:
- os: ubuntu-latest
python-version: "3.12"
division: "closed"
category: "edge"
round: "5.0"
case: "closed-edge"
action: "run"
- os: ubuntu-latest
python-version: "3.12"
division: "closed"
category: "edge"
round: "5.0"
case: "closed-edge"
action: "docker"
- os: ubuntu-latest
python-version: "3.12"
division: "open"
category: "edge"
round: "5.0"
case: "closed-edge"
action: "run"
- os: ubuntu-latest
python-version: "3.12"
division: "open"
category: "edge"
round: "5.0"
case: "closed-edge"
action: "docker"
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install mlcflow
run: |
pip install mlcflow
pip install tabulate
- name: Pull MLOps repository
run: |
if [ -z "${{ inputs.repo-url }}" ]; then
mlc pull repo ${{ github.event.pull_request.head.repo.html_url }} --branch=${{ github.event.pull_request.head.ref }}
else
mlc pull repo mlcommons@mlperf-automations --branch=dev
fi
- name: Pull repo where test cases are uploaded
run: |
git clone -b submission-generation-examples https://github.com/mlcommons/inference.git submission_generation_examples
- name: Run Submission Generation - round-${{ matrix.round }}${{ matrix.case }} ${{ matrix.action }} ${{ matrix.category }} ${{ matrix.division }}
run: |
if [ "${{ matrix.case }}" == "closed" ]; then
description="Test submission - contains closed edge and datacenter"
elif [ "${{ matrix.case }}" == "closed-power" ]; then
description="Test submission - contains closed-power edge and datacenter results"
fi
# Dynamically set the log group to simulate a dynamic step name
echo "::group::$description"
docker_tags=""
if [ "${{ matrix.action }}" == "docker" ] && [ -z "${{ inputs.repo-url }}" ]; then
docker_tags="--docker_mlc_repo=${{ github.event.pull_request.head.repo.html_url }} --docker_mlc_repo_branch=${{ github.event.pull_request.head.ref }}"
fi
if [ -n "${{ inputs.repo-url }}" ]; then
mlc ${{ matrix.action }} script --tags=generate,inference,submission --adr.compiler.tags=gcc --version=v${{ matrix.round }} --clean --preprocess_submission=yes --submission_base_dir=mysubmissions --results_dir=$PWD/submission_generation_examples/submission_round_${{ matrix.round }}/${{ matrix.case }}/ --run_checker --submitter=MLCommons --tar=yes --division=${{ matrix.division }} --env.MLC_DETERMINE_MEMORY_CONFIGURATION=yes --quiet --adr.inference-src.tags=_repo.${{ inputs.repo-url }},_branch.${{ inputs.ref }} $docker_tags
mlc ${{ matrix.action }} script --tags=run,inference,submission,checker --submitter_id_off=mysubmitter_id --tar=yes --submission_dir=mysubmissions/mlperf_submission --submission_tar_file=mysubmission.tar.gz --quiet --src_version=v${{ matrix.round }} --adr.inference-src.tags=_repo.${{ inputs.repo-url }},_branch.${{ inputs.ref }} $docker_tags
else
mlc ${{ matrix.action }} script --tags=generate,inference,submission --adr.compiler.tags=gcc --version=v${{ matrix.round }} --clean --preprocess_submission=yes --submission_base_dir=mysubmissions --results_dir=$PWD/submission_generation_examples/submission_round_${{ matrix.round }}/${{ matrix.case }}/ --run_checker --submitter=MLCommons --tar=yes --division=${{ matrix.division }} --env.MLC_DETERMINE_MEMORY_CONFIGURATION=yes --quiet $docker_tags
mlc ${{ matrix.action }} script --tags=run,inference,submission,checker --submitter_id_off=mysubmitter_id --tar=yes --submission_dir=mysubmissions/mlperf_submission --submission_tar_file=mysubmission.tar.gz --quiet --src_version=v${{ matrix.round }} $docker_tags
fi
echo "::endgroup::"