Skip to content

Commit 65eedd4

Browse files
authored
Merge pull request #331 from GATEOverflow/master
Added a github action for updating checksums, update PTD for inference v5.0
2 parents c7bdb2f + 2f75bed commit 65eedd4

File tree

5 files changed

+63
-8
lines changed

5 files changed

+63
-8
lines changed

.github/workflows/inference_power_workflow.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ jobs:
2525
- name: Install dependencies
2626
run: |
2727
python3 -m pip install --upgrade pip
28-
python3 -m pip install cmind
29-
cm pull repo mlcommons@ck
28+
python3 -m pip install cm4mlops
3029
cm run script --quiet --tags=get,sys-utils-cm
3130
3231
- name: Start power server
@@ -35,4 +34,4 @@ jobs:
3534
3635
- name: Test CM Script for MLPerf Inference ResNet50 with power
3736
run: |
38-
cm run script --tags=run,mlperf,inference,generate-run-cmds,_performance-only,_short --submitter="cTuning" --model=resnet50 --backend=onnxruntime --device=cpu --scenario=Offline --test_query_count=5 --precision=fp32 --quiet --power=yes
37+
cm run script --tags=run,mlperf,inference,generate-run-cmds,_performance-only,_short --submitter="MLCommons" --model=resnet50 --backend=onnxruntime --device=cpu --scenario=Offline --test_query_count=5 --precision=fp32 --quiet --power=yes

.github/workflows/python_compliance.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
python-version: [3.7, 3.8, 3.9]
18+
python-version: [3.8, 3.9]
1919
on: [ubuntu-latest, windows-latest]
2020

2121
steps:
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Update checksums
2+
on:
3+
push:
4+
branches:
5+
- master
6+
paths:
7+
- 'compliance/**'
8+
- '.github/workflows/update_checksums.yml'
9+
- '__init__.py'
10+
- 'client.py'
11+
- 'lib/__init__.py'
12+
- 'lib/client.py'
13+
- 'lib/common.py'
14+
- 'lib/external/__init__.py'
15+
- 'lib/external/ntplib.py'
16+
- 'lib/server.py'
17+
- 'lib/source_hashes.py'
18+
- 'lib/summary.py'
19+
- 'lib/time_sync.py'
20+
- 'server.py'
21+
- 'tests/unit/__init__.py'
22+
- 'tests/unit/test_server.py'
23+
- 'tests/unit/test_source_hashes.py'
24+
25+
jobs:
26+
update_checksums:
27+
name: Check Python
28+
runs-on: "${{ matrix.on }}"
29+
strategy:
30+
fail-fast: false
31+
matrix:
32+
python-version: [3.9]
33+
on: [ubuntu-latest]
34+
35+
steps:
36+
- uses: actions/checkout@v4
37+
with:
38+
fetch-depth: 0
39+
40+
- name: Set up Python ${{ matrix.python-version }}
41+
uses: actions/setup-python@v2
42+
with:
43+
python-version: ${{ matrix.python-version }}
44+
45+
- name: Update the source checksums
46+
run: |
47+
python3 compliance/helper/update_sources_checksum.py
48+
git config --global user.name "${GITHUB_ACTOR}"
49+
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
50+
git add compliance/sources_checksums.json
51+
HAS_CHANGES=$(git diff --staged --name-only)
52+
if [ ${#HAS_CHANGES} -gt 0 ]; then
53+
# Commit changes
54+
git commit -am '[Automated Commit] Update checksums'
55+
git push
56+
fi

compliance/check.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class CheckerWarning(Exception):
3939
pass
4040

4141

42-
SUPPORTED_VERSION = ["1.10.0"]
42+
SUPPORTED_VERSION = ["1.11.1"]
4343
SUPPORTED_MODEL = {
4444
"YokogawaWT210": 8,
4545
"YokogawaWT500": 35,
@@ -214,7 +214,7 @@ def get_ptd_answer(command: str) -> str:
214214

215215
assert (
216216
version in SUPPORTED_VERSION
217-
), f"PTD version {version!r} is not supported. Supported versions are 1.10.0"
217+
), f"PTD version {version!r} is not supported. Supported versions are {SUPPORTED_VERSION}"
218218
assert (
219219
power_meter_model in SUPPORTED_MODEL.keys()
220220
), f"Power meter {power_meter_model!r} is not supported. Only {', '.join(SUPPORTED_MODEL.keys())} are supported."

compliance/sources_checksums.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
"lib/common.py": "611d8b29633d331eb19c9455ea3b5fa3284ed6df",
88
"lib/external/__init__.py": "da39a3ee5e6b4b0d3255bfef95601890afd80709",
99
"lib/external/ntplib.py": "4da8f970656505a40483206ef2b5d3dd5e81711d",
10-
"lib/server.py": "99303c836c683aa9017ec565104e636161d02acb",
10+
"lib/server.py": "9bc9a3b6b9b716520658ac175913bcbbdb354336",
1111
"lib/source_hashes.py": "60a2e02193209e8d392803326208d5466342da18",
12-
"lib/summary.py": "aa92f0a3f975eecd44d3c0cd0236342ccc9f941d",
12+
"lib/summary.py": "602a9fedfa503e5544d27ab3b0067f235047efc3",
1313
"lib/time_sync.py": "80894ef2389e540781ff78de94db16aa4203a14e",
1414
"server.py": "c3f90f2f7eeb4db30727556d0c815ebc89b3d28b",
1515
"tests/unit/__init__.py": "da39a3ee5e6b4b0d3255bfef95601890afd80709",

0 commit comments

Comments
 (0)