Skip to content

Commit 6ef036c

Browse files
authored
Merge pull request #820 from mlcommons/dev
Merge Dev
2 parents de40c22 + b9b7a3c commit 6ef036c

File tree

31 files changed

+755
-46
lines changed

31 files changed

+755
-46
lines changed

.github/workflows/build_wheel_off.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
name: Build wheel and release into PYPI (off now)
22

3-
43
on:
54
push:
65
branches:
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: Reassign PR Commits
2+
3+
on:
4+
issue_comment:
5+
types: [created]
6+
7+
jobs:
8+
reassign:
9+
# Only run if the comment is "/reassign" on a Pull Request
10+
if: github.event.issue.pull_request && startsWith(github.event.comment.body, '/reassign')
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write
14+
pull-requests: write
15+
16+
steps:
17+
- name: Parse Username
18+
id: parse
19+
env:
20+
COMMENT_BODY: ${{ github.event.comment.body }}
21+
run: |
22+
# Get the text after /reassign. Default to PR creator if empty.
23+
REQUESTED_USER=$(echo "$COMMENT_BODY" | awk '{print $2}')
24+
25+
if [ -z "$REQUESTED_USER" ]; then
26+
REQUESTED_USER="${{ github.event.issue.user.login }}"
27+
fi
28+
29+
echo "target_user=$REQUESTED_USER" >> $GITHUB_OUTPUT
30+
31+
- name: Get User Email from GitHub API
32+
id: user_info
33+
run: |
34+
# Fetch the public email for the target user
35+
USER_EMAIL=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
36+
"https://api.github.com/users/${{ steps.parse.outputs.target_user }}" | jq -r '.email')
37+
38+
if [ "$USER_EMAIL" == "null" ] || [ -z "$USER_EMAIL" ]; then
39+
# Fallback to the GitHub no-reply email format if public email is hidden
40+
USER_EMAIL="${{ steps.parse.outputs.target_user }}@users.noreply.github.com"
41+
fi
42+
43+
echo "email=$USER_EMAIL" >> $GITHUB_OUTPUT
44+
45+
- name: Checkout PR Branch
46+
uses: actions/checkout@v4
47+
with:
48+
token: ${{ secrets.GITHUB_TOKEN }}
49+
fetch-depth: 0
50+
51+
- name: Rewrite History
52+
run: |
53+
# Configure Git
54+
git config user.name "${{ steps.parse.outputs.target_user }}"
55+
git config user.email "${{ steps.user_info.outputs.email }}"
56+
57+
# Use gh CLI to checkout the PR branch locally
58+
gh pr checkout ${{ github.event.issue.number }}
59+
60+
# Identify the base branch (usually main)
61+
BASE_BRANCH=$(gh pr view ${{ github.event.issue.number }} --json baseRefName --template '{{.baseRefName}}')
62+
63+
# Rewrite all commits from the point where the PR branched off
64+
git filter-branch -f --env-filter "
65+
export GIT_AUTHOR_NAME='${{ steps.parse.outputs.target_user }}'
66+
export GIT_AUTHOR_EMAIL='${{ steps.user_info.outputs.email }}'
67+
export GIT_COMMITTER_NAME='${{ steps.parse.outputs.target_user }}'
68+
export GIT_COMMITTER_EMAIL='${{ steps.user_info.outputs.email }}'
69+
" origin/$BASE_BRANCH..HEAD
70+
71+
# Force push the rewritten history
72+
git push origin HEAD --force
73+
env:
74+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
75+
76+
- name: React to Comment
77+
uses: actions/github-script@v6
78+
with:
79+
script: |
80+
github.rest.reactions.createForIssueComment({
81+
owner: context.repo.owner,
82+
repo: context.repo.repo,
83+
comment_id: context.payload.comment.id,
84+
content: 'rocket'
85+
})

.github/workflows/test-mlc-script-features.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ jobs:
163163
164164
export MLC_SCRIPT_EXTRA_CMD="--adr.python.name=mlperf"
165165
166-
mlcr run,mlperf,inference,_submission,_short --adr.python.version_min=3.8 --adr.compiler.tags=gcc --adr.openimages-preprocessed.tags=_50 --submitter=MLCommons --implementation=cpp --hw_name=default --model=retinanet --backend=onnxruntime --device=cpu --scenario=Offline --quiet
166+
mlcr run,mlperf,inference --adr.python.version_min=3.8 --adr.compiler.tags=gcc --adr.openimages-preprocessed.tags=_50 --submitter=MLCommons --implementation=cpp --hw_name=default --model=retinanet --backend=onnxruntime --device=cpu --scenario=Offline --quiet
167167
168168
# Step for Linux/MacOS
169169
- name: Randomly Execute Step (Linux/MacOS)

script/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# MLCommons Automation Scripts
22

3-
*Last updated: 2026-02-05 19:23:12*
3+
*Last updated: 2026-02-18 17:10:51*
44

55
This directory contains automation scripts for MLPerf benchmarks, AI/ML workflows, and development operations.
66

script/app-mlperf-inference-mlcommons-python/customize.py

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def preprocess(i):
7373
str(env['MLC_MLPERF_LOADGEN_BATCH_SIZE'])
7474

7575
if env.get('MLC_MLPERF_LOADGEN_QUERY_COUNT', '') != '' and not env.get('MLC_TMP_IGNORE_MLPERF_QUERY_COUNT', False) and (
76-
env['MLC_MLPERF_LOADGEN_MODE'] == 'accuracy' or 'gptj' in env['MLC_MODEL'] or 'llama2' in env['MLC_MODEL'] or 'yolo' in env['MLC_MODEL'] or 'mixtral' in env['MLC_MODEL'] or 'llama3' in env['MLC_MODEL'] or 'pointpainting' in env['MLC_MODEL']) and (env.get('MLC_MLPERF_RUN_STYLE', '') != "valid" or 'pointpainting' in env['MLC_MODEL']):
76+
env['MLC_MLPERF_LOADGEN_MODE'] == 'accuracy' or 'gptj' in env['MLC_MODEL'] or 'llama2' in env['MLC_MODEL'] or 'yolo' in env['MLC_MODEL'] or 'mixtral' in env['MLC_MODEL'] or 'llama3' in env['MLC_MODEL'] or 'pointpainting' in env['MLC_MODEL'] or 'wan-2.2-t2v-a14b' in env['MLC_MODEL']) and (env.get('MLC_MLPERF_RUN_STYLE', '') != "valid" or 'pointpainting' in env['MLC_MODEL']):
7777
env['MLC_MLPERF_LOADGEN_EXTRA_OPTIONS'] += " --count " + \
7878
env['MLC_MLPERF_LOADGEN_QUERY_COUNT']
7979

@@ -638,8 +638,6 @@ def get_run_cmd_reference(
638638
"classification_and_detection",
639639
"yolo")
640640

641-
base_cmd = f"""{x}{env['MLC_PYTHON_BIN_WITH_PATH']}{x} yolo_loadgen.py"""
642-
643641
cmd = f"""{x}{env['MLC_PYTHON_BIN_WITH_PATH']}{x} yolo_loadgen.py \
644642
--model {x}{env['MLC_ML_MODEL_YOLOV11_PATH']}{x} \
645643
--dataset-path {x}{env['MLC_ML_DATASET_MLPERF_INFERENCE_YOLO_COCO2017_FILTERED_DATASET_PATH']}{x} \
@@ -654,6 +652,30 @@ def get_run_cmd_reference(
654652
else:
655653
cmd += " --PerformanceOnly "
656654

655+
elif "wan-2.2-t2v-a14b" in env['MLC_MODEL']:
656+
env['RUN_DIR'] = os.path.join(
657+
env['MLC_MLPERF_INFERENCE_SOURCE'],
658+
"text_to_video",
659+
"wan2.2-t2v-14b",)
660+
661+
video_output_directory = os.path.join(
662+
env['MLC_MLPERF_OUTPUT_DIR'], "generated_videos")
663+
os.makedirs(video_output_directory, exist_ok=True)
664+
665+
torch_distributed_cmd = ""
666+
667+
if int(env.get('MLC_MLPERF_INFERENCE_NUM_PROCESSES_PER_GPU_NODE', 1)) > 1:
668+
torch_distributed_cmd = f"torch.distributed.run --nproc_per_node={env.get('MLC_MLPERF_INFERENCE_NUM_PROCESSES_PER_GPU_NODE')}"
669+
670+
cmd = f"""{x}{env['MLC_PYTHON_BIN_WITH_PATH']}{x} {torch_distributed_cmd} run_mlperf.py \
671+
--model-path {x}{env['MLC_ML_MODEL_WAN2_PATH']}{x} \
672+
--dataset {x}{env['MLC_ML_DATASET_MLPERF_INFERENCE_TEXT_TO_VIDEO_DATASET_PATH']}{x} \
673+
--scenario {env['MLC_MLPERF_LOADGEN_SCENARIO']} \
674+
--output-dir {x}{env['MLC_MLPERF_OUTPUT_DIR']}{x} \
675+
--video_output_path {x}{video_output_directory}{x} \
676+
{env['MLC_MLPERF_LOADGEN_EXTRA_OPTIONS']} \
677+
{scenario_extra_options} {mode_extra_options}"""
678+
657679
if env.get('MLC_NETWORK_LOADGEN', '') in ["lon", "sut"]:
658680
cmd = cmd + " " + "--network " + env['MLC_NETWORK_LOADGEN']
659681
if env.get('MLC_NETWORK_LOADGEN_SUT_SERVERS', []):

script/app-mlperf-inference-mlcommons-python/meta.yaml

Lines changed: 49 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,7 @@ deps:
311311
- bert-99.9
312312
- gptj-99
313313
- gptj-99.9
314+
- wan-2.2-t2v-a14b
314315

315316
## Tensorflow
316317
- tags: get,generic-python-lib,_tensorflow
@@ -1569,15 +1570,13 @@ variations:
15691570
names:
15701571
- yolo-v11-model-download
15711572
skip_if_env:
1572-
MLC_USE_ML_MODEL_FROM_HOST:
1573-
- true
1573+
MLC_RUN_STATE_DOCKER:
15741574
- "yes"
15751575
- tags: get,dataset,mlperf-inference,yolo-coco2017-filtered,_mlc,_r2-downloader
15761576
names:
15771577
- yolo-v11-dataset-download
15781578
skip_if_env:
1579-
MLC_USE_DATASET_FROM_HOST:
1580-
- true
1579+
MLC_RUN_STATE_DOCKER:
15811580
- "yes"
15821581
- tags: get,generic-python-lib,_package.ultralytics
15831582
- tags: get,generic-python-lib,_package.tqdm
@@ -1598,6 +1597,52 @@ variations:
15981597
- yolo_
15991598
env:
16001599
MLC_MODEL: yolo-99
1600+
1601+
wan-2.2-t2v-a14b:
1602+
group: models
1603+
add_deps_recursive:
1604+
pytorch:
1605+
version_min: "2.5.1"
1606+
version_max: "2.5.1"
1607+
version_max_usable: "2.5.1"
1608+
ml-engine-transformers:
1609+
version_max: "4.51.3"
1610+
version_max_usable: "4.51.3"
1611+
torchvision:
1612+
version_min: "0.20.1"
1613+
version_max: "0.20.1"
1614+
version_max_usable: "0.20.1"
1615+
env:
1616+
MLC_MODEL: wan-2.2-t2v-a14b
1617+
deps:
1618+
- tags: get-ml-model-wan2,_mlc,_r2-downloader,_wan2_2_t2v_a14b
1619+
names:
1620+
- wan2-model-download
1621+
skip_if_env:
1622+
MLC_RUN_STATE_DOCKER:
1623+
- "yes"
1624+
- tags: get-dataset-mlperf-inference-text-to-video,_mlc,_r2-downloader
1625+
names:
1626+
- wan2-dataset-download
1627+
skip_if_env:
1628+
MLC_RUN_STATE_DOCKER:
1629+
- "yes"
1630+
- tags: get,generic-python-lib,_package.opencv-python
1631+
version_max: "4.11.0.86"
1632+
version_max_usable: "4.11.0.86"
1633+
- tags: get,generic-python-lib,_package.imageio
1634+
- tags: get,generic-python-lib,_package.imageio-ffmpeg
1635+
- tags: get,generic-python-lib,_package.diffusers
1636+
version_max: "0.35.2"
1637+
version_max_usable: "0.35.2"
1638+
- tags: get,generic-python-lib,_package.accelerate
1639+
- tags: get,generic-python-lib,_package.ftfy
1640+
- tags: get,generic-python-lib,_package.numpy
1641+
names:
1642+
- numpy
1643+
- tags: get,generic-python-lib,_package.flash-attn
1644+
version_min: "2.8.3"
1645+
version_max_usable: "2.8.3"
16011646

16021647
# Target devices
16031648
cpu:

script/app-mlperf-inference/README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# README for app-mlperf-inference
2-
This README is automatically generated. Add custom content in [info.md](info.md). Please follow the [script execution document](https://docs.mlcommons.org/mlcflow/targets/script/execution-flow/) to understand more about the MLC script execution.
2+
This README is automatically generated. Create and add custom content in info.md. Please follow the [script execution document](https://docs.mlcommons.org/mlcflow/targets/script/execution-flow/) to understand more about the MLC script execution.
33

44
`mlcflow` stores all local data under `$HOME/MLC` by default. So, if there is space constraint on the home directory and you have more space on say `/mnt/$USER`, you can do
55
```
@@ -85,10 +85,12 @@ mlcr app,vision,language,mlcommons,mlperf,inference,generic
8585
| `--output` | Output from the script passed using the env key `MLC_OUTPUT` | | `` |
8686
| `--outdirname` | The directory to store the script output | | `cache directory ($HOME/MLC/repos/local/cache/<>) if the script is cacheable or else the current directory` |
8787
| `--outbasename` | The output file/folder name | | `` |
88+
| `--search_folder_path` | The folder path where executables of a given script need to be searched. Search is done recursively upto 4 levels. | | `` |
8889
| `--name` | | | `` |
8990
| `--extra_cache_tags` | Extra cache tags to be added to the cached entry when the script results are saved | | `` |
9091
| `--skip_compile` | Skip compilation | | `False` |
9192
| `--skip_run` | Skip run | | `False` |
93+
| `--skip_sudo` | Skip SUDO detection | | `False` |
9294
| `--accept_license` | Accept the required license requirement to run the script | | `False` |
9395
| `--skip_system_deps` | Skip installing any system dependencies | | `False` |
9496
| `--git_ssh` | Use SSH for git repos | | `False` |
@@ -175,7 +177,10 @@ mlcr app,vision,language,mlcommons,mlperf,inference,generic
175177
- `rgat`
176178
- `rnnt`
177179
- `sdxl`
180+
- `wan-2.2-t2v-a14b`
178181
- `whisper`
182+
- `yolo-95` (base: yolo_)
183+
- `yolo-99` (base: yolo_)
179184

180185
### Precision
181186

@@ -201,7 +206,7 @@ mlcr app,vision,language,mlcommons,mlperf,inference,generic
201206
- `r5.0_default`
202207
- `r5.1-dev_default`
203208
- `r5.1_default`
204-
- `r6.0-dev_default`
209+
- `r6.0-dev_default` (default)
205210

206211
### Ungrouped
207212

@@ -214,3 +219,4 @@ mlcr app,vision,language,mlcommons,mlperf,inference,generic
214219
- `llama3_1-8b` (base: llama3_1-8b_)
215220
- `llama3_1-8b-edge` (base: llama3_1-8b_)
216221
- `power`
222+
- `yolo_`

script/app-mlperf-inference/customize.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,14 @@ def postprocess(i):
180180
out_baseline_accuracy_string = f""" --output-file {q}{os.path.join(output_dir, "accuracy", "baseline_accuracy.txt")}{q} """
181181
out_compliance_accuracy_string = f""" --output-file {q}{os.path.join(output_dir, "accuracy", "compliance_accuracy.txt")}{q} """
182182

183+
elif 'yolo' in model:
184+
accuracy_filename = "accuracy-coco.py"
185+
accuracy_filepath = os.path.join(
186+
env['MLC_MLPERF_INFERENCE_CLASSIFICATION_AND_DETECTION_PATH'], "tools", accuracy_filename)
187+
dataset_args = f""" --coco-dir {q}{env.get('MLC_ML_DATASET_MLPERF_INFERENCE_YOLO_COCO2017_FILTERED_DATASET_PATH')}{q} """
188+
accuracy_log_file_option_name = " --mlperf-accuracy-file "
189+
datatype_option = ""
190+
183191
elif 'stable-diffusion-xl' in model:
184192
pass # No compliance check for now
185193
elif 'gpt' in model:

0 commit comments

Comments
 (0)