Skip to content

Sync Dev #440

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

Open
wants to merge 43 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
d545f2d
Improvements for install-gcc-src (#405)
arjunsuresh May 10, 2025
ccf78f4
Contest 2025 gemini call (#403)
H9660 May 13, 2025
9ea38ea
[Automated Commit] Format Codebase [skip ci]
github-actions[bot] May 13, 2025
7ebc222
Fixes for oneapi (#408)
arjunsuresh May 14, 2025
ade0cb0
Support ifort install in oneapi
arjunsuresh May 14, 2025
670759e
Support default_env in update_meta_if_env, add update_tags_if_env
amd-arsuresh May 15, 2025
39c025c
[Automated Commit] Format Codebase [skip ci]
github-actions[bot] May 15, 2025
c155c27
Support mlc experiment script (#411)
arjunsuresh May 17, 2025
fdfbbe8
Update test-mlc-script-features.yml
arjunsuresh May 17, 2025
6f659cb
Update test-mlc-script-features.yml
arjunsuresh May 17, 2025
2f136ac
Update test-mlc-script-features.yml
arjunsuresh May 17, 2025
aa48756
Support mlc experiment entries (#412)
arjunsuresh May 17, 2025
796cafc
Support state info for experiment run (#413)
arjunsuresh May 17, 2025
b2eb6a4
Support exp_tags for experiments (#414)
arjunsuresh May 17, 2025
6a1a97a
Fix nvidia-dali version for python3.8, fixes #410 (#415)
arjunsuresh May 17, 2025
9e9d39a
Force str for version in script module (#416)
arjunsuresh May 17, 2025
d95ea41
Code changes for integrating nvidia v5.0 (#417)
anandhu-eng May 18, 2025
46865b0
pycuda version fix (#418)
anandhu-eng May 18, 2025
339f311
Fix for pycuda in nvidia-impl (#420)
arjunsuresh May 18, 2025
87f1645
Deprecated version in scripts (#421)
anandhu-eng May 18, 2025
9ea40c2
Fixes for pycuda and versions (#422)
anandhu-eng May 18, 2025
86a1c89
Removed pycuda version fix (#423)
arjunsuresh May 18, 2025
9b934c1
Fix onnx version (#425)
anandhu-eng May 18, 2025
15b8870
Fixes to docker mounts/user (#426)
arjunsuresh May 19, 2025
901282b
Update customize.py (#427)
arjunsuresh May 19, 2025
462c20d
Support docker_build_env, fixes #424 (#428)
arjunsuresh May 19, 2025
11ced8a
Fix env export for get-mlperf-inference-src (#430)
arjunsuresh May 19, 2025
ccc4dca
Fix ucx LD_LIBRARY_PATH for app-mlperf-inference-nvidia (#432)
arjunsuresh May 19, 2025
a57cb5d
Added set-cpu-freq script (#435)
arjunsuresh May 21, 2025
8006395
Update run-tests-on-modified-meta.yml
arjunsuresh May 22, 2025
5b24393
Added get-lib-jemalloc (#437), fix automatic test on modified meta
arjunsuresh May 22, 2025
3bd313e
Support mlc test for scripts needing PAT in github actions (#438)
arjunsuresh May 22, 2025
44cd55e
Delete .github/workflows/run-tests-on-modified-meta-with-secret.yml
arjunsuresh May 22, 2025
3390e64
Delete .github/scripts/list_modified_scripts_with_secrets.py
arjunsuresh May 22, 2025
9078b60
Update main.py | Remived mlperf.conf from automotive reference implem…
arjunsuresh May 22, 2025
7db8919
Added JEMALLOC_PATH for lib,jemalloc (#439)
arjunsuresh May 23, 2025
81e9278
Merge branch 'main' into dev
arjunsuresh May 25, 2025
9553d0a
Add automotive reference implementation workflow (#407)
anandhu-eng May 26, 2025
8839d87
Fix ipmitool version detect (#443)
arjunsuresh May 28, 2025
5796f15
Fix detect-sudo (#444)
arjunsuresh May 28, 2025
dc07eb4
Changes for automotive 0.5 (#442)
anandhu-eng May 28, 2025
cc1d43d
Fix for early stopping and command generation (#445)
anandhu-eng May 30, 2025
3509e2c
Updated tags for cognata dataset dependency (#447)
anandhu-eng Jun 2, 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
7 changes: 4 additions & 3 deletions .github/scripts/list_modified_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ def get_file_info(filepath):
with open(filepath, 'r') as file:
content = yaml.safe_load(file)
tests = content.get('tests', [])
if tests:
needs_pat = content.get('needs_pat', False)
if tests and not needs_pat:
num_tests = len(tests.get('run_inputs', []))
else:
num_tests = 0
Expand All @@ -17,7 +18,7 @@ def get_file_info(filepath):


def process_files(files):
filenames = files.split()
filenames = files.split(",")
return [
{
"file": file,
Expand All @@ -34,4 +35,4 @@ def process_files(files):
changed_files = sys.stdin.read().strip()
processed_files = process_files(changed_files)
json_processed_files = json.dumps(processed_files)
print(f"::set-output name=processed_files::{json_processed_files}")
print(json_processed_files)
1 change: 1 addition & 0 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
types: [published]
workflow_dispatch: {}


jobs:
build_wheels:
if: github.repository_owner == 'mlcommons'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run-tests-on-modified-meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
run: |
git remote add upstream ${{ github.event.pull_request.base.repo.clone_url }}
git fetch upstream
changed_files=$(git diff upstream/${{ github.event.pull_request.base.ref }} --name-only)
changed_files=$(git diff upstream/${{ github.event.pull_request.base.ref }} --name-only | paste -sd, -)
echo "$changed_files" | python3 .github/scripts/list_modified_files.py

process_modified_files:
Expand Down
37 changes: 31 additions & 6 deletions .github/workflows/test-mlc-script-features.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,15 @@ jobs:
mlcr get,wkhtmltopdf --quiet

- name: Test versions
continue-on-error: true
if: runner.os == 'linux'
if: runner.os == 'linux' && matrix.python-version == '3.8'
run: |
mlcr get,generic-python-lib,_package.scipy --version=1.9.3 --quiet
test $? -eq 0 || exit $?
mlcr get,generic-python-lib,_package.scipy --version=1.9.2 --quiet
test $? -eq 0 || exit $?
mlc find cache --tags=get,generic-python-lib,_package.scipy,version-1.9.3
mlc find cache --tags=get,generic-python-lib,_package.scipy,version-1.9.2
test $? -eq 0 || exit $?
# Need to add find cache here
# mlcr get,generic-python-lib,_package.scipy --version=1.9.3 --quiet --only_execute_from_cache=True
# test $? -eq 0 || exit 0


- name: Test python install from src
run: |
Expand Down Expand Up @@ -94,6 +91,34 @@ jobs:
run: |
mlcr run,docker,container --adr.compiler.tags=gcc --docker_mlc_repo=mlcommons@mlperf-automations --docker_mlc_repo_branch=dev --image_name=mlc-script-app-image-classification-onnx-py --env.MLC_DOCKER_RUN_SCRIPT_TAGS=app,image-classification,onnx,python --env.MLC_DOCKER_IMAGE_BASE=ubuntu:22.04 --env.MLC_DOCKER_IMAGE_REPO=local --quiet

test_experiment:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.12", "3.8"]
os: ["ubuntu-latest", "windows-latest", "macos-latest"]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Configure git longpaths (Windows)
if: matrix.os == 'windows-latest'
run: |
git config --system core.longpaths true
- name: Pull MLOps repository
run: |
pip install mlcflow
mlc pull repo ${{ github.event.pull_request.head.repo.html_url }} --branch=${{ github.event.pull_request.head.ref }}

- name: Test mlc experiment script
run: |
mlc experiment script --tags=detect,os --quiet --exp.repeat,=1,2,3
mlc experiment script --tags=detect,cpu --quiet --exp.explore=2:10:2

test_mlperf_retinanet_cpp_venv:
runs-on: ubuntu-latest
strategy:
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/test-mlperf-automotive.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Test MLPerf automotive

on:
pull_request_target:
branches: [ "main", "dev" ]
paths:
- 'script/**meta.yaml'

jobs:
fetch-secret:
runs-on: ubuntu-latest
outputs:
gdrive_secret: ${{ steps.op-load-secret.outputs.GDRIVE_SERVICE_ACCOUNT_KEY }}
steps:
- name: Load secret from 1Password
id: op-load-secret
uses: 1password/load-secrets-action@v2
with:
export-env: false
env:
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
GDRIVE_SERVICE_ACCOUNT_KEY: op://7basd2jirojjckncf6qnq3azai/bzbaco3uxoqs2rcyu42rvuccga/credential

run-mlperf:
runs-on: ubuntu-latest
needs:
- fetch-secret
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Set RCLONE Service account env var from secret
shell: bash
run: |
echo "::add-mask::${{ needs.fetch-secret.outputs.gdrive_secret }}"
echo "RCLONE_CONFIG_MLC_COGNATA_SERVICE_ACCOUNT_CREDENTIALS=${{ needs.fetch-secret.outputs.gdrive_secret }}" >> $GITHUB_ENV
echo "RCLONE_CONFIG_MLC_NUSCENES_SERVICE_ACCOUNT_CREDENTIALS=${{ needs.fetch-secret.outputs.gdrive_secret }}" >> $GITHUB_ENV
- name: Run MLPerf
run: |
pip install mlcflow
mlc pull repo ${{ github.event.pull_request.head.repo.html_url }} --branch=${{ github.event.pull_request.head.ref }}
mlc test script app,mlperf,automotive
13 changes: 9 additions & 4 deletions automation/script/docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ def dockerfile(self_module, input_params):
state_data = input_params.get('state', {})
constant_vars = input_params.get('const', {})
constant_state = input_params.get('const_state', {})
dockerfile_env = input_params.get('dockerfile_env', {})
tag_values = input_params.get('tags', '').split(",")
variation_tags = [tag[1:] for tag in tag_values if tag.startswith("_")]

Expand All @@ -56,7 +55,6 @@ def dockerfile(self_module, input_params):
'script_variation_tags': variation_tags
}
docker_settings = metadata.get('docker', {})
docker_settings['dockerfile_env'] = dockerfile_env
state_data['docker'] = docker_settings
add_deps_recursive = input_params.get('add_deps_recursive', {})

Expand Down Expand Up @@ -94,8 +92,6 @@ def dockerfile(self_module, input_params):

# Set Docker-specific configurations
docker_settings = state_data['docker']
docker_settings['dockerfile_env'] = dockerfile_env
dockerfile_env['MLC_RUN_STATE_DOCKER'] = True

if not docker_settings.get('run', True) and not input_params.get(
'docker_run_override', False):
Expand Down Expand Up @@ -171,13 +167,18 @@ def dockerfile(self_module, input_params):
if input_params.get('docker_push_image') in [True, 'True', 'yes']:
env['MLC_DOCKER_PUSH_IMAGE'] = 'yes'

dockerfile_env = docker_inputs.get('env', {})
dockerfile_build_env = docker_inputs.get('build_env', {})

dockerfile_env['MLC_RUN_STATE_DOCKER'] = True
# Generate Dockerfile
mlc_docker_input = {
'action': 'run', 'automation': 'script', 'tags': 'build,dockerfile',
'fake_run_option': " " if docker_inputs.get('real_run') else " --fake_run",
'comments': comments, 'run_cmd': f"{run_command_string} --quiet",
'script_tags': input_params.get('tags'), 'env': env,
'dockerfile_env': dockerfile_env,
'dockerfile_build_env': dockerfile_build_env,
'quiet': True, 'real_run': True
}

Expand Down Expand Up @@ -377,6 +378,9 @@ def docker_run(self_module, i):
env.update({docker_input_mapping[key]: i[key]
for key in docker_input_mapping if key in i})

if docker_inputs.get('user'):
docker_settings['user'] = docker_inputs['user']

# Handle environment variable-based mounts
res = process_mounts(
mounts,
Expand Down Expand Up @@ -412,6 +416,7 @@ def docker_run(self_module, i):
'quiet': True, 'real_run': True, 'add_deps_recursive': {'build-docker-image': {'dockerfile': dockerfile_path}},
**docker_inputs
}

r = self_module.action_object.access(mlc_docker_input)
if r['return'] > 0:
return r
Expand Down
7 changes: 5 additions & 2 deletions automation/script/docker_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def prepare_docker_inputs(input_params, docker_settings,
keys = [
"mlc_repo", "mlc_repo_branch", "base_image", "os", "os_version",
"mlc_repos", "skip_mlc_sys_upgrade", "extra_sys_deps", "image_name",
"gh_token", "fake_run_deps", "run_final_cmds", "real_run", "copy_files", "path", "user"
"gh_token", "fake_run_deps", "run_final_cmds", "real_run", "copy_files", "path", "user", "env", "build_env"
]

if run_stage:
Expand Down Expand Up @@ -452,7 +452,10 @@ def get_container_path(value, username="mlcuser", extract_parent_folder=False):

new_value = ''
if "cache" in path_split and "local" in path_split:
new_path_split = ["", "home", username, "MLC", "repos"]
if username == "root":
new_path_split = ["", "root", "MLC", "repos"]
else:
new_path_split = ["", "home", username, "MLC", "repos"]
repo_entry_index = path_split.index("local")
if len(path_split) >= repo_entry_index + 3:
new_path_split1 = new_path_split + \
Expand Down
Loading
Loading