Skip to content

Update check-broken-links.yml #137

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 12 commits into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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: 0 additions & 1 deletion .github/workflows/build_wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ on:
- VERSION
- setup.py


jobs:
build_wheels:
if: github.repository_owner == 'mlcommons'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-mlc-script-features.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ jobs:
- name: Run docker container from dockerhub on linux
if: runner.os == 'linux'
run: |
mlc run script --tags=run,docker,container --adr.compiler.tags=gcc --docker_mlc_repo=mlcommons@mlperf-automations --image_name=cm-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=cknowledge --quiet
mlc run script --tags=run,docker,container --adr.compiler.tags=gcc --docker_mlc_repo=mlcommons@mlperf-automations --docker_mlc_repo_branch=dev --image_name=cm-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=cknowledge --quiet

- name: Run docker container locally on linux
if: runner.os == 'linux'
run: |
mlc run script --tags=run,docker,container --adr.compiler.tags=gcc --docker_mlc_repo=mlcommons@mlperf-automations --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
mlc run script --tags=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

10 changes: 4 additions & 6 deletions .github/workflows/test-mlperf-inference-abtf-poc.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: MLPerf Automotive POC Test

on:
Expand All @@ -20,7 +18,7 @@ jobs:
python-version: [ "3.8", "3.12" ]
backend: [ "pytorch" ]
implementation: [ "python" ]
docker: [ "", " --docker --docker_os=ubuntu --docker_os_version=22.04 --docker_mlc_repo=mlcommons@mlperf-automations --docker_mlc_repo_branch=dev --docker_dt=yes" ]
docker: [ "", " --docker --docker_mlc_repo=mlcommons@mlperf-automations --docker_mlc_repo_branch=dev --docker_dt" ]
extra-args: [ "--adr.compiler.tags=gcc", "--env.MLC_MLPERF_LOADGEN_BUILD_FROM_SRC=off" ]
exclude:
- os: ubuntu-24.04
Expand All @@ -30,16 +28,16 @@ jobs:
- os: windows-latest
extra-args: "--adr.compiler.tags=gcc"
- os: windows-latest
docker: " --docker --docker_it=no --docker_mlc_repo=mlcommons@mlperf-automations --docker_mlc_repo_branch=dev --docker_dt=yes"
docker: " --docker --docker_mlc_repo=mlcommons@mlperf-automations --docker_mlc_repo_branch=dev --docker_dt"
# windows docker image is not supported in CM yet
- os: macos-latest
python-version: "3.8"
- os: macos-13
python-version: "3.8"
- os: macos-latest
docker: " --docker --docker_it=no --docker_mlc_repo=mlcommons@mlperf-automations --docker_mlc_repo_branch=dev --docker_dt=yes"
docker: " --docker --docker_mlc_repo=mlcommons@mlperf-automations --docker_mlc_repo_branch=dev --docker_dt"
- os: macos-13
docker: " --docker --docker_it=no --docker_mlc_repo=mlcommons@mlperf-automations --docker_mlc_repo_branch=dev --docker_dt=yes"
docker: " --docker --docker_mlc_repo=mlcommons@mlperf-automations --docker_mlc_repo_branch=dev --docker_dt"

steps:
- uses: actions/checkout@v3
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test-mlperf-inference-rgat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
- name: Test MLPerf Inference R-GAT using ${{ matrix.backend }} on ${{ matrix.os }}
run: |
mlcr --tags=run,mlperf,inference,generate-run-cmds,_submission,_short --adr.inference-src.tags=_branch.dev --pull_changes=yes --pull_inference_changes=yes --submitter="MLCommons" --hw_name=gh_${{ matrix.os }}_x86 --model=rgat --implementation=${{ matrix.implementation }} --backend=${{ matrix.backend }} --device=cpu --scenario=Offline --test_query_count=500 --adr.compiler.tags=gcc --category=datacenter --quiet -v --target_qps=1

- name: Push Results
if: github.repository_owner == 'gateoverflow'
env:
Expand Down
3 changes: 1 addition & 2 deletions automation/script/docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def docker_run(self_module, i):
regenerate_docker_file = not i.get('docker_noregenerate', False)
recreate_docker_image = i.get('docker_recreate', False)

if i.get('docker_skip_build', False):
if is_true(i.get('docker_skip_build', False)):
regenerate_docker_file = False
recreate_docker_image = False
env['MLC_DOCKER_SKIP_BUILD'] = 'yes'
Expand All @@ -209,7 +209,6 @@ def docker_run(self_module, i):
r = prune_input({'input': i, 'extra_keys_starts_with': ['docker_']})
f_run_cmd = r['new_input']

print(f"regenerate_docker_file = {regenerate_docker_file}")
# Regenerate Dockerfile if required
if regenerate_docker_file:
r = dockerfile(self_module, i)
Expand Down
13 changes: 9 additions & 4 deletions automation/script/docker_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,16 @@ def prepare_docker_inputs(input_params, docker_settings,
if (value := input_params.get(f"docker_{key}", docker_settings.get(key, get_docker_default(key)))) is not None
}

if docker_inputs.get('detached', docker_inputs.get('dt')):
if is_true(docker_inputs.get('detached', docker_inputs.get('dt', ''))):
docker_inputs['interactive'] = False
docker_inputs['detached'] = True
elif is_true(docker_inputs.get('interactive', docker_inputs.get('it', ''))):
docker_inputs['interactive'] = True
docker_inputs['detached'] = False

for key in ["dt", "it"]:
if docker_inputs.get(key):
del (docker_inputs[key])

# Determine Dockerfile suffix and path
docker_base_image = docker_inputs.get('base_image')
Expand Down Expand Up @@ -268,9 +275,7 @@ def get_docker_default(key):
"skip_run_cmd": False,
"pre_run_cmds": [],
"run_cmd_prefix": '',
"port_maps": [],
"detached": False,
"interactive": True
"port_maps": []
}
if key in defaults:
return defaults[key]
Expand Down
8 changes: 8 additions & 0 deletions automation/utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
from mlc.utils import *


def is_true(val):
return str(val).lower() in ["1", "true", "on", "yes"]


def is_false(val):
return str(val).lower() in ["0", "false", "off", "no"]


def get_host_os_info(i={}):
"""
Get some host platform name (currently windows or linux) and OS bits
Expand Down
2 changes: 1 addition & 1 deletion script/app-mlperf-automotive/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ docker:
use_host_user_id: True
real_run: false
interactive: True
mlc_repos: 'mlc pull repo mlcommons@cm4abtf --branch=poc'
mlc_repos_off: 'mlc pull repo mlcommons@cm4abtf --branch=poc'
deps:
- tags: get,abtf,scratch,space
mounts:
Expand Down
6 changes: 3 additions & 3 deletions script/build-dockerfile/customize.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,15 +264,15 @@ def preprocess(i):
DOCKER_GROUP = "-g $GID -o"

user_shell = json.loads(shell)
f.write('RUN useradd ' + DOCKER_USER_ID + DOCKER_GROUP + ' --create-home --shell ' + user_shell[0] + ' '
f.write(f"""RUN id -u {docker_user} > /dev/null 2>&1 || useradd """ + DOCKER_USER_ID + DOCKER_GROUP + ' --create-home --shell ' + user_shell[0] + ' '
+ docker_user + EOL)
f.write(
'RUN echo "' +
docker_user +
' ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers' +
EOL)
f.write('USER ' + docker_user + ":" + docker_group + EOL)
f.write('ENV HOME=/home/mlcuser' + EOL)
f.write(f"""ENV HOME=/home/{docker_user}""" + EOL)

else:
f.write('ENV HOME=/root' + EOL)
Expand All @@ -284,7 +284,7 @@ def preprocess(i):
docker_env_key + "=" + str(dockerfile_env[docker_env_key])

workdir = get_value(env, config, 'WORKDIR', 'MLC_DOCKER_WORKDIR')
if workdir and ("/home/mlcuser" not in workdir or str(env.get('MLC_DOCKER_USE_DEFAULT_USER', '')).lower() not in [
if workdir and (f"""/home/{docker_user}""" not in workdir or str(env.get('MLC_DOCKER_USE_DEFAULT_USER', '')).lower() not in [
"yes", "1", "true"]):
f.write('WORKDIR ' + workdir + EOL)

Expand Down
3 changes: 2 additions & 1 deletion script/build-dockerfile/dockerinfo.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@
"WORKDIR": "/home/mlcuser",
"distros": {
"ubuntu": {
"USER": "ubuntu",
"package-manager-update-cmd": "apt-get update -y",
"package-manager-get-cmd": "apt-get install -y",
"packages": [
"python3", "python3-pip", "git", "sudo", "wget", "python3-venv", "systemctl"
"python3", "python3-pip", "git", "sudo", "wget", "python3-venv", "systemctl", "unzip"
],
"versions": {
"18.04": {
Expand Down
2 changes: 1 addition & 1 deletion script/build-dockerfile/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ default_env:
'
MLC_DOCKER_OS: ubuntu
MLC_DOCKER_NOT_PULL_UPDATE: False
MLC_MLOPS_REPO_BRANCH: mlc
MLC_MLOPS_REPO_BRANCH: dev

input_mapping:
build: MLC_BUILD_DOCKER_IMAGE
Expand Down
2 changes: 1 addition & 1 deletion script/get-sys-utils-cm/run-ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ fi
MLC_APT_TOOL=${MLC_APT_TOOL:-apt-get}

${MLC_SUDO} ${MLC_APT_TOOL} update && \
${MLC_SUDO} DEBIAN_FRONTEND=noninteractive ${MLC_APT_TOOL} install -y --no-install-recommends \
${MLC_SUDO} DEBIAN_FRONTEND=noninteractive ${MLC_APT_TOOL} install -y --no-install-recommends --ignore-missing \
apt-utils \
git \
wget \
Expand Down
Loading