Skip to content

Fix a bug in adr usage in script module #478

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 24 commits into from
Jun 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
73a663f
Fix a bug in adr usage in script module
amd-arsuresh Jun 26, 2025
1781bd8
Merge branch 'dev' into dev
arjunsuresh Jun 26, 2025
5bbdf18
[Automated Commit] Document script/run-mlperf-inference-submission-ch…
github-actions[bot] Jun 26, 2025
cc33418
Update module.py
arjunsuresh Jun 26, 2025
78b16a8
[Automated Commit] Format Codebase [skip ci]
github-actions[bot] Jun 26, 2025
99b05d0
Update build_wheels.yml
arjunsuresh Jun 26, 2025
358f1d1
Merge branch 'dev' into dev
arjunsuresh Jun 26, 2025
b4d4ce7
Update meta.yaml | Support inference v5.1
arjunsuresh Jun 26, 2025
ebdbfa8
[Automated Commit] Document script/app-mlperf-inference/meta.yaml [s…
github-actions[bot] Jun 26, 2025
891045d
Update document-scripts.yml
arjunsuresh Jun 26, 2025
9e18e5d
Update meta.yaml
arjunsuresh Jun 26, 2025
0a367d2
Update meta.yaml
arjunsuresh Jun 26, 2025
d5fe184
Update doc.py | Support info.md for scripts
arjunsuresh Jun 26, 2025
9778e5f
Merge branch 'dev' into dev
arjunsuresh Jun 26, 2025
75b3a24
Update meta.yaml
arjunsuresh Jun 26, 2025
1892888
Update meta.yaml
arjunsuresh Jun 26, 2025
b08370f
Delete script/app-mlperf-inference/docs directory
arjunsuresh Jun 26, 2025
76e5201
Delete script/run-mlperf-inference-app/docs directory
arjunsuresh Jun 26, 2025
7e31990
Update module.py
arjunsuresh Jun 26, 2025
a2f553f
[Automated Commit] Format Codebase [skip ci]
github-actions[bot] Jun 26, 2025
3b4976c
Update build_wheels.yml
arjunsuresh Jun 26, 2025
32cd231
Update module.py
arjunsuresh Jun 26, 2025
d8ac2d5
[Automated Commit] Format Codebase [skip ci]
github-actions[bot] Jun 26, 2025
3f43f48
Update module.py
arjunsuresh Jun 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/document-scripts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
jobs:
get_modified_files:
runs-on: ubuntu-latest
if: github.repository_owner == 'mlcommons'
outputs:
processed_files: ${{ steps.modified-files.outputs.processed_files }}

Expand Down
9 changes: 7 additions & 2 deletions automation/script/doc.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,18 @@ def generate_doc(self_module, input_params):

def generate_docs(metadata, script_path, generic_inputs):
script_name = metadata.get('alias', metadata['uid'])
readme_prefix = f"""This README is automatically generated. Please follow the [script execution document](https://docs.mlcommons.org/mlcflow/targets/script/execution-flow/) to understand more about the MLC script execution.
info_doc_exists = os.path.exists(os.path.join(script_path, 'info.md'))
if info_doc_exists:
readme_line = "Edit [info.txt](info.txt) to add custom contents."
else:
readme_line = "Add custom content in [info.txt](info.txt)."
readme_prefix = f"""This README is automatically generated. {readme_line} Please follow the [script execution document](https://docs.mlcommons.org/mlcflow/targets/script/execution-flow/) to understand more about the MLC script execution.
"""
doc_content = f"""# README for {script_name}
{readme_prefix}
"""

readme_dir = os.path.join(script_path, "docs")
readme_dir = script_path

if not os.path.exists(readme_dir):
os.makedirs(readme_dir)
Expand Down
16 changes: 9 additions & 7 deletions automation/script/module.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# This file is originally created for CM Script automations and is now
# modified to make it work for MLC automation.
# This file was originally created for CM Script automations and is now
# modified to make it work for MLCFlow automation.

# CM "script" automation helps users to encode their MLOps, DevOps and other knowledge
# as portable and reusable automation recipes with simple tags, native scripts
# and a unified CLI, Python API and JSON/YAML meta descriptions.
#
# This is a stable prototype of the MLC script automation being developed by Grigori Fursin and Arjun Suresh
# This file contains the CM/MLC script execution logic which includes processing the script meta,
# running the dependencies and finally preparing the required environment and running the specified script.
#
# Developed by Grigori Fursin and Arjun Suresh for CM and modified for MLCFlow by Arjun Suresh and Anandhu Sooraj
#

import os
import logging

Expand Down Expand Up @@ -2345,6 +2344,9 @@ def _update_state_from_variations(self, i, meta, variation_tags, variations, env
import copy
explicit_variation_tags = copy.deepcopy(variation_tags)

if add_deps_recursive is None:
add_deps_recursive = {}

# Calculate space
required_disk_space = {}

Expand Down
26 changes: 25 additions & 1 deletion script/app-mlperf-inference/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1948,6 +1948,30 @@ variations:
MLC_REGENERATE_MEASURE_FILES: 'yes'
MLC_MLPERF_INFERENCE_VERSION: '5.0'

r5.1-dev_default:
group:
reproducibility
add_deps_recursive:
nvidia-inference-common-code:
tags: _mlcommons,_v5.1
nvidia-inference-server:
version: r5.0
tags: _mlcommons
nvidia-harness:
tags: _v5.0
intel-harness:
tags: _v4.1
inference-src:
tags: _branch.master
nvidia-scratch-space:
tags: _version.5.1
pycuda:
version: "2024.1"
default_env:
MLC_SKIP_SYS_UTILS: 'yes'
MLC_REGENERATE_MEASURE_FILES: 'yes'
MLC_MLPERF_INFERENCE_VERSION: '5.1'


invalid_variation_combinations:
-
Expand Down Expand Up @@ -2001,7 +2025,7 @@ input_description:
num_threads:
desc: "Number of CPU threads to launch the application with"
hw_name:
desc: "Valid value - any system description which has a config file (under same name) defined [here](https://github.com/mlcommons/cm4mlops/tree/main/script/get-configs-sut-mlperf-inference/configs)"
desc: "Hardware part of the SUT name"
output_dir:
desc: "Location where the outputs are produced"
rerun:
Expand Down
2 changes: 1 addition & 1 deletion script/get-mlperf-inference-src/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ versions:
MLC_TMP_GIT_CHECKOUT: main
master:
env:
MLC_MLPERF_LAST_RELEASE: v5.0
MLC_MLPERF_LAST_RELEASE: v5.1
MLC_TMP_GIT_CHECKOUT: master
r2.1:
env:
Expand Down
69 changes: 0 additions & 69 deletions script/run-mlperf-inference-app/docs/README.md

This file was deleted.

28 changes: 28 additions & 0 deletions script/run-mlperf-inference-submission-checker/docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# README for run-mlperf-inference-submission-checker
This README is automatically generated. Please follow the [script execution document](https://docs.mlcommons.org/mlcflow/targets/script/execution-flow/) to understand more about the MLC script execution.

## Run Commands

```bash
mlcr run,mlc,mlcommons,mlperf,inference,mlperf-inference,submission,checker,submission-checker,mlc-submission-checker
```

No script specific inputs
### Generic Script Inputs

| Name | Description | Choices | Default |
|------|-------------|---------|------|
| `--input` | Input to the script passed using the env key `MLC_INPUT` | | `` |
| `--output` | Output from the script passed using the env key `MLC_OUTPUT` | | `` |
| `--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` |
| `--outbasename` | The output file/folder name | | `` |
| `--name` | | | `` |
| `--extra_cache_tags` | Extra cache tags to be added to the cached entry when the script results are saved | | `` |
| `--skip_compile` | Skip compilation | | `False` |
| `--skip_run` | Skip run | | `False` |
| `--accept_license` | Accept the required license requirement to run the script | | `False` |
| `--skip_system_deps` | Skip installing any system dependencies | | `False` |
| `--git_ssh` | Use SSH for git repos | | `False` |
| `--gh_token` | Github Token | | `` |
| `--hf_token` | Huggingface Token | | `` |
| `--verify_ssl` | Verify SSL | | `False` |
Loading