Skip to content

Commit 3b98f3d

Browse files
authored
Merge branch 'master' into deprecate-rclone
2 parents 167d6f1 + 9374959 commit 3b98f3d

File tree

472 files changed

+2574824
-709
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

472 files changed

+2574824
-709
lines changed

.github/workflows/build_wheels.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
name: Build loadgen wheels and release them into PYPI
2+
23
on:
34
release:
45
types: [published]
@@ -73,7 +74,7 @@ jobs:
7374
strategy:
7475
fail-fast: false
7576
matrix:
76-
os: [ubuntu-latest, windows-latest, macos-latest, macos-13]
77+
os: [ubuntu-latest, windows-latest, macos-latest, macos-15]
7778

7879
steps:
7980
- uses: actions/checkout@v3
@@ -122,10 +123,10 @@ jobs:
122123
name: wheels-macos-latest
123124
path: wheels
124125
# Download the built wheels from macOS-13 (x86)
125-
- name: Download macOS-13 (x86) wheels
126+
- name: Download macOS-15 (x86) wheels
126127
uses: actions/download-artifact@v4
127128
with:
128-
name: wheels-macos-13
129+
name: wheels-macos-15
129130
path: wheels
130131
# Download the built wheels from Windows
131132
- name: Download Windows wheels

.github/workflows/test-resnet50.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
strategy:
2424
fail-fast: false
2525
matrix:
26-
python-version: [ "3.9" ]
26+
python-version: [ "3.10", "3.13" ]
2727
backend: [ "onnxruntime", "tf" ]
2828
loadgen-flag: [ "", "--adr.loadgen.tags=_from-pip --pip_loadgen=yes" ]
2929

.github/workflows/test-retinanet.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
strategy:
2323
fail-fast: false
2424
matrix:
25-
python-version: [ "3.10" ]
25+
python-version: [ "3.10", "3.13" ]
2626
backend: [ "onnxruntime", "pytorch" ]
2727

2828
steps:

.github/workflows/test-rgat.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
strategy:
2121
fail-fast: false
2222
matrix:
23-
python-version: [ "3.11" ]
23+
python-version: [ "3.11", "3.12" ]
2424
backend: [ "pytorch" ]
2525
loadgen-flag: [ "" ]
2626

.github/workflows/test-submission-checker.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ name: Test for MLPerf inference submission checker using MLC script automation
55

66
on:
77
pull_request:
8-
branches: [ "master", "dev" ]
8+
branches: [ "master_off", "dev_off" ]
99
paths:
1010
- tools/submission/**
1111
- .github/workflows/test-submission-checker.yml
@@ -21,7 +21,7 @@ jobs:
2121
strategy:
2222
fail-fast: false
2323
matrix:
24-
python-version: [ "3.8", "3.11", "3.12" ]
24+
python-version: [ "3.10", "3.12", "3.14" ]
2525

2626
steps:
2727
- uses: actions/checkout@v3
@@ -31,8 +31,10 @@ jobs:
3131
python-version: ${{ matrix.python-version }}
3232
- name: Install dependencies
3333
run: |
34-
python3 -m pip install mlc-scripts
34+
python3 -m pip install mlcflow
35+
mlc pull repo mlcommons@mlperf-automations --branch=sub-gen-change
3536
git clone https://github.com/mlcommons/mlperf_inference_unofficial_submissions_v5.0 --depth 1
37+
# python3 -m pip install mlc-scripts
3638
- name: Test MLPerf inference submission checker
3739
run: |
38-
mlcr run,mlperf,inference,submission,checker --adr.inference-src.tags=_branch.$PR_HEAD_REF,_repo.${{ github.event.pull_request.head.repo.html_url }} --adr.inference-src.version=custom --input=`pwd`/mlperf_inference_unofficial_submissions_v5.0 --src_version=v5.0 --extra_args=" --skip-extra-files-in-root-check --skip-extra-accuracy-files-check --skip-all-systems-have-results-check --skip-calibration-check" --quiet
40+
mlcr run,mlperf,inference,submission,checker --adr.inference-src.tags=_branch.submission_dir --adr.inference-src.version=custom --input=`pwd`/mlperf_inference_unofficial_submissions_v5.0 --src_version=v5.0 --extra_args=" --skip-extra-files-in-root-check --skip-extra-accuracy-files-check --skip-all-systems-have-results-check --skip-calibration-check" --quiet

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@ libmlperf_loadgen.a
33
__pycache__/
44
generated/
55
*.swp
6+
*.egg-info/
7+
*.so
8+
.vscode/

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@
1010
[submodule "language/deepseek-r1/submodules/LiveCodeBench"]
1111
path = language/deepseek-r1/submodules/LiveCodeBench
1212
url = https://github.com/LiveCodeBench/LiveCodeBench
13+
[submodule "text_to_video/wan2.2-t2v-14b/submodules/VBench"]
14+
path = text_to_video/wan2.2-t2v-14b/submodules/VBench
15+
url = https://github.com/Vchitect/VBench

automotive/3d-object-detection/README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,23 @@ You can also do `pip install mlc-scripts` and then use `mlcr` commands for downl
1818
> By default, the waymo dataset is downloaded from the mlcommons official drive. One has to accept the [MLCommons Waymo Open Dataset EULA](https://waymo.mlcommons.org/) to access the dataset files.
1919
2020
```
21-
mlcr get,ml-model,pointpainting --outdirname=<path_to_download> -j
21+
mlcr get,ml-model,pointpainting,_r2-downloader,_mlc --outdirname=<path_to_download> -j
2222
```
2323

2424
### Download dataset through MLCFlow Automation
2525

2626
> [!Note]
2727
> By default, the waymo dataset is downloaded from the mlcommons official drive. One has to accept the [MLCommons Waymo Open Dataset EULA](https://waymo.mlcommons.org/) to access the dataset files.
2828
29+
**Includes validation and calibration dataset**
2930
```
30-
mlcr get,dataset,waymo --outdirname=<path_to_download> -j
31+
mlcr get,dataset,waymo,_r2-downloader,_mlc --outdirname=<path_to_download> -j
32+
```
33+
34+
**Includes only calibration dataset**
35+
36+
```
37+
mlcr get,dataset,waymo,calibration,_r2-downloader,_mlc --outdirname=<path_to_download> -j
3138
```
3239

3340
## Downloading the dataset and model checkpoints
@@ -106,4 +113,4 @@ python accuracy_waymo.py --mlperf-accuracy-file <path to accuracy file>/mlperf_l
106113

107114
## Automated command for submission generation via MLCFlow
108115

109-
Please see the [new docs site](https://docs.mlcommons.org/inference/submission/) for an automated way to generate submission through MLCFlow.
116+
Please see the [new docs site](https://docs.mlcommons.org/inference/submission/) for an automated way to generate submission through MLCFlow.

compliance/TEST01/run_verification.py

Lines changed: 60 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -76,51 +76,68 @@ def main():
7676
output_dir = os.path.join(args.output_dir, "TEST01")
7777
unixmode = ""
7878
if args.unixmode:
79-
unixmode = " --unixmode"
80-
for binary in ["wc", "md5sum", "grep", "awk", "sed", "head", "tail"]:
79+
if os.name != "posix":
80+
print(
81+
"Warning: --unixmode not supported on this OS. Using Python fallback...")
82+
unixmode = ""
83+
else:
84+
unixmode = " --unixmode"
8185
missing_binary = False
82-
if shutil.which(binary) is None:
83-
print(
84-
"Error: This script requires the {:} commandline utility".format(
85-
binary
86+
for binary in ["wc", "md5sum", "grep",
87+
"awk", "sed", "head", "tail"]:
88+
if shutil.which(binary) is None:
89+
print(
90+
"Error: This script requires the {:} commandline utility".format(
91+
binary
92+
)
8693
)
87-
)
88-
missing_binary = True
89-
if missing_binary:
90-
exit()
94+
missing_binary = True
95+
if missing_binary:
96+
exit()
9197

9298
dtype = args.dtype
9399

94100
verify_accuracy_binary = os.path.join(
95101
os.path.dirname(__file__), "verify_accuracy.py"
96102
)
103+
104+
unixmode_str = unixmode if unixmode == "" else unixmode + " "
105+
97106
# run verify accuracy
98107
verify_accuracy_command = (
99-
"python3 "
108+
sys.executable + " "
100109
+ verify_accuracy_binary
101110
+ " --dtype "
102111
+ args.dtype
103-
+ unixmode
112+
+ unixmode_str
104113
+ " -r "
105-
+ results_dir
106-
+ "/accuracy/mlperf_log_accuracy.json"
114+
+ os.path.join(results_dir, "accuracy", "mlperf_log_accuracy.json")
107115
+ " -t "
108-
+ compliance_dir
109-
+ "/mlperf_log_accuracy.json | tee verify_accuracy.txt"
116+
+ os.path.join(compliance_dir, "mlperf_log_accuracy.json")
110117
)
111118
try:
112-
os.system(verify_accuracy_command)
119+
with open("verify_accuracy.txt", "w") as f:
120+
process = subprocess.Popen(
121+
verify_accuracy_command,
122+
stdout=subprocess.PIPE,
123+
stderr=subprocess.STDOUT,
124+
shell=True,
125+
text=True
126+
)
127+
# Write output to both console and file
128+
for line in process.stdout:
129+
print(line, end="")
130+
f.write(line)
131+
process.wait()
113132
except Exception:
114133
print(
115134
"Exception occurred trying to execute:\n " +
116135
verify_accuracy_command)
117136
# check if verify accuracy script passes
118137

119-
accuracy_pass_command = "grep PASS verify_accuracy.txt"
120138
try:
121-
accuracy_pass = "TEST PASS" in subprocess.check_output(
122-
accuracy_pass_command, shell=True
123-
).decode("utf-8")
139+
with open("verify_accuracy.txt", "r") as file:
140+
accuracy_pass = "TEST PASS" in file.read()
124141
except Exception:
125142
accuracy_pass = False
126143

@@ -129,28 +146,38 @@ def main():
129146
os.path.dirname(__file__), "verify_performance.py"
130147
)
131148
verify_performance_command = (
132-
"python3 "
149+
sys.executable + " "
133150
+ verify_performance_binary
134-
+ " -r "
135-
+ results_dir
136-
+ "/performance/run_1/mlperf_log_detail.txt"
137-
+ " -t "
138-
+ compliance_dir
139-
+ "/mlperf_log_detail.txt | tee verify_performance.txt"
151+
+ " -r"
152+
+ os.path.join(results_dir, "performance",
153+
"run_1", "mlperf_log_detail.txt")
154+
+ " -t"
155+
+ os.path.join(compliance_dir, "mlperf_log_detail.txt")
140156
)
157+
141158
try:
142-
os.system(verify_performance_command)
159+
with open("verify_performance.txt", "w") as f:
160+
process = subprocess.Popen(
161+
verify_performance_command,
162+
stdout=subprocess.PIPE,
163+
stderr=subprocess.STDOUT,
164+
text=True,
165+
shell=True,
166+
)
167+
# Write output to both console and file
168+
for line in process.stdout:
169+
print(line, end="")
170+
f.write(line)
171+
process.wait()
143172
except Exception:
144173
print(
145174
"Exception occurred trying to execute:\n " +
146175
verify_performance_command)
147176

148177
# check if verify performance script passes
149-
performance_pass_command = "grep PASS verify_performance.txt"
150178
try:
151-
performance_pass = "TEST PASS" in subprocess.check_output(
152-
performance_pass_command, shell=True
153-
).decode("utf-8")
179+
with open("verify_performance.txt", "r") as file:
180+
performance_pass = "TEST PASS" in file.read()
154181
except Exception:
155182
performance_pass = False
156183

compliance/TEST01/verify_accuracy.py

Lines changed: 36 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
import subprocess
2121
import sys
2222
import shutil
23+
import hashlib
24+
import re
2325

2426
sys.path.append(os.getcwd())
2527

@@ -161,15 +163,11 @@ def main():
161163
print("Error: This script requires Python v3.3 or later")
162164
exit()
163165

164-
get_perf_lines_cmd = "wc -l " + perf_log + "| awk '{print $1}'"
165-
num_perf_lines = int(
166-
subprocess.check_output(get_perf_lines_cmd, shell=True).decode("utf-8")
167-
)
166+
with open(perf_log, "r") as file:
167+
num_perf_lines = sum(1 for _ in file)
168168

169-
get_acc_lines_cmd = "wc -l " + acc_log + "| awk '{print $1}'"
170-
num_acc_lines = int(
171-
subprocess.check_output(get_acc_lines_cmd, shell=True).decode("utf-8")
172-
)
169+
with open(acc_log, "r") as file:
170+
num_acc_lines = sum(1 for _ in file)
173171

174172
num_acc_log_entries = num_acc_lines - 2
175173
num_perf_log_entries = num_perf_lines - 2
@@ -189,42 +187,38 @@ def main():
189187
continue
190188

191189
# calculate md5sum of line in perf mode accuracy_log
192-
perf_md5sum_cmd = (
193-
"head -n "
194-
+ str(perf_line + 1)
195-
+ " "
196-
+ perf_log
197-
+ "| tail -n 1| sed -r 's/,//g' | sed -r 's/\"seq_id\" : \\S+//g' | md5sum"
198-
)
199-
# print(perf_md5sum_cmd)
200-
perf_md5sum = subprocess.check_output(perf_md5sum_cmd, shell=True).decode(
201-
"utf-8"
202-
)
203-
204-
# get qsl idx
205-
get_qsl_idx_cmd = (
206-
"head -n "
207-
+ str(perf_line + 1)
208-
+ " "
209-
+ perf_log
210-
+ "| tail -n 1| awk -F\": |,\" '{print $4}'"
211-
)
212-
qsl_idx = (
213-
subprocess.check_output(get_qsl_idx_cmd, shell=True)
214-
.decode("utf-8")
215-
.rstrip()
216-
)
190+
# read the specific line
191+
with open(perf_log, "r") as f:
192+
for i, line in enumerate(f):
193+
if i == perf_line:
194+
line_content = line.strip()
195+
break
196+
197+
# remove commas and remove 'seq_id' key-value
198+
clean_line = line_content.replace(",", "")
199+
clean_line = re.sub(r'"seq_id"\s*:\s*\S+', '', clean_line)
200+
201+
# calculate md5sum
202+
perf_md5sum = hashlib.md5(clean_line.encode("utf-8")).hexdigest()
203+
204+
# extract qsl idx
205+
fields = re.split(r": |,", line_content)
206+
qsl_idx = fields[3].strip()
217207

218208
# calculate md5sum of line in acc mode accuracy_log
219-
acc_md5sum_cmd = (
220-
'grep "qsl_idx\\" : '
221-
+ qsl_idx
222-
+ '," '
223-
+ acc_log
224-
+ "| sed -r 's/,//g' | sed -r 's/\"seq_id\" : \\S+//g' | md5sum"
225-
)
226-
acc_md5sum = subprocess.check_output(
227-
acc_md5sum_cmd, shell=True).decode("utf-8")
209+
acc_matches = []
210+
with open(acc_log, "r") as f:
211+
for line in f:
212+
if f'"qsl_idx" : {qsl_idx},' in line:
213+
acc_matches.append(line.strip())
214+
215+
# join all matching lines together
216+
acc_line = "\n".join(acc_matches)
217+
218+
acc_line = acc_line.replace(",", "")
219+
acc_line = re.sub(r'"seq_id"\s*:\s*\S+', '', acc_line)
220+
221+
acc_md5sum = hashlib.md5(acc_line.encode("utf-8")).hexdigest()
228222

229223
if perf_md5sum != acc_md5sum:
230224
num_perf_log_data_mismatch += 1

0 commit comments

Comments
 (0)