Skip to content

Commit

Permalink
first commit moving cm-mlops from mlcommons@ck
Browse files Browse the repository at this point in the history
  • Loading branch information
gfursin committed Apr 16, 2024
1 parent 256a276 commit 845b6c6
Show file tree
Hide file tree
Showing 1,603 changed files with 143,150 additions and 1 deletion.
17 changes: 17 additions & 0 deletions .github/workflows/check-all-broken-links.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Check .md README files for broken links

on:
push: [master]

jobs:
markdown-link-check:
runs-on: ubuntu-latest
# check out the latest version of the code
steps:
- uses: actions/checkout@v3

# Checks the status of hyperlinks in .md files in verbose mode
- name: Check links
uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
use-quiet-mode: 'yes'
17 changes: 17 additions & 0 deletions .github/workflows/check-broken-links.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Check .md README files for broken links

on: [pull_request]

jobs:
markdown-link-check:
runs-on: ubuntu-latest
# check out the latest version of the code
steps:
- uses: actions/checkout@v3

# Checks the status of hyperlinks in .md files in verbose mode
- name: Check links
uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
use-quiet-mode: 'yes'
check-modified-files-only: 'yes'
38 changes: 38 additions & 0 deletions .github/workflows/test-cm-script-features.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: CM script automation features test

on:
pull_request:
branches: [ "master", "dev" ]
paths:
- '.github/workflows/test-cm-script-features.yml'
- 'cm-mlops/**'
- '!cm-mlops/**.md'

jobs:
build:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.12", "3.11", "3.10", "3.9", "3.8"]

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 dependencies
run: |
python -m pip install cmind
cm pull repo --url=${{ github.event.pull_request.head.repo.html_url }} --checkout=${{ github.event.pull_request.head.ref }}
cm run script --quiet --tags=get,sys-utils-cm
- name: Test CM Script Features
run: |
python tests/script/test_install.py
python tests/script/test_docker.py
python tests/script/test_features.py
36 changes: 36 additions & 0 deletions .github/workflows/test-cm-scripts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: CM script automation test

on:
pull_request:
branches: [ "master", "dev" ]
paths:
- '.github/workflows/test-cm-scripts.yml'
- 'cm-mlops/**'
- '!cm-mlops/**.md'

jobs:
build:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.12", "3.9"]

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 dependencies
run: |
python -m pip install cmind
cm pull repo --url=${{ github.event.pull_request.head.repo.html_url }} --checkout=${{ github.event.pull_request.head.ref }}
cm run script --quiet --tags=get,sys-utils-cm
- name: Test CM Script Automation
run: |
python tests/script/test_deps.py
35 changes: 35 additions & 0 deletions .github/workflows/test-cm-tutorial-retinanet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: CM tutorial retinanet

on:
pull_request:
branches: [ "master", "dev" ]
paths:
- '.github/workflows/test-cm-tutorial-retinanet.yml'
- 'cm-mlops/**'
- '!cm-mlops/**.md'
jobs:
build:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9"]

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 dependencies
run: |
python -m pip install cmind
cm pull repo --url=${{ github.event.pull_request.head.repo.html_url }} --checkout=${{ github.event.pull_request.head.ref }}
cm run script --quiet --tags=get,sys-utils-cm
- name: Test CM Tutorial Retinanet
run: |
python tests/tutorials/test_tutorial_retinanet.py
57 changes: 57 additions & 0 deletions .github/workflows/test-cm-tutorial-tvm-pip.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: CM tutorial tvm pip install

on:
pull_request:
branches: [ "master", "test" ]
paths:
- '.github/workflows/test-cm-tutorial-tvm-pip.yml'
- 'cm-mlops/**'
- '!cm-mlops/**.md'

jobs:
test_vm_runtime:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9"]

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 dependencies
run: |
python -m pip install cmind
cm pull repo --url=${{ github.event.pull_request.head.repo.html_url }} --checkout=${{ github.event.pull_request.head.ref }}
cm run script --quiet --tags=get,sys-utils-cm
- name: Test CM Tutorial TVM pip install with VirtualMachine Runtime
run: |
python tests/tutorials/test_tutorial_tvm_pip_vm.py
test_ge_runtime:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9"]

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 dependencies
run: |
python -m pip install cmind
cm pull repo --url=${{ github.event.pull_request.head.repo.html_url }} --checkout=${{ github.event.pull_request.head.ref }}
cm run script --quiet --tags=get,sys-utils-cm
- name: Test CM Tutorial TVM pip install with GraphExecutor Runtime
run: |
python tests/tutorials/test_tutorial_tvm_pip_ge.py
36 changes: 36 additions & 0 deletions .github/workflows/test-cm-tutorial-tvm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: CM tutorial tvm

on:
pull_request:
branches: [ "test" ]
paths:
- '.github/workflows/test-cm-tutorial-tvm.yml'
- 'cm-mlops/**'
- '!cm-mlops/**.md'

jobs:
build:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9"]

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 dependencies
run: |
python -m pip install cmind
cm pull repo --url=${{ github.event.pull_request.head.repo.html_url }} --checkout=${{ github.event.pull_request.head.ref }}
cm run script --quiet --tags=get,sys-utils-cm
- name: Test CM Tutorial TVM
run: |
python tests/tutorials/test_tutorial_tvm.py
69 changes: 69 additions & 0 deletions .github/workflows/test-cm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: CM test

on:
pull_request:
branches: [ "master" ]
paths:
- '.github/workflows/test-cm.yml'
- 'cm/**'
- '!cm/**.md'

jobs:
build:
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
on: [ubuntu-latest]
runs-on: "${{ matrix.on }}"
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 dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
python -m pip install --ignore-installed --verbose pip setuptools
cd cm
python setup.py install
python -m cmind
cm pull repo --url=${{ github.event.pull_request.head.repo.html_url }} --checkout=${{ github.event.pull_request.head.ref }}
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 cm/cmind --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 cm/cmind --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test
run: |
python tests/test_cm.py
test_cm:
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
on: [ubuntu-latest, windows-latest]
runs-on: "${{ matrix.on }}"
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 dependencies
run: |
python -m pip install --upgrade pip
python -m pip install cmind
cm pull repo --url=${{ github.event.pull_request.head.repo.html_url }} --checkout=${{ github.event.pull_request.head.ref }}
- name: Test CM
run: |
python tests/test_cm.py
36 changes: 36 additions & 0 deletions .github/workflows/test-image-classification-onnx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: image classification with ONNX

on:
pull_request:
branches: [ "master", "dev" ]
paths:
- '.github/workflows/test-image-classification-onnx.yml'
- 'cm-mlops/**'
- '!cm-mlops/**.md'

jobs:
build:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ "3.12", "3.9"]

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 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 }}
cm run script --quiet --tags=get,sys-utils-cm
- name: Test image classification with ONNX
run: |
cmr "python app image-classification onnx" --quiet
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: MLPerf inference bert (deepsparse, tf, onnxruntime, pytorch)

on:
pull_request:
branches: [ "master", "dev" ]
paths:
- '.github/workflows/test-mlperf-inference-bert-deepsparse-tf-onnxruntime-pytorch.yml'
- 'cm-mlops/**'
- '!cm-mlops/**.md'

jobs:
build:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# 3.12 didn't work on 20240305 - need to check
python-version: [ "3.11", "3.9" ]
backend: [ "deepsparse", "tf", "onnxruntime", "pytorch" ]
precision: [ "int8", "fp32" ]
exclude:
- backend: tf
- backend: pytorch
- backend: onnxruntime
- precision: fp32

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 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 }}
cm run script --quiet --tags=get,sys-utils-cm
- name: Test MLPerf Inference Bert (DeepSparse, TF, ONNX, PyTorch)
run: |
cm run script --tags=run,mlperf,inference,generate-run-cmds,_submission,_short --submitter="cTuning" --model=bert-99 --backend=${{ matrix.backend }} --device=cpu --scenario=Offline --test_query_count=5 --precision=${{ matrix.precision }} --target_qps=1 -v --quiet
Loading

0 comments on commit 845b6c6

Please sign in to comment.