From f5225bdb0289f6f2a2b5ffcb786a37d39528f0cb Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Fri, 10 Jan 2025 21:25:26 +0000 Subject: [PATCH 01/84] Update test-mlperf-inference-resnet50.yml --- .github/workflows/test-mlperf-inference-resnet50.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-mlperf-inference-resnet50.yml b/.github/workflows/test-mlperf-inference-resnet50.yml index 613457691..49eafb9f6 100644 --- a/.github/workflows/test-mlperf-inference-resnet50.yml +++ b/.github/workflows/test-mlperf-inference-resnet50.yml @@ -69,10 +69,11 @@ jobs: ubwkjh-Ii8UJDpG2EoU6GQ/field/Access Token > env:PAT # Fetch PAT and store in environment variable - name: Push Results - if: github.repository_owner == 'mlcommons_off' + if: github.repository_owner == 'mlcommons' env: GITHUB_TOKEN: ${{ env.PAT }} run: | git config --global user.name mlcommons-bot git config --global user.email "mlcommons-bot@users.noreply.github.com" + git clone -b auto-update mlperf_inference_test_submissions_v5.0 cm run script --tags=push,github,mlperf,inference,submission --env.CM_GITHUB_PAT=${{ env.PAT }} --repo_url=https://github.com/mlcommons/mlperf_inference_test_submissions_v5.0 --repo_branch=auto-update --commit_message="Results from R50 GH action on ${{ matrix.os }}" --quiet From 934dab425e45cd629f427cc00519f21bd2899921 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Fri, 10 Jan 2025 21:39:51 +0000 Subject: [PATCH 02/84] Update test-cm-based-submission-generation.yml --- .github/workflows/test-cm-based-submission-generation.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test-cm-based-submission-generation.yml b/.github/workflows/test-cm-based-submission-generation.yml index 6016a99b7..8ac9d3814 100644 --- a/.github/workflows/test-cm-based-submission-generation.yml +++ b/.github/workflows/test-cm-based-submission-generation.yml @@ -62,6 +62,7 @@ jobs: - name: Pull repo where test cases are uploaded run: | git clone -b submission-generation-tests https://github.com/mlcommons/inference.git submission_generation_tests + - name: Run Submission Generation - ${{ matrix.case }} ${{ matrix.action }} ${{ matrix.category }} ${{ matrix.division }} continue-on-error: true run: | From ce4aa28853bf5ce6479f575e1477df2a930ba103 Mon Sep 17 00:00:00 2001 From: arjunsuresh Date: Fri, 10 Jan 2025 23:42:42 +0000 Subject: [PATCH 03/84] [Automated Commit] Format Codebase --- script/push-mlperf-inference-results-to-github/customize.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/push-mlperf-inference-results-to-github/customize.py b/script/push-mlperf-inference-results-to-github/customize.py index 501b39e5d..06ffd10fe 100644 --- a/script/push-mlperf-inference-results-to-github/customize.py +++ b/script/push-mlperf-inference-results-to-github/customize.py @@ -37,7 +37,7 @@ def preprocess(i): if env.get('CM_GITHUB_PAT', '') != '': token = env['CM_GITHUB_PAT'] if token == "PAT": - env['CM_SET_REMOTE_URL_CMD'] = f"""git remote set-url origin https://git:\$PAT@{p.host}/{p.owner}/{p.repo}""" + env['CM_SET_REMOTE_URL_CMD'] = f"""git remote set-url origin https://git:\\$PAT@{p.host}/{p.owner}/{p.repo}""" else: env['CM_SET_REMOTE_URL_CMD'] = f"""git remote set-url origin https://git:{token}@{p.host}/{p.owner}/{p.repo}""" From 87bcbaaffa04d8cd09841708598d1972344d2c5f Mon Sep 17 00:00:00 2001 From: arjunsuresh Date: Sat, 11 Jan 2025 00:56:54 +0000 Subject: [PATCH 04/84] [Automated Commit] Format Codebase --- script/push-mlperf-inference-results-to-github/customize.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/script/push-mlperf-inference-results-to-github/customize.py b/script/push-mlperf-inference-results-to-github/customize.py index e84b2f5c2..59715ffce 100644 --- a/script/push-mlperf-inference-results-to-github/customize.py +++ b/script/push-mlperf-inference-results-to-github/customize.py @@ -37,7 +37,8 @@ def preprocess(i): if env.get('CM_GITHUB_PAT', '') != '': token = env['CM_GITHUB_PAT'] if token == "PAT": - env['CM_GIT_PUSH_CMD'] = r"""git push https://x-access-token:\$PAT@"""+f"""{p.host}/{p.owner}/{p.repo}""" + env['CM_GIT_PUSH_CMD'] = r"""git push https://x-access-token:\$PAT@""" + \ + f"""{p.host}/{p.owner}/{p.repo}""" else: env['CM_GIT_PUSH_CMD'] = F"""git push https://x-access-token:{env['CM_GITHUB_PAT']}@{p.host}/{p.owner}/{p.repo}""" From 1467c28aee7079532d06fe2019ad07d1b93170cf Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Mon, 13 Jan 2025 16:45:47 +0530 Subject: [PATCH 05/84] Added a common automation base class in MLC --- automation/script/module.py | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/automation/script/module.py b/automation/script/module.py index 2ddc59c67..c9ca903c6 100644 --- a/automation/script/module.py +++ b/automation/script/module.py @@ -11,12 +11,15 @@ import os import logging -from cmind.automation import Automation -from cmind import utils -from cmind import __version__ as current_cm_version +from main import Automation +from utils import * +from main import __version__ as current_mlc_version + + +class ScriptAutomation(Automation): + -class CAutomation(Automation): """ CM "script" automation actions (making native scripts more portable, deterministic, reusable and reproducible) @@ -24,7 +27,8 @@ class CAutomation(Automation): ############################################################ def __init__(self, cmind, automation_file): - super().__init__(cmind, __file__) + #super().__init__(cmind, __file__) + super().__init__(cmind) logging.basicConfig(level=logging.INFO) self.os_info = {} self.run_state = {} @@ -258,7 +262,7 @@ def _run(self, i): 'return': 1, 'error': 'Current directory "{}" is not writable - please change it'.format(os.getcwd())} # Check if has default config - r = self.cmind.access({'action': 'load', + r = self.action_object.access({'action': 'load', 'automation': 'cfg,88dce9c160324c5d', 'artifact': 'default'}) if r['return'] == 0: @@ -475,8 +479,9 @@ def _run(self, i): # Get and cache minimal host OS info to be able to run scripts and # manage OS environment if len(self.os_info) == 0: - r = self.cmind.access({'action': 'get_host_os_info', - 'automation': 'utils,dc2743f8450541e3'}) + r = get_host_os_info() + #r = self.access({'action': 'get_host_os_info', + # 'automation': 'utils,dc2743f8450541e3'}) if r['return'] > 0: return r @@ -527,7 +532,7 @@ def _run(self, i): tags_string = i.get('tags', '').strip() - ii = utils.sub_input(i, self.cmind.cfg['artifact_keys']) + ii = utils.sub_input(i, self.action_object.cfg['artifact_keys']) ii['tags'] = tags_string ii['out'] = None @@ -2836,7 +2841,7 @@ def search(self, i): i['out'] = None i['common'] = True - r = super(CAutomation, self).search(i) + r = super(ScriptAutomation, self).search(i) if r['return'] > 0: return r From 05f1ae86b31865a3b875dd043a5ef46286f11b46 Mon Sep 17 00:00:00 2001 From: arjunsuresh Date: Mon, 13 Jan 2025 11:16:10 +0000 Subject: [PATCH 06/84] [Automated Commit] Format Codebase --- automation/script/module.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/automation/script/module.py b/automation/script/module.py index c9ca903c6..c502e7062 100644 --- a/automation/script/module.py +++ b/automation/script/module.py @@ -18,8 +18,6 @@ class ScriptAutomation(Automation): - - """ CM "script" automation actions (making native scripts more portable, deterministic, reusable and reproducible) @@ -27,7 +25,7 @@ class ScriptAutomation(Automation): ############################################################ def __init__(self, cmind, automation_file): - #super().__init__(cmind, __file__) + # super().__init__(cmind, __file__) super().__init__(cmind) logging.basicConfig(level=logging.INFO) self.os_info = {} @@ -263,8 +261,8 @@ def _run(self, i): # Check if has default config r = self.action_object.access({'action': 'load', - 'automation': 'cfg,88dce9c160324c5d', - 'artifact': 'default'}) + 'automation': 'cfg,88dce9c160324c5d', + 'artifact': 'default'}) if r['return'] == 0: config = r['config'] @@ -480,7 +478,7 @@ def _run(self, i): # manage OS environment if len(self.os_info) == 0: r = get_host_os_info() - #r = self.access({'action': 'get_host_os_info', + # r = self.access({'action': 'get_host_os_info', # 'automation': 'utils,dc2743f8450541e3'}) if r['return'] > 0: return r From 0e6a4f9cd4c9bda7fef1aeef12f8cd3461bc45ff Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Wed, 15 Jan 2025 18:02:03 +0530 Subject: [PATCH 07/84] Changes for mlc --- automation/__init__.py | 1 + automation/script/__init__.py | 1 + automation/script/module.py | 13 +- automation/utils.py | 1093 +++++++++++++++++++++++++++++++++ 4 files changed, 1103 insertions(+), 5 deletions(-) create mode 100644 automation/__init__.py create mode 100644 automation/script/__init__.py create mode 100644 automation/utils.py diff --git a/automation/__init__.py b/automation/__init__.py new file mode 100644 index 000000000..8d1c8b69c --- /dev/null +++ b/automation/__init__.py @@ -0,0 +1 @@ + diff --git a/automation/script/__init__.py b/automation/script/__init__.py new file mode 100644 index 000000000..8d1c8b69c --- /dev/null +++ b/automation/script/__init__.py @@ -0,0 +1 @@ + diff --git a/automation/script/module.py b/automation/script/module.py index c502e7062..0f2ceea39 100644 --- a/automation/script/module.py +++ b/automation/script/module.py @@ -11,9 +11,11 @@ import os import logging -from main import Automation +from mlc.main import Automation +#from mlc.utils import * +import mlc.utils as utils +from mlc.main import __version__ as current_mlc_version from utils import * -from main import __version__ as current_mlc_version class ScriptAutomation(Automation): @@ -25,8 +27,9 @@ class ScriptAutomation(Automation): ############################################################ def __init__(self, cmind, automation_file): - # super().__init__(cmind, __file__) - super().__init__(cmind) + #super().__init__(cmind, __file__) + super().__init__(cmind, "script") + print("Base init over") logging.basicConfig(level=logging.INFO) self.os_info = {} self.run_state = {} @@ -226,7 +229,7 @@ def run(self, i): def _run(self, i): - from cmind import utils + #from cmind import utils import copy import time import shutil diff --git a/automation/utils.py b/automation/utils.py new file mode 100644 index 000000000..5548453c6 --- /dev/null +++ b/automation/utils.py @@ -0,0 +1,1093 @@ +from mlc.utils import * + +def get_host_os_info(i={}): + """ + Get some host platform name (currently windows or linux) and OS bits + + Args: + (CM input dict): + + (bits) (str): force host platform bits + + Returns: + (CM return dict): + + * return (int): return code == 0 if no error and >0 if error + * (error) (str): error string if return>0 + + * info (dict): + * platform (str): "windows", "linux" or "darwin" + * bat_ext (str): ".bat" or ".sh" + * bits (str): 32 or 64 bits + * python_bits 9str): python bits + + """ + + import os + import platform + import struct + + info = {} + + pbits = str(8 * struct.calcsize("P")) + + if platform.system().lower().startswith('win'): + platform = 'windows' + info['bat_ext'] = '.bat' + info['set_env'] = 'set ${key}=${value}' + info['env_separator'] = ';' + info['env_var'] = '%env_var%' + info['bat_rem'] = 'rem ${rem}' + info['run_local_bat'] = 'call ${bat_file}' + info['run_local_bat_from_python'] = 'call ${bat_file}' + info['run_bat'] = 'call ${bat_file}' + info['start_script'] = ['@echo off', ''] + info['env'] = { + "CM_WINDOWS": "yes" + } + else: + if platform.system().lower().startswith('darwin'): + platform = 'darwin' + else: + platform = 'linux' + + info['bat_ext'] = '.sh' + info['set_env'] = 'export ${key}="${value}"' + info['env_separator'] = ':' + info['env_var'] = '${env_var}' + info['set_exec_file'] = 'chmod 755 "${file_name}"' + info['bat_rem'] = '# ${rem}' + info['run_local_bat'] = '. ./${bat_file}' + info['run_local_bat_from_python'] = 'bash -c ". ./${bat_file}"' + info['run_bat'] = '. ${bat_file}' + info['start_script'] = ['#!/bin/bash', ''] + info['env'] = {} + + info['platform'] = platform + + obits = i.get('bits', '') + if obits == '': + obits = '32' + if platform == 'windows': + # Trying to get fast way to detect bits + if os.environ.get('ProgramW6432', '') != '' or os.environ.get( + 'ProgramFiles(x86)', '') != '': # pragma: no cover + obits = '64' + else: + # On Linux use first getconf LONG_BIT and if doesn't work use + # python bits + + obits = pbits + + r = generate_temp_file({}) + if r['return'] > 0: + return r + + fn = r['file_name'] + + cmd = 'getconf LONG_BIT > ' + fn + rx = os.system(cmd) + + if rx == 0: + r = load_txt(file_name=fn, remove_after_read=True) + + if r['return'] == 0: + s = r['string'].strip() + if len(s) > 0 and len(s) < 4: + obits = s + else: + if os.path.isfile(fn): + os.remove(fn) + + info['bits'] = obits + info['python_bits'] = pbits + + return {'return': 0, 'info': info} + +########################################################################## + + +def download_file(i): + """ + Download file using requests + + Args: + (CM input dict): + + url (str): URL with file + (filename) (str): explicit file name + (path) (str): path to record file (or current if empty) + (chunk_size) (int): chunck size in bytes (65536 by default) + (text) (str): print text before downloaded status ("Downloaded: " by default) + (verify) (bool): verify SSL certificate if True (True by default) + can be switched by global env CM_UTILS_DOWNLOAD_VERIFY_SSL = no + + Returns: + (CM return dict): + + * return (int): return code == 0 if no error and >0 if error + * (error) (str): error string if return>0 + + * filename (str): file name + * path (str): path to file + * size (int): file size + + """ + + import requests + import time + import sys + from urllib import parse + + # Get URL + url = i['url'] + + # Check file name + file_name = i.get('filename', '') + if file_name == '': + parsed_url = parse.urlparse(url) + file_name = os.path.basename(parsed_url.path) + + # Check path + path = i.get('path', '') + if path is None or path == '': + path = os.getcwd() + + # Output file + path_to_file = os.path.join(path, file_name) + + if os.path.isfile(path_to_file): + os.remove(path_to_file) + + print('Downloading to {}'.format(path_to_file)) + print('') + + # Download + size = -1 + downloaded = 0 + chunk_size = i.get('chunk_size', 65536) + + text = i.get('text', 'Downloaded: ') + + if 'CM_UTILS_DOWNLOAD_VERIFY_SSL' in os.environ: + verify = os.environ['CM_UTILS_DOWNLOAD_VERIFY_SSL'] == 'yes' + else: + verify = i.get('verify', True) + + try: + with requests.get(url, stream=True, allow_redirects=True, verify=verify) as download: + download.raise_for_status() + + size_string = download.headers.get('Content-Length') + + if size_string is None: + transfer_encoding = download.headers.get( + 'Transfer-Encoding', '') + if transfer_encoding != 'chunked': + return {'return': 1, 'error': 'did not receive file'} + else: + size_string = "0" + + size = int(size_string) + + with open(path_to_file, 'wb') as output: + for chunk in download.iter_content(chunk_size=chunk_size): + + if chunk: + output.write(chunk) + if size == 0: + continue + downloaded += 1 + percent = downloaded * chunk_size * 100 / size + + sys.stdout.write("\r{}{:3.0f}%".format(text, percent)) + sys.stdout.flush() + + sys.stdout.write("\r{}{:3.0f}%".format(text, 100)) + sys.stdout.flush() + + except Exception as e: + return {'return': 1, 'error': format(e)} + + print('') + if size == 0: + file_stats = os.stat(path_to_file) + size = file_stats.st_size + + return {'return': 0, 'filename': file_name, + 'path': path_to_file, 'size': size} + +########################################################################## + + +def unzip_file(i): + """ + Unzip file + + Args: + (CM input dict): + + filename (str): explicit file name + (path) (str): path where to unzip file (current path otherwise) + (strip_folders) (int): strip first folders + + Returns: + (CM return dict): + + * return (int): return code == 0 if no error and >0 if error + * (error) (str): error string if return>0 + + """ + + import zipfile + + # Check file name + file_name = i['filename'] + + if not os.path.isfile(file_name): + return {'return': 1, + 'error': 'file {} not found'.format(file_name)} + + console = i.get('out') == 'con' + + # Attempt to read cmr.json + file_name_handle = open(file_name, 'rb') + file_name_zip = zipfile.ZipFile(file_name_handle) + + info_files = file_name_zip.infolist() + + path = i.get('path', '') + if path is None or path == '': + path = os.getcwd() + + strip_folders = i.get('strip_folders', 0) + + # Unpacking zip + for info in info_files: + f = info.filename + permissions = info.external_attr + + if not f.startswith('..') and not f.startswith( + '/') and not f.startswith('\\'): + f_zip = f + + if strip_folders > 0: + fsplit = f.split('/') # Zip standard on all OS + f = '/'.join(fsplit[strip_folders:]) + + file_path = os.path.join(path, f) + + if f.endswith('/'): + # create directory + if not os.path.exists(file_path): + os.makedirs(file_path) + else: + dir_name = os.path.dirname(file_path) + if not os.path.exists(dir_name): + os.makedirs(dir_name) + + # extract file + file_out = open(file_path, 'wb') + file_out.write(file_name_zip.read(f_zip)) + file_out.close() + + if permissions > 0xffff: + os.chmod(file_path, permissions >> 16) + + file_name_zip.close() + file_name_handle.close() + + return {'return': 0} + +########################################################################## + + +def compare_versions(i): + """ + Compare versions + + Args: + + version1 (str): version 1 + version2 (str): version 2 + + Returns: + (CM return dict): + + * comparison (int): 1 - version 1 > version 2 + 0 - version 1 == version 2 + -1 - version 1 < version 2 + + * return (int): return code == 0 if no error and >0 if error + * (error) (str): error string if return>0 + """ + + version1 = i['version1'] + version2 = i['version2'] + + l_version1 = version1.split('.') + l_version2 = version2.split('.') + + # 3.9.6 vs 3.9 + # 3.9 vs 3.9.6 + + i_version1 = [int(v) if v.isdigit() else v for v in l_version1] + i_version2 = [int(v) if v.isdigit() else v for v in l_version2] + + comparison = 0 + + for index in range(max(len(i_version1), len(i_version2))): + v1 = i_version1[index] if index < len(i_version1) else 0 + v2 = i_version2[index] if index < len(i_version2) else 0 + + if v1 > v2: + comparison = 1 + break + elif v1 < v2: + comparison = -1 + break + + return {'return': 0, 'comparison': comparison} + +########################################################################## + + +def json2yaml(i): + """ + Convert JSON file to YAML + + Args: + + input (str): input file (.json) + (output) (str): output file (.yaml) + + Returns: + (CM return dict): + + * return (int): return code == 0 if no error and >0 if error + * (error) (str): error string if return>0 + """ + + input_file = i.get('input', '') + + if input_file == '': + return {'return': 1, 'error': 'please specify --input={json file}'} + + output_file = i.get('output', '') + + r = load_json(input_file, check_if_exists=True) + if r['return'] > 0: + return r + + meta = r['meta'] + + if output_file == '': + output_file = input_file[:- + 5] if input_file.endswith('.json') else input_file + output_file += '.yaml' + + r = save_yaml(output_file, meta) + if r['return'] > 0: + return r + + return {'return': 0} + +########################################################################## + + +def yaml2json(i): + """ + Convert YAML file to JSON + + Args: + + input (str): input file (.yaml) + (output) (str): output file (.json) + + Returns: + (CM return dict): + + * return (int): return code == 0 if no error and >0 if error + * (error) (str): error string if return>0 + """ + + input_file = i.get('input', '') + + if input_file == '': + return {'return': 1, 'error': 'please specify --input={yaml file}'} + + output_file = i.get('output', '') + + r = load_yaml(input_file, check_if_exists=True) + if r['return'] > 0: + return r + + meta = r['meta'] + + if output_file == '': + output_file = input_file[:- + 5] if input_file.endswith('.yaml') else input_file + output_file += '.json' + + r = save_json(output_file, meta) + if r['return'] > 0: + return r + + return {'return': 0} + +########################################################################## + + +def sort_json(i): + """ + Sort JSON file + + Args: + + input (str): input file (.json) + (output) (str): output file + + Returns: + (CM return dict): + + * return (int): return code == 0 if no error and >0 if error + * (error) (str): error string if return>0 + """ + + input_file = i.get('input', '') + + if input_file == '': + return {'return': 1, 'error': 'please specify --input={json file}'} + + r = load_json(input_file, check_if_exists=True) + if r['return'] > 0: + return r + + meta = r['meta'] + + output_file = i.get('output', '') + + if output_file == '': + output_file = input_file + + r = save_json(output_file, meta, sort_keys=True) + if r['return'] > 0: + return r + + return {'return': 0} + +########################################################################## + + +def dos2unix(i): + """ + Convert DOS file to UNIX (remove \r) + + Args: + + input (str): input file (.txt) + (output) (str): output file + + Returns: + (CM return dict): + + * return (int): return code == 0 if no error and >0 if error + * (error) (str): error string if return>0 + """ + + input_file = i.get('input', '') + + if input_file == '': + return {'return': 1, 'error': 'please specify --input={txt file}'} + + r = load_txt(input_file, check_if_exists=True) + if r['return'] > 0: + return r + + s = r['string'].replace('\r', '') + + output_file = i.get('output', '') + + if output_file == '': + output_file = input_file + + r = save_txt(output_file, s) + if r['return'] > 0: + return r + + return {'return': 0} + +########################################################################## + + +def replace_string_in_file(i): + """ + Convert DOS file to UNIX (remove \r) + + Args: + + input (str): input file (.txt) + (output) (str): output file + string (str): string to replace + replacement (str): replacement string + + Returns: + (CM return dict): + + * return (int): return code == 0 if no error and >0 if error + * (error) (str): error string if return>0 + + (update) (bool): True if file was upated + """ + + input_file = i.get('input', '') + if input_file == '': + return {'return': 1, 'error': 'please specify --input={txt file}'} + + string = i.get('string', '') + if string == '': + return {'return': 1, + 'error': 'please specify --string={string to replace}'} + + replacement = i.get('replacement', '') + if replacement == '': + return {'return': 1, + 'error': 'please specify --replacement={string to replace}'} + + output_file = i.get('output', '') + + if output_file == '': + output_file = input_file + + r = load_txt(input_file, check_if_exists=True) + if r['return'] > 0: + return r + + s = r['string'].replace('\r', '') + + s = s.replace(string, replacement) + + r = save_txt(output_file, s) + if r['return'] > 0: + return r + + return {'return': 0} + +########################################################################## + + +def create_toc_from_md(i): + """ + Convert DOS file to UNIX (remove \r) + + Args: + + input (str): input file (.md) + (output) (str): output file (input+'.toc) + + Returns: + (CM return dict): + + * return (int): return code == 0 if no error and >0 if error + * (error) (str): error string if return>0 + """ + + input_file = i.get('input', '') + if input_file == '': + return {'return': 1, 'error': 'please specify --input={txt file}'} + + output_file = i.get('output', '') + + if output_file == '': + output_file = input_file + '.toc' + + r = load_txt(input_file, check_if_exists=True) + if r['return'] > 0: + return r + + lines = r['string'].split('\n') + + toc = [] + + toc.append('
') + toc.append('Click here to see the table of contents.') + toc.append('') + + for line in lines: + line = line.strip() + + if line.startswith('#'): + j = line.find(' ') + if j >= 0: + title = line[j:].strip() + + x = title.lower().replace(' ', '-') + + for k in range(0, 2): + if x.startswith('*'): + x = x[1:] + if x.endswith('*'): + x = x[:-1] + + for z in [':', '+', '.', '(', ')', ',']: + x = x.replace(z, '') + + y = ' ' * (2 * (j - 1)) + '* [' + title + '](#' + x + ')' + + toc.append(y) + + toc.append('') + toc.append('
') + + r = save_txt(output_file, '\n'.join(toc) + '\n') + if r['return'] > 0: + return r + + return {'return': 0} + +########################################################################## + + +def copy_to_clipboard(i): + """ + Copy string to a clipboard + + Args: + + string (str): string to copy to a clipboard + (add_quotes) (bool): add quotes to the string in a clipboard + (skip_fail) (bool): if True, do not fail + + Returns: + (CM return dict): + + * return (int): return code == 0 if no error and >0 if error + * (error) (str): error string if return>0 + """ + + s = i.get('string', '') + + if i.get('add_quotes', False): + s = '"' + s + '"' + + failed = False + warning = '' + + # Try to load pyperclip (seems to work fine on Windows) + try: + import pyperclip + except Exception as e: + warning = format(e) + failed = True + pass + + if not failed: + pyperclip.copy(s) + else: + failed = False + + # Try to load Tkinter + try: + from Tkinter import Tk + except ImportError as e: + warning = format(e) + failed = True + pass + + if failed: + failed = False + try: + from tkinter import Tk + except ImportError as e: + warning = format(e) + failed = True + pass + + if not failed: + # Copy to clipboard + try: + r = Tk() + r.withdraw() + r.clipboard_clear() + r.clipboard_append(s) + r.update() + r.destroy() + except Exception as e: + failed = True + warning = format(e) + + rr = {'return': 0} + + if failed: + if not i.get('skip_fail', False): + return {'return': 1, 'error': warning} + + rr['warning'] = warning + + return rr + +########################################################################## + + +def list_files_recursively(i): + """ + List files and concatenate into string separate by comma + + Args: + + Returns: + (CM return dict): + + * return (int): return code == 0 if no error and >0 if error + * (error) (str): error string if return>0 + """ + + files = os.walk('.') + + s = '' + + for (dir_path, dir_names, file_names) in files: + for f in file_names: + if s != '': + s += ',' + + if dir_path == '.': + dir_path2 = '' + else: + dir_path2 = dir_path[2:].replace('\\', '/') + '/' + + s += dir_path2 + f + + print(s) + + return {'return': 0} + +########################################################################## + + +def generate_secret(i): + """ + Generate secret for web apps + + Args: + + Returns: + (CM return dict): + + secret (str): secret + + * return (int): return code == 0 if no error and >0 if error + * (error) (str): error string if return>0 + """ + + import secrets + s = secrets.token_urlsafe(16) + + print(s) + + return {'return': 0, 'secret': s} + +########################################################################## + + +def detect_tags_in_artifact(i): + """ + Detect if there are tags in an artifact name (spaces) and update input + + Args: + + input (dict) : original input + + Returns: + (CM return dict): + + * return (int): return code == 0 if no error and >0 if error + * (error) (str): error string if return>0 + """ + + inp = i['input'] + + artifact = inp.get('artifact', '') + if artifact == '.': + del (inp['artifact']) + elif ' ' in artifact: # or ',' in artifact: + del (inp['artifact']) + if 'parsed_artifact' in inp: + del (inp['parsed_artifact']) + # Force substitute tags + inp['tags'] = artifact.replace(' ', ',') + + return {'return': 0} + +########################################################################## + + +def prune_input(i): + """ + Leave only input keys and remove the rest (to regenerate CM commands) + + Args: + + input (dict) : original input + (extra_keys_starts_with) (list): remove keys that starts + with the ones from this list + + Returns: + (CM return dict): + + new_input (dict): pruned input + + * return (int): return code == 0 if no error and >0 if error + * (error) (str): error string if return>0 + """ + + import copy + + inp = i['input'] + extra_keys = i.get('extra_keys_starts_with', []) + + i_run_cmd_arc = copy.deepcopy(inp) + for k in inp: + remove = False + if k in ['action', 'automation', 'cmd', 'out', + 'parsed_automation', 'parsed_artifact', 'self_module']: + remove = True + if not remove: + for ek in extra_keys: + if k.startswith(ek): + remove = True + break + + if remove: + del (i_run_cmd_arc[k]) + + return {'return': 0, 'new_input': i_run_cmd_arc} + +########################################################################## + + +def uid(i): + """ + Generate CM UID. + + Args: + (CM input dict): empty dict + + Returns: + (CM return dict): + + * return (int): return code == 0 if no error and >0 if error + * (error) (str): error string if return>0 + + * uid (str): CM UID + """ + + console = i.get('out') == 'con' + + r = gen_uid() + + if console: + print(r['uid']) + + return r + +########################################################################## + + +def system(i): + """ + Run system command and redirect output to string. + + Args: + (CM input dict): + + * cmd (str): command line + * (path) (str): go to this directory and return back to current + * (stdout) (str): stdout file + * (stderr) (str): stderr file + + Returns: + (CM return dict): + + * return (int): return code == 0 if no error and >0 if error + * (error) (str): error string if return>0 + + * ret (int): return code + * std (str): stdout + stderr + * stdout (str): stdout + * stderr (str): stderr + """ + + cmd = i['cmd'] + + if cmd == '': + return {'return': 1, 'error': 'cmd is empty'} + + path = i.get('path', '') + if path != '' and os.path.isdir(path): + cur_dir = os.getcwd() + os.chdir(path) + + if i.get('stdout', '') != '': + fn1 = i['stdout'] + fn1_delete = False + else: + r = gen_tmp_file({}) + if r['return'] > 0: + return r + fn1 = r['file_name'] + fn1_delete = True + + if i.get('stderr', '') != '': + fn2 = i['stderr'] + fn2_delete = False + else: + r = gen_tmp_file({}) + if r['return'] > 0: + return r + fn2 = r['file_name'] + fn2_delete = True + + cmd += ' > ' + fn1 + ' 2> ' + fn2 + rx = os.system(cmd) + + std = '' + stdout = '' + stderr = '' + + if os.path.isfile(fn1): + r = load_txt(file_name=fn1, remove_after_read=fn1_delete) + if r['return'] == 0: + stdout = r['string'].strip() + + if os.path.isfile(fn2): + r = load_txt(file_name=fn2, remove_after_read=fn2_delete) + if r['return'] == 0: + stderr = r['string'].strip() + + std = stdout + if stderr != '': + if std != '': + std += '\n' + std += stderr + + if path != '' and os.path.isdir(path): + os.chdir(cur_dir) + + return {'return': 0, 'ret': rx, 'stdout': stdout, + 'stderr': stderr, 'std': std} + +############################################################ + + +def load_cfg(i): + """ + Load configuration artifacts and files + + Args: + (CM input dict): + + + Returns: + (CM return dict): + + * return (int): return code == 0 if no error and >0 if error + * (error) (str): error string if return>0 + + """ + + return call_internal_module( + self, __file__, 'module_cfg', 'load_cfg', i) + +############################################################ + + +def select_cfg(i): + """ + Select cfg interactively + + Args: + (CM input dict): + tags (str): list of tags to find cfg + alias (str): alias of a cfg file + + Returns: + (CM return dict): + + * return (int): return code == 0 if no error and >0 if error + * (error) (str): error string if return>0 + + """ + + i['self_module'] = self + + return call_internal_module( + self, __file__, 'module_cfg', 'select_cfg', i) + +############################################################ + + +def print_yaml(i): + """ + Print YAML file + + Args: + (CM input dict): + file (str): input file + + Returns: + (CM return dict): + + * return (int): return code == 0 if no error and >0 if error + * (error) (str): error string if return>0 + + """ + + filename = i.get('file', '') + if filename == '': + return {'return': 1, 'error': 'please specify --file={YAML file}'} + + r = load_yaml(filename, check_if_exists=True) + if r['return'] > 0: + return r + + meta = r['meta'] + + import json + print(json.dumps(meta, indent=2)) + + return {'return': 0} + +############################################################ + + +def print_json(i): + """ + Print YAML file + + Args: + (CM input dict): + file (str): input file + + Returns: + (CM return dict): + + * return (int): return code == 0 if no error and >0 if error + * (error) (str): error string if return>0 + + """ + + filename = i.get('file', '') + if filename == '': + return {'return': 1, 'error': 'please specify --file={JSON file}'} + + r = load_json(filename, check_if_exists=True) + if r['return'] > 0: + return r + + meta = r['meta'] + + import json + print(json.dumps(meta, indent=2)) + + return {'return': 0} From bdcabe13a55fed489e49664c4630bd524f5e0dc1 Mon Sep 17 00:00:00 2001 From: arjunsuresh Date: Wed, 15 Jan 2025 12:33:28 +0000 Subject: [PATCH 08/84] [Automated Commit] Format Codebase --- automation/__init__.py | 1 - automation/script/__init__.py | 1 - automation/script/module.py | 6 +++--- automation/utils.py | 1 + 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/automation/__init__.py b/automation/__init__.py index 8d1c8b69c..e69de29bb 100644 --- a/automation/__init__.py +++ b/automation/__init__.py @@ -1 +0,0 @@ - diff --git a/automation/script/__init__.py b/automation/script/__init__.py index 8d1c8b69c..e69de29bb 100644 --- a/automation/script/__init__.py +++ b/automation/script/__init__.py @@ -1 +0,0 @@ - diff --git a/automation/script/module.py b/automation/script/module.py index 0f2ceea39..727fced91 100644 --- a/automation/script/module.py +++ b/automation/script/module.py @@ -12,7 +12,7 @@ import logging from mlc.main import Automation -#from mlc.utils import * +# from mlc.utils import * import mlc.utils as utils from mlc.main import __version__ as current_mlc_version from utils import * @@ -27,7 +27,7 @@ class ScriptAutomation(Automation): ############################################################ def __init__(self, cmind, automation_file): - #super().__init__(cmind, __file__) + # super().__init__(cmind, __file__) super().__init__(cmind, "script") print("Base init over") logging.basicConfig(level=logging.INFO) @@ -229,7 +229,7 @@ def run(self, i): def _run(self, i): - #from cmind import utils + # from cmind import utils import copy import time import shutil diff --git a/automation/utils.py b/automation/utils.py index 5548453c6..95aa0b2e9 100644 --- a/automation/utils.py +++ b/automation/utils.py @@ -1,5 +1,6 @@ from mlc.utils import * + def get_host_os_info(i={}): """ Get some host platform name (currently windows or linux) and OS bits From 90af1f893e7d43c5f5b2ad7c362403955e8d88e7 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Thu, 16 Jan 2025 02:13:43 +0530 Subject: [PATCH 09/84] Script automation meta added --- automation/script/module.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/automation/script/module.py b/automation/script/module.py index 727fced91..8122fa6f4 100644 --- a/automation/script/module.py +++ b/automation/script/module.py @@ -38,6 +38,10 @@ def __init__(self, cmind, automation_file): self.run_state['parent'] = None self.run_state['version_info'] = [] self.run_state['cache'] = False + self.meta = { + 'uid': '5b4e0237da074764', + 'alias': 'script' + } self.file_with_cached_state = 'cm-cached-state.json' @@ -798,6 +802,7 @@ def _run(self, i): script_artifact = list_of_found_scripts[select_script] meta = script_artifact.meta + #print(meta) path = script_artifact.path # Check min CM version requirement @@ -3728,6 +3733,8 @@ def _run_deps(self, deps, clean_env_keys_deps, env, state, const, const_state, a utils.merge_dicts( {'dict1': ii, 'dict2': d, 'append_lists': True, 'append_unique': True}) + #print(f"d = {d}") + #print(f" ii = {ii}") r = self.cmind.access(ii) if r['return'] > 0: return r From fd663f6928f1e436fa7453ffce6d611904dde6ae Mon Sep 17 00:00:00 2001 From: arjunsuresh Date: Wed, 15 Jan 2025 20:44:10 +0000 Subject: [PATCH 10/84] [Automated Commit] Format Codebase --- automation/script/module.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/automation/script/module.py b/automation/script/module.py index 8122fa6f4..0ccaa7d2b 100644 --- a/automation/script/module.py +++ b/automation/script/module.py @@ -39,9 +39,9 @@ def __init__(self, cmind, automation_file): self.run_state['version_info'] = [] self.run_state['cache'] = False self.meta = { - 'uid': '5b4e0237da074764', - 'alias': 'script' - } + 'uid': '5b4e0237da074764', + 'alias': 'script' + } self.file_with_cached_state = 'cm-cached-state.json' @@ -802,7 +802,7 @@ def _run(self, i): script_artifact = list_of_found_scripts[select_script] meta = script_artifact.meta - #print(meta) + # print(meta) path = script_artifact.path # Check min CM version requirement @@ -3733,8 +3733,8 @@ def _run_deps(self, deps, clean_env_keys_deps, env, state, const, const_state, a utils.merge_dicts( {'dict1': ii, 'dict2': d, 'append_lists': True, 'append_unique': True}) - #print(f"d = {d}") - #print(f" ii = {ii}") + # print(f"d = {d}") + # print(f" ii = {ii}") r = self.cmind.access(ii) if r['return'] > 0: return r From 6f0d9cbb8d5fab092cee2cb7d45e29a22e5d575a Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Thu, 16 Jan 2025 19:18:06 +0530 Subject: [PATCH 11/84] Fixes for mlc --- automation/script/module.py | 46 ++++++++++++++++++++++++++----------- 1 file changed, 33 insertions(+), 13 deletions(-) diff --git a/automation/script/module.py b/automation/script/module.py index 0ccaa7d2b..f563352a7 100644 --- a/automation/script/module.py +++ b/automation/script/module.py @@ -28,7 +28,7 @@ class ScriptAutomation(Automation): ############################################################ def __init__(self, cmind, automation_file): # super().__init__(cmind, __file__) - super().__init__(cmind, "script") + super().__init__(cmind, "script", automation_file) print("Base init over") logging.basicConfig(level=logging.INFO) self.os_info = {} @@ -38,11 +38,6 @@ def __init__(self, cmind, automation_file): self.run_state['parent'] = None self.run_state['version_info'] = [] self.run_state['cache'] = False - self.meta = { - 'uid': '5b4e0237da074764', - 'alias': 'script' - } - self.file_with_cached_state = 'cm-cached-state.json' self.tmp_file_env = 'tmp-env' @@ -345,7 +340,9 @@ def _run(self, i): 'dict2': i['local_' + key], 'append_lists': True, 'append_unique': True}) + #print(f"Merged local {key}: {i[key]}") + #print(f"env = {env}") add_deps = i.get('ad', {}) if not add_deps: add_deps = i.get('add_deps', {}) @@ -891,7 +888,10 @@ def _run(self, i): # Force env from meta['env'] as a CONST # (env OVERWRITE) script_artifact_env = meta.get('env', {}) + #print(f"script meta env= {script_artifact_env}") + env.update(script_artifact_env) + #print(f"env = {env}") script_artifact_state = meta.get('state', {}) utils.merge_dicts({'dict1': state, @@ -1337,9 +1337,12 @@ def _run(self, i): return r new_env = r['new_env'] + #print(f"env = {env}, new_env={new_env}") utils.merge_dicts( {'dict1': env, 'dict2': new_env, 'append_lists': True, 'append_unique': True}) + #print(f"merged_env:") + #utils.print_env(env) new_state = cached_state['new_state'] utils.merge_dicts({'dict1': state, 'dict2': new_state, @@ -1675,6 +1678,8 @@ def _run(self, i): return r # Check chain of dependencies on other CM scripts + #print(f"before deps: ") + #utils.print_env(env) if len(deps) > 0: logging.debug(recursion_spaces + ' - Checking dependencies on other CM scripts:') @@ -1692,6 +1697,8 @@ def _run(self, i): if r['return'] > 0: return r + #print(f"after deps:") + #utils.print_env(env) # Clean some output files clean_tmp_files(clean_files, recursion_spaces) @@ -1806,6 +1813,8 @@ def _run(self, i): if 'preprocess' in dir(customize_code) and not fake_run: logging.debug(recursion_spaces + ' - Running preprocess ...') + #print(f"preprocess_env:") + #utils.print_env(env) run_script_input['run_state'] = run_state @@ -1969,6 +1978,8 @@ def _run(self, i): new_state_keys = i['force_new_state_keys'] else: new_state_keys = new_state_keys_from_meta + #print("Env:") + #utils.print_env(env) r = detect_state_diff( env, @@ -3214,7 +3225,10 @@ def add(self, i): 'error': 'file {} not found'.format(script_name)} # Move tags from input to meta of the newly created script artifact - tags_list = utils.convert_tags_to_list(i) + res = utils.convert_tags_to_list(i['tags']) + if res['return'] > 0: + return res + tags_list = res['tags'] if 'tags' in i: del (i['tags']) @@ -3706,6 +3720,7 @@ def _run_deps(self, deps, clean_env_keys_deps, env, state, const, const_state, a # Not very efficient but allows logging - can be optimized # later + #print(f"env about to call deps {d}= {env}") ii = { 'action': 'run', 'automation': utils.assemble_cm_object(self.meta['alias'], self.meta['uid']), @@ -3730,11 +3745,10 @@ def _run_deps(self, deps, clean_env_keys_deps, env, state, const, const_state, a if d.get(key): d[key] = {} + #print(f"ii = {ii}, d = {d}") utils.merge_dicts( {'dict1': ii, 'dict2': d, 'append_lists': True, 'append_unique': True}) - # print(f"d = {d}") - # print(f" ii = {ii}") r = self.cmind.access(ii) if r['return'] > 0: return r @@ -3766,12 +3780,18 @@ def _merge_dicts_with_tags(self, dict1, dict2): return {'return': 0} for dep in dict1: if 'tags' in dict1[dep]: - dict1[dep]['tags_list'] = utils.convert_tags_to_list( - dict1[dep]) + res = utils.convert_tags_to_list( + dict1[dep]['tags']) + if res['return'] > 0: + return res + dict1[dep]['tags_list'] = res['tags'] for dep in dict2: if 'tags' in dict2[dep]: - dict2[dep]['tags_list'] = utils.convert_tags_to_list( - dict2[dep]) + res = utils.convert_tags_to_list( + dict2[dep]['tags']) + if res['return'] > 0: + return res + dict2[dep]['tags_list'] = res['tags'] utils.merge_dicts({'dict1': dict1, 'dict2': dict2, 'append_lists': True, 'append_unique': True}) for dep in dict1: From d27b8f4aad3888f794c63cc5ab56723e93475e58 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Fri, 17 Jan 2025 19:31:48 +0530 Subject: [PATCH 12/84] MLC compatibility improved in script automation --- automation/script/module.py | 101 +++++++++++------- .../customize.py | 2 +- script/detect-cpu/customize.py | 2 +- script/download-file/customize.py | 2 +- script/dump-pip-freeze/customize.py | 2 +- script/get-android-sdk/customize.py | 2 +- .../customize.py | 2 +- script/get-ipol-src/customize.py | 2 +- .../get-ml-model-3d-unet-kits19/customize.py | 2 +- .../customize.py | 2 +- .../get-ml-model-huggingface-zoo/customize.py | 2 +- script/get-ml-model-mobilenet/customize.py | 2 +- .../get-ml-model-neuralmagic-zoo/customize.py | 2 +- script/get-ml-model-rnnt/customize.py | 2 +- .../customize.py | 2 +- script/get-sys-utils-cm/customize.py | 2 +- script/get-sys-utils-min/customize.py | 2 +- script/install-cmake-prebuilt/customize.py | 2 +- script/install-llvm-prebuilt/customize.py | 2 +- 19 files changed, 78 insertions(+), 59 deletions(-) diff --git a/automation/script/module.py b/automation/script/module.py index f563352a7..7f1ba0e17 100644 --- a/automation/script/module.py +++ b/automation/script/module.py @@ -26,10 +26,10 @@ class ScriptAutomation(Automation): """ ############################################################ - def __init__(self, cmind, automation_file): + def __init__(self, action_object, automation_file): # super().__init__(cmind, __file__) - super().__init__(cmind, "script", automation_file) - print("Base init over") + super().__init__(action_object, "script", automation_file) + # print("Base init over") logging.basicConfig(level=logging.INFO) self.os_info = {} self.run_state = {} @@ -261,6 +261,7 @@ def _run(self, i): return { 'return': 1, 'error': 'Current directory "{}" is not writable - please change it'.format(os.getcwd())} + ''' # Check if has default config r = self.action_object.access({'action': 'load', 'automation': 'cfg,88dce9c160324c5d', @@ -272,7 +273,7 @@ def _run(self, i): if len(script_input) > 0: utils.merge_dicts({'dict1': i, 'dict2': script_input}) - + ''' recursion_int = int(i.get('recursion_int', 0)) + 1 start_time = time.time() @@ -534,10 +535,14 @@ def _run(self, i): tags_string = i.get('tags', '').strip() - ii = utils.sub_input(i, self.action_object.cfg['artifact_keys']) + #ii = utils.sub_input(i, self.action_object.cfg['artifact_keys']) + ii = {} ii['tags'] = tags_string ii['out'] = None + for key in ["automation", "parsed_automation", "artifact", "parsed_artifact"]: + if i.get(key): + ii[key] = i[key] # if cm run script without tags/artifact and with --help if len(ii.get('parsed_artifact', [])) == 0 and ii.get( @@ -713,7 +718,7 @@ def _run(self, i): search_cache = {'action': 'find', 'automation': self.meta['deps']['cache'], 'tags': cache_tags_without_tmp_string} - rc = self.cmind.access(search_cache) + rc = self.action_object.access(search_cache) if rc['return'] > 0: return rc @@ -798,20 +803,21 @@ def _run(self, i): # Set some useful local variables script_artifact = list_of_found_scripts[select_script] + # print(list_of_found_scripts) meta = script_artifact.meta # print(meta) path = script_artifact.path # Check min CM version requirement - min_cm_version = meta.get('min_cm_version', '').strip() - if min_cm_version != '': + min_mlc_version = meta.get('min_mlc_version', '').strip() + if min_mlc_version != '': # Check compare version while avoiding craches for older version if 'compare_versions' in dir(utils): comparison = utils.compare_versions( - current_cm_version, min_cm_version) + current_mlc_version, min_mlc_version) if comparison < 0: - return {'return': 1, 'error': 'CM script requires CM version >= {} while current CM version is {} - please update using "pip install cmind -U"'.format( - min_cm_version, current_cm_version)} + return {'return': 1, 'error': 'This script requires MLC version >= {} while current MLC version is {} - please update using "pip install mlcflow -U"'.format( + min_mlc_version, current_mlc_version)} # Check path to repo script_repo_path = script_artifact.repo_path @@ -829,6 +835,8 @@ def _run(self, i): return utils.call_internal_module(self, __file__, 'module_help', 'print_help', { 'meta': meta, 'path': path}) + if not meta['alias']: + print(meta) run_state['script_id'] = meta['alias'] + "," + meta['uid'] run_state['script_tags'] = script_tags run_state['script_variation_tags'] = variation_tags @@ -859,7 +867,7 @@ def _run(self, i): new_env_keys_from_meta = meta.get('new_env_keys', []) new_state_keys_from_meta = meta.get('new_state_keys', []) - found_script_artifact = utils.assemble_cm_object( + found_script_artifact = utils.assemble_object( meta['alias'], meta['uid']) found_script_tags = meta.get('tags', []) @@ -1431,11 +1439,13 @@ def _run(self, i): ii = {'action': 'update', 'automation': self.meta['deps']['cache'], 'search_tags': tmp_tags, + 'script_alias': meta['alias'], 'tags': ','.join(tmp_tags), 'meta': cached_meta, 'force': True} - r = self.cmind.access(ii) + r = self.action_object.access(ii) + print(f"r ={r}") if r['return'] > 0: return r @@ -1507,7 +1517,7 @@ def _run(self, i): version = default_version if version_min != '': - ry = self.cmind.access({'action': 'compare_versions', + ry = self.action_object.access({'action': 'compare_versions', 'automation': 'utils,dc2743f8450541e3', 'version1': version, 'version2': version_min}) @@ -1518,7 +1528,7 @@ def _run(self, i): version = version_min if version_max != '': - ry = self.cmind.access({'action': 'compare_versions', + ry = self.action_object.access({'action': 'compare_versions', 'automation': 'utils,dc2743f8450541e3', 'version1': version, 'version2': version_max}) @@ -1850,7 +1860,7 @@ def _run(self, i): ii = { 'action': 'run', - 'automation': utils.assemble_cm_object(self.meta['alias'], self.meta['uid']), + 'automation': utils.assemble_object(self.meta['alias'], self.meta['uid']), 'recursion_spaces': recursion_spaces + extra_recursion_spaces, 'recursion': True, 'remembered_selections': remembered_selections, @@ -1868,7 +1878,7 @@ def _run(self, i): os.chdir(current_path) ########################################################### - return self.cmind.access(ii) + return self.action_object.access(ii) # If return version if cache: @@ -2079,12 +2089,14 @@ def _run(self, i): ii = {'action': 'update', 'automation': self.meta['deps']['cache'], - 'artifact': cached_uid, + 'uid': cached_uid, 'meta': cached_meta, + 'script_alias': meta['alias'], 'replace_lists': True, # To replace tags 'tags': ','.join(cached_tags)} - r = self.cmind.access(ii) + print(f"cached_tags = {cached_tags}") + r = self.action_object.access(ii) if r['return'] > 0: return r @@ -3081,7 +3093,7 @@ def test(self, i): import copy ii['env'] = copy.deepcopy(i_env) logging.info(ii) - r = self.cmind.access(ii) + r = self.action_object.access(ii) if r['return'] > 0: return r @@ -3207,7 +3219,14 @@ def add(self, i): console = i.get('out') == 'con' # Try to find script artifact by alias and/or tags - ii = utils.sub_input(i, self.cmind.cfg['artifact_keys']) + #ii = utils.sub_input(i, self.cmind.cfg['artifact_keys']) + ii = {} + ii['tags'] = tags_string + ii['out'] = None + + for key in ["automation", "parsed_automation", "artifact", "parsed_artifact"]: + if i.get(key): + ii[key] = i[key] parsed_artifact = i.get('parsed_artifact', []) @@ -3287,7 +3306,7 @@ def add(self, i): # 'input_description':{} } - fmeta = os.path.join(template_path, self.cmind.cfg['file_cmeta']) + fmeta = os.path.join(template_path, self.action_object.cfg['file_cmeta']) r = utils.load_yaml_and_json(fmeta) if r['return'] == 0: @@ -3333,10 +3352,10 @@ def add(self, i): del ii[k] if artifact_repo is not None: - ii['artifact'] = utils.assemble_cm_object2( - artifact_repo) + ':' + utils.assemble_cm_object2(artifact_obj) + ii['artifact'] = utils.assemble_object2( + artifact_repo) + ':' + utils.assemble_object2(artifact_obj) - r_obj = self.cmind.access(ii) + r_obj = self.action_object.access(ii) if r_obj['return'] > 0: return r_obj @@ -3723,7 +3742,7 @@ def _run_deps(self, deps, clean_env_keys_deps, env, state, const, const_state, a #print(f"env about to call deps {d}= {env}") ii = { 'action': 'run', - 'automation': utils.assemble_cm_object(self.meta['alias'], self.meta['uid']), + 'automation': utils.assemble_object(self.meta['alias'], self.meta['uid']), 'recursion_spaces': recursion_spaces, # + extra_recursion_spaces, 'recursion': True, 'remembered_selections': remembered_selections, @@ -3749,7 +3768,7 @@ def _run_deps(self, deps, clean_env_keys_deps, env, state, const, const_state, a utils.merge_dicts( {'dict1': ii, 'dict2': d, 'append_lists': True, 'append_unique': True}) - r = self.cmind.access(ii) + r = self.action_object.access(ii) if r['return'] > 0: return r @@ -4178,7 +4197,7 @@ def find_file_in_paths(self, i): 'version': version, 'version_min': version_min, 'version_max': version_max, - 'cmind': self.cmind}) + 'action_object': self.action_object}) if ry['return'] > 0: return ry @@ -4301,7 +4320,7 @@ def detect_version_using_script(self, i): 'version': version, 'version_min': version_min, 'version_max': version_max, - 'cmind': self.cmind}) + 'action_object': self.action_object}) if ry['return'] > 0: return ry @@ -5036,7 +5055,7 @@ def find_cached_script(i): recursion_spaces + ' - Searching for cached script outputs with the following tags: {}'.format(search_tags)) - r = self_obj.cmind.access({'action': 'find', + r = self_obj.action_object.access({'action': 'find', 'automation': self_obj.meta['deps']['cache'], 'tags': search_tags}) if r['return'] > 0: @@ -5054,7 +5073,7 @@ def find_cached_script(i): 'version', '') skip_cached_script = check_versions( - self_obj.cmind, tmp_version_in_cached_script, version_min, version_max) + self_obj.action_object, tmp_version_in_cached_script, version_min, version_max) if skip_cached_script: return {'return': 2, 'error': 'The version of the previously remembered selection for a given script ({}) mismatches the newly requested one'.format( @@ -5152,7 +5171,7 @@ def find_cached_script(i): continue skip_cached_script = check_versions( - self_obj.cmind, cached_script_version, version_min, version_max) + self_obj.action_object, cached_script_version, version_min, version_max) if not skip_cached_script: new_found_cached_scripts.append(cached_script) @@ -5320,7 +5339,7 @@ def check_version_constraints(i): version_min = i.get('version_min', '') version_max = i.get('version_max', '') - cmind = i['cmind'] + action_object = i['action_object'] skip = False @@ -5328,7 +5347,7 @@ def check_version_constraints(i): skip = True if not skip and detected_version != '' and version_min != '': - ry = cmind.access({'action': 'compare_versions', + ry = action_object.access({'action': 'compare_versions', 'automation': 'utils,dc2743f8450541e3', 'version1': detected_version, 'version2': version_min}) @@ -5339,7 +5358,7 @@ def check_version_constraints(i): skip = True if not skip and detected_version != '' and version_max != '': - ry = cmind.access({'action': 'compare_versions', + ry = action_object.access({'action': 'compare_versions', 'automation': 'utils,dc2743f8450541e3', 'version1': detected_version, 'version2': version_max}) @@ -6359,7 +6378,7 @@ def select_script_artifact(lst, text, recursion_spaces, ############################################################################## -def check_versions(cmind, cached_script_version, version_min, version_max): +def check_versions(action_object, cached_script_version, version_min, version_max): """ Internal: check versions of the cached script """ @@ -6367,7 +6386,7 @@ def check_versions(cmind, cached_script_version, version_min, version_max): if cached_script_version != '': if version_min != '': - ry = cmind.access({'action': 'compare_versions', + ry = action_object.access({'action': 'compare_versions', 'automation': 'utils,dc2743f8450541e3', 'version1': cached_script_version, 'version2': version_min}) @@ -6378,7 +6397,7 @@ def check_versions(cmind, cached_script_version, version_min, version_max): skip_cached_script = True if not skip_cached_script and version_max != '': - ry = cmind.access({'action': 'compare_versions', + ry = action_object.access({'action': 'compare_versions', 'automation': 'utils,dc2743f8450541e3', 'version1': cached_script_version, 'version2': version_max}) @@ -6576,10 +6595,10 @@ def dump_repro(repro_prefix, rr, run_state): ############################################################################## -# Demo to show how to use CM components independently if needed +# Demo to show how to use ScriptAutomation independently if needed if __name__ == "__main__": - import cmind - auto = CAutomation(cmind, __file__) + import mlc + auto = ScriptAutomation(Action, __file__) r = auto.test({'x': 'y'}) diff --git a/script/convert-ml-model-huggingface-to-onnx/customize.py b/script/convert-ml-model-huggingface-to-onnx/customize.py index 6ef39f0f8..741226f54 100644 --- a/script/convert-ml-model-huggingface-to-onnx/customize.py +++ b/script/convert-ml-model-huggingface-to-onnx/customize.py @@ -13,7 +13,7 @@ def preprocess(i): automation = i['automation'] - cm = automation.cmind + cm = automation.action_object path = os.getcwd() diff --git a/script/detect-cpu/customize.py b/script/detect-cpu/customize.py index 2d5dfeeef..852b48a94 100644 --- a/script/detect-cpu/customize.py +++ b/script/detect-cpu/customize.py @@ -21,7 +21,7 @@ def postprocess(i): os_info = i['os_info'] automation = i['automation'] - logger = automation.cmind.logger + logger = automation.action_object.logger if os_info['platform'] == 'windows': sys = [] diff --git a/script/download-file/customize.py b/script/download-file/customize.py index 6142c48a9..23514247b 100644 --- a/script/download-file/customize.py +++ b/script/download-file/customize.py @@ -167,7 +167,7 @@ def preprocess(i): cmutil_require_download = 1 if cmutil_require_download == 1: - cm = automation.cmind + cm = automation.action_object for i in range(1, 5): r = cm.access({'action': 'download_file', 'automation': 'utils,dc2743f8450541e3', diff --git a/script/dump-pip-freeze/customize.py b/script/dump-pip-freeze/customize.py index e9e6ce6b7..d4d30e7e1 100644 --- a/script/dump-pip-freeze/customize.py +++ b/script/dump-pip-freeze/customize.py @@ -36,7 +36,7 @@ def postprocess(i): # If was not created, sometimes issues on Windows # There is another workaround if os_info['platform'] == 'windows': - r = automation.cmind.access({'action': 'system', + r = automation.action_object.access({'action': 'system', 'automation': 'utils', 'cmd': 'py -m pip freeze', 'stdout': pip_freeze_file}) diff --git a/script/get-android-sdk/customize.py b/script/get-android-sdk/customize.py index 85b190bb1..dee354526 100644 --- a/script/get-android-sdk/customize.py +++ b/script/get-android-sdk/customize.py @@ -78,7 +78,7 @@ def preprocess(i): print('') print('Downloading from {} ...'.format(package_url)) - cm = automation.cmind + cm = automation.action_object r = cm.access({'action': 'download_file', 'automation': 'utils,dc2743f8450541e3', diff --git a/script/get-dataset-cognata-mlcommons/customize.py b/script/get-dataset-cognata-mlcommons/customize.py index d4791c60a..46f3b87aa 100644 --- a/script/get-dataset-cognata-mlcommons/customize.py +++ b/script/get-dataset-cognata-mlcommons/customize.py @@ -56,7 +56,7 @@ def postprocess(i): env = i['env'] automation = i['automation'] - cm = automation.cmind + cm = automation.action_object cur_dir = os.getcwd() diff --git a/script/get-ipol-src/customize.py b/script/get-ipol-src/customize.py index 3fb3504f6..5bd5d15a9 100644 --- a/script/get-ipol-src/customize.py +++ b/script/get-ipol-src/customize.py @@ -12,7 +12,7 @@ def preprocess(i): automation = i['automation'] - cm = automation.cmind + cm = automation.action_object path = os.getcwd() diff --git a/script/get-ml-model-3d-unet-kits19/customize.py b/script/get-ml-model-3d-unet-kits19/customize.py index dc3d4c605..164f34865 100644 --- a/script/get-ml-model-3d-unet-kits19/customize.py +++ b/script/get-ml-model-3d-unet-kits19/customize.py @@ -10,7 +10,7 @@ def preprocess(i): automation = i['automation'] - cm = automation.cmind + cm = automation.action_object path = os.path.dirname(env['CM_ML_MODEL_FILE_WITH_PATH']) diff --git a/script/get-ml-model-efficientnet-lite/customize.py b/script/get-ml-model-efficientnet-lite/customize.py index c0d8dd73c..14f97cbd2 100644 --- a/script/get-ml-model-efficientnet-lite/customize.py +++ b/script/get-ml-model-efficientnet-lite/customize.py @@ -10,7 +10,7 @@ def preprocess(i): automation = i['automation'] - cm = automation.cmind + cm = automation.action_object path = os.getcwd() diff --git a/script/get-ml-model-huggingface-zoo/customize.py b/script/get-ml-model-huggingface-zoo/customize.py index cd0b5a5c0..8a4f3c34c 100644 --- a/script/get-ml-model-huggingface-zoo/customize.py +++ b/script/get-ml-model-huggingface-zoo/customize.py @@ -10,7 +10,7 @@ def preprocess(i): automation = i['automation'] - cm = automation.cmind + cm = automation.action_object script_path = i['run_script_input']['path'] diff --git a/script/get-ml-model-mobilenet/customize.py b/script/get-ml-model-mobilenet/customize.py index c0d8dd73c..14f97cbd2 100644 --- a/script/get-ml-model-mobilenet/customize.py +++ b/script/get-ml-model-mobilenet/customize.py @@ -10,7 +10,7 @@ def preprocess(i): automation = i['automation'] - cm = automation.cmind + cm = automation.action_object path = os.getcwd() diff --git a/script/get-ml-model-neuralmagic-zoo/customize.py b/script/get-ml-model-neuralmagic-zoo/customize.py index 797932c14..417bc036f 100644 --- a/script/get-ml-model-neuralmagic-zoo/customize.py +++ b/script/get-ml-model-neuralmagic-zoo/customize.py @@ -10,7 +10,7 @@ def preprocess(i): automation = i['automation'] - cm = automation.cmind + cm = automation.action_object path = os.getcwd() diff --git a/script/get-ml-model-rnnt/customize.py b/script/get-ml-model-rnnt/customize.py index f41646dba..31f44f416 100644 --- a/script/get-ml-model-rnnt/customize.py +++ b/script/get-ml-model-rnnt/customize.py @@ -10,7 +10,7 @@ def preprocess(i): automation = i['automation'] - cm = automation.cmind + cm = automation.action_object path = os.getcwd() diff --git a/script/get-ml-model-using-imagenet-from-model-zoo/customize.py b/script/get-ml-model-using-imagenet-from-model-zoo/customize.py index 884be0170..a7caca650 100644 --- a/script/get-ml-model-using-imagenet-from-model-zoo/customize.py +++ b/script/get-ml-model-using-imagenet-from-model-zoo/customize.py @@ -10,7 +10,7 @@ def preprocess(i): automation = i['automation'] - cm = automation.cmind + cm = automation.action_object return {'return': 0} diff --git a/script/get-sys-utils-cm/customize.py b/script/get-sys-utils-cm/customize.py index 994f9f46b..2484b5564 100644 --- a/script/get-sys-utils-cm/customize.py +++ b/script/get-sys-utils-cm/customize.py @@ -9,7 +9,7 @@ def preprocess(i): env = i['env'] automation = i['automation'] - cm = automation.cmind + cm = automation.action_object if env.get('CM_HOST_OS_FLAVOR', '') == 'amzn': env['CM_PACKAGE_TOOL'] = "yum" diff --git a/script/get-sys-utils-min/customize.py b/script/get-sys-utils-min/customize.py index 6efb11fa0..c4a2ee1d2 100644 --- a/script/get-sys-utils-min/customize.py +++ b/script/get-sys-utils-min/customize.py @@ -9,7 +9,7 @@ def preprocess(i): env = i['env'] automation = i['automation'] - cm = automation.cmind + cm = automation.action_object # If windows, download here otherwise use run.sh if os_info['platform'] == 'windows': diff --git a/script/install-cmake-prebuilt/customize.py b/script/install-cmake-prebuilt/customize.py index 2f5c4c4f1..598dda208 100644 --- a/script/install-cmake-prebuilt/customize.py +++ b/script/install-cmake-prebuilt/customize.py @@ -70,7 +70,7 @@ def preprocess(i): print('') print('Downloading from {} ...'.format(package_url)) - cm = automation.cmind + cm = automation.action_object r = cm.access({'action': 'download_file', 'automation': 'utils,dc2743f8450541e3', diff --git a/script/install-llvm-prebuilt/customize.py b/script/install-llvm-prebuilt/customize.py index 23c116ee9..9f16c1ac5 100644 --- a/script/install-llvm-prebuilt/customize.py +++ b/script/install-llvm-prebuilt/customize.py @@ -169,7 +169,7 @@ def preprocess(i): print('') print('Downloading from {} ...'.format(package_url)) - cm = automation.cmind + cm = automation.action_object r = cm.access({'action': 'download_file', 'automation': 'utils,dc2743f8450541e3', From 01a432084fd689cd8b52ab1ba9ff791d23273b03 Mon Sep 17 00:00:00 2001 From: arjunsuresh Date: Fri, 17 Jan 2025 14:02:10 +0000 Subject: [PATCH 13/84] [Automated Commit] Format Codebase --- automation/script/module.py | 91 +++++++++++++++-------------- script/dump-pip-freeze/customize.py | 6 +- 2 files changed, 51 insertions(+), 46 deletions(-) diff --git a/automation/script/module.py b/automation/script/module.py index 7f1ba0e17..18bb7dbc4 100644 --- a/automation/script/module.py +++ b/automation/script/module.py @@ -341,9 +341,9 @@ def _run(self, i): 'dict2': i['local_' + key], 'append_lists': True, 'append_unique': True}) - #print(f"Merged local {key}: {i[key]}") + # print(f"Merged local {key}: {i[key]}") - #print(f"env = {env}") + # print(f"env = {env}") add_deps = i.get('ad', {}) if not add_deps: add_deps = i.get('add_deps', {}) @@ -535,12 +535,13 @@ def _run(self, i): tags_string = i.get('tags', '').strip() - #ii = utils.sub_input(i, self.action_object.cfg['artifact_keys']) + # ii = utils.sub_input(i, self.action_object.cfg['artifact_keys']) ii = {} ii['tags'] = tags_string ii['out'] = None - for key in ["automation", "parsed_automation", "artifact", "parsed_artifact"]: + for key in ["automation", "parsed_automation", + "artifact", "parsed_artifact"]: if i.get(key): ii[key] = i[key] @@ -896,10 +897,10 @@ def _run(self, i): # Force env from meta['env'] as a CONST # (env OVERWRITE) script_artifact_env = meta.get('env', {}) - #print(f"script meta env= {script_artifact_env}") + # print(f"script meta env= {script_artifact_env}") env.update(script_artifact_env) - #print(f"env = {env}") + # print(f"env = {env}") script_artifact_state = meta.get('state', {}) utils.merge_dicts({'dict1': state, @@ -1345,12 +1346,12 @@ def _run(self, i): return r new_env = r['new_env'] - #print(f"env = {env}, new_env={new_env}") + # print(f"env = {env}, new_env={new_env}") utils.merge_dicts( {'dict1': env, 'dict2': new_env, 'append_lists': True, 'append_unique': True}) - #print(f"merged_env:") - #utils.print_env(env) + # print(f"merged_env:") + # utils.print_env(env) new_state = cached_state['new_state'] utils.merge_dicts({'dict1': state, 'dict2': new_state, @@ -1518,9 +1519,9 @@ def _run(self, i): if version_min != '': ry = self.action_object.access({'action': 'compare_versions', - 'automation': 'utils,dc2743f8450541e3', - 'version1': version, - 'version2': version_min}) + 'automation': 'utils,dc2743f8450541e3', + 'version1': version, + 'version2': version_min}) if ry['return'] > 0: return ry @@ -1529,9 +1530,9 @@ def _run(self, i): if version_max != '': ry = self.action_object.access({'action': 'compare_versions', - 'automation': 'utils,dc2743f8450541e3', - 'version1': version, - 'version2': version_max}) + 'automation': 'utils,dc2743f8450541e3', + 'version1': version, + 'version2': version_max}) if ry['return'] > 0: return ry @@ -1688,8 +1689,8 @@ def _run(self, i): return r # Check chain of dependencies on other CM scripts - #print(f"before deps: ") - #utils.print_env(env) + # print(f"before deps: ") + # utils.print_env(env) if len(deps) > 0: logging.debug(recursion_spaces + ' - Checking dependencies on other CM scripts:') @@ -1707,8 +1708,8 @@ def _run(self, i): if r['return'] > 0: return r - #print(f"after deps:") - #utils.print_env(env) + # print(f"after deps:") + # utils.print_env(env) # Clean some output files clean_tmp_files(clean_files, recursion_spaces) @@ -1823,8 +1824,8 @@ def _run(self, i): if 'preprocess' in dir(customize_code) and not fake_run: logging.debug(recursion_spaces + ' - Running preprocess ...') - #print(f"preprocess_env:") - #utils.print_env(env) + # print(f"preprocess_env:") + # utils.print_env(env) run_script_input['run_state'] = run_state @@ -1988,8 +1989,8 @@ def _run(self, i): new_state_keys = i['force_new_state_keys'] else: new_state_keys = new_state_keys_from_meta - #print("Env:") - #utils.print_env(env) + # print("Env:") + # utils.print_env(env) r = detect_state_diff( env, @@ -3219,12 +3220,13 @@ def add(self, i): console = i.get('out') == 'con' # Try to find script artifact by alias and/or tags - #ii = utils.sub_input(i, self.cmind.cfg['artifact_keys']) + # ii = utils.sub_input(i, self.cmind.cfg['artifact_keys']) ii = {} ii['tags'] = tags_string ii['out'] = None - for key in ["automation", "parsed_automation", "artifact", "parsed_artifact"]: + for key in ["automation", "parsed_automation", + "artifact", "parsed_artifact"]: if i.get(key): ii[key] = i[key] @@ -3306,7 +3308,9 @@ def add(self, i): # 'input_description':{} } - fmeta = os.path.join(template_path, self.action_object.cfg['file_cmeta']) + fmeta = os.path.join( + template_path, + self.action_object.cfg['file_cmeta']) r = utils.load_yaml_and_json(fmeta) if r['return'] == 0: @@ -3739,7 +3743,7 @@ def _run_deps(self, deps, clean_env_keys_deps, env, state, const, const_state, a # Not very efficient but allows logging - can be optimized # later - #print(f"env about to call deps {d}= {env}") + # print(f"env about to call deps {d}= {env}") ii = { 'action': 'run', 'automation': utils.assemble_object(self.meta['alias'], self.meta['uid']), @@ -3764,7 +3768,7 @@ def _run_deps(self, deps, clean_env_keys_deps, env, state, const, const_state, a if d.get(key): d[key] = {} - #print(f"ii = {ii}, d = {d}") + # print(f"ii = {ii}, d = {d}") utils.merge_dicts( {'dict1': ii, 'dict2': d, 'append_lists': True, 'append_unique': True}) @@ -5056,8 +5060,8 @@ def find_cached_script(i): ' - Searching for cached script outputs with the following tags: {}'.format(search_tags)) r = self_obj.action_object.access({'action': 'find', - 'automation': self_obj.meta['deps']['cache'], - 'tags': search_tags}) + 'automation': self_obj.meta['deps']['cache'], + 'tags': search_tags}) if r['return'] > 0: return r @@ -5348,9 +5352,9 @@ def check_version_constraints(i): if not skip and detected_version != '' and version_min != '': ry = action_object.access({'action': 'compare_versions', - 'automation': 'utils,dc2743f8450541e3', - 'version1': detected_version, - 'version2': version_min}) + 'automation': 'utils,dc2743f8450541e3', + 'version1': detected_version, + 'version2': version_min}) if ry['return'] > 0: return ry @@ -5359,9 +5363,9 @@ def check_version_constraints(i): if not skip and detected_version != '' and version_max != '': ry = action_object.access({'action': 'compare_versions', - 'automation': 'utils,dc2743f8450541e3', - 'version1': detected_version, - 'version2': version_max}) + 'automation': 'utils,dc2743f8450541e3', + 'version1': detected_version, + 'version2': version_max}) if ry['return'] > 0: return ry @@ -6378,7 +6382,8 @@ def select_script_artifact(lst, text, recursion_spaces, ############################################################################## -def check_versions(action_object, cached_script_version, version_min, version_max): +def check_versions(action_object, cached_script_version, + version_min, version_max): """ Internal: check versions of the cached script """ @@ -6387,9 +6392,9 @@ def check_versions(action_object, cached_script_version, version_min, version_ma if cached_script_version != '': if version_min != '': ry = action_object.access({'action': 'compare_versions', - 'automation': 'utils,dc2743f8450541e3', - 'version1': cached_script_version, - 'version2': version_min}) + 'automation': 'utils,dc2743f8450541e3', + 'version1': cached_script_version, + 'version2': version_min}) if ry['return'] > 0: return ry @@ -6398,9 +6403,9 @@ def check_versions(action_object, cached_script_version, version_min, version_ma if not skip_cached_script and version_max != '': ry = action_object.access({'action': 'compare_versions', - 'automation': 'utils,dc2743f8450541e3', - 'version1': cached_script_version, - 'version2': version_max}) + 'automation': 'utils,dc2743f8450541e3', + 'version1': cached_script_version, + 'version2': version_max}) if ry['return'] > 0: return ry diff --git a/script/dump-pip-freeze/customize.py b/script/dump-pip-freeze/customize.py index d4d30e7e1..9c5ac3ea9 100644 --- a/script/dump-pip-freeze/customize.py +++ b/script/dump-pip-freeze/customize.py @@ -37,9 +37,9 @@ def postprocess(i): # There is another workaround if os_info['platform'] == 'windows': r = automation.action_object.access({'action': 'system', - 'automation': 'utils', - 'cmd': 'py -m pip freeze', - 'stdout': pip_freeze_file}) + 'automation': 'utils', + 'cmd': 'py -m pip freeze', + 'stdout': pip_freeze_file}) # skip output if os.path.isfile(pip_freeze_file): From 1dc2a41ca04c9ef7be69df5d6edd605653de595b Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Fri, 17 Jan 2025 19:52:49 +0530 Subject: [PATCH 14/84] Fix llvm install for mlc --- script/install-llvm-prebuilt/customize.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/script/install-llvm-prebuilt/customize.py b/script/install-llvm-prebuilt/customize.py index 9f16c1ac5..ed9cfc1e8 100644 --- a/script/install-llvm-prebuilt/customize.py +++ b/script/install-llvm-prebuilt/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from utils import * import os @@ -171,9 +171,12 @@ def preprocess(i): cm = automation.action_object + r = download_file({'url':package_url}) + ''' r = cm.access({'action': 'download_file', 'automation': 'utils,dc2743f8450541e3', 'url': package_url}) + ''' if r['return'] > 0: return r From 5cdd57534eaabbbacf147538c2a60719838525e2 Mon Sep 17 00:00:00 2001 From: arjunsuresh Date: Fri, 17 Jan 2025 14:23:16 +0000 Subject: [PATCH 15/84] [Automated Commit] Format Codebase --- script/install-llvm-prebuilt/customize.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/install-llvm-prebuilt/customize.py b/script/install-llvm-prebuilt/customize.py index ed9cfc1e8..058714522 100644 --- a/script/install-llvm-prebuilt/customize.py +++ b/script/install-llvm-prebuilt/customize.py @@ -171,7 +171,7 @@ def preprocess(i): cm = automation.action_object - r = download_file({'url':package_url}) + r = download_file({'url': package_url}) ''' r = cm.access({'action': 'download_file', 'automation': 'utils,dc2743f8450541e3', From aa52140a9dfa09557b9efdf80778c1d28081020e Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Sat, 18 Jan 2025 02:17:16 +0530 Subject: [PATCH 16/84] Cleaned up unused files, improved mlc support --- automation/script/module.py | 9 +- script/run-mlperf-inference-app/_cm.yaml | 2 - script/run-mlperf-inference-app/customize.py | 8 +- .../modular-cm-containers/README.md | 30 ----- .../modular-cm-containers/_common.bat | 7 -- .../modular-cm-containers/_common.sh | 10 -- .../modular-cm-containers/build.bat | 25 ---- .../modular-cm-containers/build.sh | 27 ---- .../mlperf-inference--ubuntu-cpu.Dockerfile | 118 ------------------ .../modular-cm-containers/run.bat | 3 - .../modular-cm-containers/run.sh | 3 - 11 files changed, 8 insertions(+), 234 deletions(-) delete mode 100644 script/run-mlperf-inference-app/modular-cm-containers/README.md delete mode 100644 script/run-mlperf-inference-app/modular-cm-containers/_common.bat delete mode 100644 script/run-mlperf-inference-app/modular-cm-containers/_common.sh delete mode 100644 script/run-mlperf-inference-app/modular-cm-containers/build.bat delete mode 100644 script/run-mlperf-inference-app/modular-cm-containers/build.sh delete mode 100644 script/run-mlperf-inference-app/modular-cm-containers/mlperf-inference--ubuntu-cpu.Dockerfile delete mode 100644 script/run-mlperf-inference-app/modular-cm-containers/run.bat delete mode 100644 script/run-mlperf-inference-app/modular-cm-containers/run.sh diff --git a/automation/script/module.py b/automation/script/module.py index 18bb7dbc4..088f20e4b 100644 --- a/automation/script/module.py +++ b/automation/script/module.py @@ -12,7 +12,6 @@ import logging from mlc.main import Automation -# from mlc.utils import * import mlc.utils as utils from mlc.main import __version__ as current_mlc_version from utils import * @@ -836,8 +835,6 @@ def _run(self, i): return utils.call_internal_module(self, __file__, 'module_help', 'print_help', { 'meta': meta, 'path': path}) - if not meta['alias']: - print(meta) run_state['script_id'] = meta['alias'] + "," + meta['uid'] run_state['script_tags'] = script_tags run_state['script_variation_tags'] = variation_tags @@ -1446,7 +1443,6 @@ def _run(self, i): 'force': True} r = self.action_object.access(ii) - print(f"r ={r}") if r['return'] > 0: return r @@ -2096,7 +2092,6 @@ def _run(self, i): 'replace_lists': True, # To replace tags 'tags': ','.join(cached_tags)} - print(f"cached_tags = {cached_tags}") r = self.action_object.access(ii) if r['return'] > 0: return r @@ -2320,11 +2315,14 @@ def _update_env_from_input(self, env, i): ########################################################################## def _fix_cache_paths(self, env): + ''' cm_repos_path = os.environ.get( 'CM_REPOS', os.path.join( os.path.expanduser("~"), "CM", "repos")) current_cache_path = os.path.realpath( os.path.join(cm_repos_path, "local", "cache")) + ''' + current_cache_path = self.action_object.local_cache_path new_env = env # just a reference @@ -2871,6 +2869,7 @@ def search(self, i): i['out'] = None i['common'] = True + i['target_name'] = "script" r = super(ScriptAutomation, self).search(i) if r['return'] > 0: return r diff --git a/script/run-mlperf-inference-app/_cm.yaml b/script/run-mlperf-inference-app/_cm.yaml index 29effb5c2..a8f7b75b8 100644 --- a/script/run-mlperf-inference-app/_cm.yaml +++ b/script/run-mlperf-inference-app/_cm.yaml @@ -592,10 +592,8 @@ input_description: desc: Whether to run compliance tests (applicable only for closed division) dashboard_wb_project: desc: W&B dashboard project - default: cm-mlperf-dse-testing dashboard_wb_user: desc: W&B dashboard user - default: cmind hw_name: desc: MLPerf hardware name (for example "gcp.c3_standard_8", "nvidia_orin", "lenovo_p14s_gen_4_windows_11", "macbook_pro_m1_2", "thundercomm_rb6" ...) multistream_target_latency: diff --git a/script/run-mlperf-inference-app/customize.py b/script/run-mlperf-inference-app/customize.py index fc857c468..7160945fa 100644 --- a/script/run-mlperf-inference-app/customize.py +++ b/script/run-mlperf-inference-app/customize.py @@ -1,9 +1,9 @@ -from cmind import utils +from mlc import utils import os import json import shutil import subprocess -import cmind as cm +import mlc import copy import mlperf_utils @@ -275,7 +275,7 @@ def preprocess(i): for k in docker_extra_input: ii[k] = docker_extra_input[k] - r = cm.access(ii) + r = mlc.access(ii) if r['return'] > 0: return r @@ -308,7 +308,7 @@ def preprocess(i): if action == "docker": for k in docker_extra_input: ii[k] = docker_extra_input[k] - r = cm.access(ii) + r = mlc.access(ii) if r['return'] > 0: return r if state.get('docker', {}): diff --git a/script/run-mlperf-inference-app/modular-cm-containers/README.md b/script/run-mlperf-inference-app/modular-cm-containers/README.md deleted file mode 100644 index fdbe0e28a..000000000 --- a/script/run-mlperf-inference-app/modular-cm-containers/README.md +++ /dev/null @@ -1,30 +0,0 @@ -***Outdated*** - -# About - -Prototyping modular and customizable CM containers for MLPerf. - -# Build - -```bash -./build.sh -``` - -# Run - -```bash -./run.sh - -cm run script --tags=run,mlperf,inference,generate-run-cmds,_submission,_dashboard \ - --adr.python.version_min=3.8 \ - --submitter="modular-cm-mlperf-container" \ - --lang=python \ - --hw_name=default \ - --model=resnet50 \ - --backend=onnxruntime \ - --device=cpu \ - --scenario=Offline \ - --test_query_count=500 \ - --quiet \ - --clean -``` diff --git a/script/run-mlperf-inference-app/modular-cm-containers/_common.bat b/script/run-mlperf-inference-app/modular-cm-containers/_common.bat deleted file mode 100644 index 7f9d3aab3..000000000 --- a/script/run-mlperf-inference-app/modular-cm-containers/_common.bat +++ /dev/null @@ -1,7 +0,0 @@ -rem set CM_CACHE=--no-cache - -set CM_DOCKER_ORG=modularcm -set CM_DOCKER_NAME=mlperf-inference -set CM_OS_NAME=ubuntu -set CM_HW_TARGET=cpu -set CM_OS_VERSION=22.04 diff --git a/script/run-mlperf-inference-app/modular-cm-containers/_common.sh b/script/run-mlperf-inference-app/modular-cm-containers/_common.sh deleted file mode 100644 index 4d2f18aac..000000000 --- a/script/run-mlperf-inference-app/modular-cm-containers/_common.sh +++ /dev/null @@ -1,10 +0,0 @@ -#! /bin/bash - -#export CM_CACHE="--no-cache" - -export CM_DOCKER_ORG=modularcm -export CM_DOCKER_NAME="mlperf-inference" -export CM_OS_NAME="ubuntu" -export CM_HW_TARGET="cpu" -export CM_OS_VERSION="22.04" - diff --git a/script/run-mlperf-inference-app/modular-cm-containers/build.bat b/script/run-mlperf-inference-app/modular-cm-containers/build.bat deleted file mode 100644 index d7c097811..000000000 --- a/script/run-mlperf-inference-app/modular-cm-containers/build.bat +++ /dev/null @@ -1,25 +0,0 @@ -call _common.bat - -docker build -f %CM_DOCKER_NAME%--%CM_OS_NAME%-%CM_HW_TARGET%.Dockerfile ^ - -t %CM_DOCKER_ORG%/%CM_DOCKER_NAME%:%CM_OS_NAME%-%CM_OS_VERSION% ^ - --build-arg cm_os_name=%CM_OS_NAME% ^ - --build-arg cm_hw_target=%CM_HW_TARGET% ^ - --build-arg cm_os_version=%CM_OS_VERSION% ^ - --build-arg cm_version="" ^ - --build-arg cm_automation_repo="mlcommons@ck" ^ - --build-arg cm_automation_checkout="" ^ - --build-arg cm_python_version="3.10.8" ^ - --build-arg cm_mlperf_inference_loadgen_version="" ^ - --build-arg cm_mlperf_inference_src_tags="" ^ - --build-arg cm_mlperf_inference_src_version="" ^ - --build-arg CM_MLPERF_CHOICE_SCRIPT="" ^ - --build-arg CM_MLPERF_CHOICE_SUBMITTER="Container" ^ - --build-arg CM_MLPERF_CHOICE_IMPLEMENTATION="python" ^ - --build-arg CM_MLPERF_CHOICE_HW_NAME="default" ^ - --build-arg CM_MLPERF_CHOICE_MODEL="resnet50" ^ - --build-arg CM_MLPERF_CHOICE_BACKEND="onnxruntime" ^ - --build-arg CM_MLPERF_CHOICE_DEVICE=%CM_HW_TARGET% ^ - --build-arg CM_MLPERF_CHOICE_SCENARIO="Offline" ^ - --build-arg CM_MLPERF_CHOICE_MODE="accuracy" ^ - --build-arg CM_MLPERF_CHOICE_QUERY_COUNT="5" ^ - %CM_CACHE% . diff --git a/script/run-mlperf-inference-app/modular-cm-containers/build.sh b/script/run-mlperf-inference-app/modular-cm-containers/build.sh deleted file mode 100644 index 082f00d4b..000000000 --- a/script/run-mlperf-inference-app/modular-cm-containers/build.sh +++ /dev/null @@ -1,27 +0,0 @@ -#! /bin/bash - -. ./_common.sh - -time docker build -f ${CM_DOCKER_NAME}--${CM_OS_NAME}-${CM_HW_TARGET}.Dockerfile \ - -t ${CM_DOCKER_ORG}/${CM_DOCKER_NAME}:${CM_OS_NAME}-${CM_OS_VERSION} \ - --build-arg cm_os_name=${CM_OS_NAME} \ - --build-arg cm_hw_target=${CM_HW_TARGET} \ - --build-arg cm_os_version=${CM_OS_VERSION} \ - --build-arg cm_version="" \ - --build-arg cm_automation_repo="mlcommons@ck" \ - --build-arg cm_automation_checkout="" \ - --build-arg cm_python_version="3.10.8" \ - --build-arg cm_mlperf_inference_loadgen_version="" \ - --build-arg cm_mlperf_inference_src_tags="" \ - --build-arg cm_mlperf_inference_src_version="" \ - --build-arg CM_MLPERF_CHOICE_SCRIPT=",_short,_submission,_dashboard" \ - --build-arg CM_MLPERF_CHOICE_SUBMITTER="Container" \ - --build-arg CM_MLPERF_CHOICE_IMPLEMENTATION="python" \ - --build-arg CM_MLPERF_CHOICE_HW_NAME="default" \ - --build-arg CM_MLPERF_CHOICE_MODEL="resnet50" \ - --build-arg CM_MLPERF_CHOICE_BACKEND="onnxruntime" \ - --build-arg CM_MLPERF_CHOICE_DEVICE=${CM_HW_TARGET} \ - --build-arg CM_MLPERF_CHOICE_SCENARIO="Offline" \ - --build-arg CM_MLPERF_CHOICE_MODE="accuracy" \ - --build-arg CM_MLPERF_CHOICE_QUERY_COUNT="500" \ - ${CM_CACHE} . diff --git a/script/run-mlperf-inference-app/modular-cm-containers/mlperf-inference--ubuntu-cpu.Dockerfile b/script/run-mlperf-inference-app/modular-cm-containers/mlperf-inference--ubuntu-cpu.Dockerfile deleted file mode 100644 index 25f9d7777..000000000 --- a/script/run-mlperf-inference-app/modular-cm-containers/mlperf-inference--ubuntu-cpu.Dockerfile +++ /dev/null @@ -1,118 +0,0 @@ -# Modular MLPerf container with the MLCommons CM automation meta-framework - -# Preparing OS -ARG cm_os_name="ubuntu" -ARG cm_os_version="22.04" - -FROM ${cm_os_name}:${cm_os_version} - -# Maintained by the MLCommons taskforce on automation and reproducibility -LABEL github="https://github.com/mlcommons/ck" -LABEL maintainer="https://cKnowledge.org/mlcommons-taskforce" - -# Customization -ARG CM_GH_TOKEN - -# Prepare shell and entry point -SHELL ["/bin/bash", "-c"] -ENTRYPOINT ["/bin/bash", "-c"] - -# Install system dependencies -# Notes: https://runnable.com/blog/9-common-dockerfile-mistakes -RUN apt-get update -y -RUN apt-get install -y lsb-release -RUN apt-get install -y python3 python3-pip git wget sudo - -# Extra python deps -RUN python3 -m pip install requests - -# CM version -ARG cm_version="" -ENV CM_VERSION="${cm_version}" -RUN if [ "${CM_VERSION}" != "" ] ; then \ - python3 -m pip install cmind==${CM_VERSION} ; \ - else \ - python3 -m pip install cmind ; \ - fi - -# Setup docker environment -ENTRYPOINT ["/bin/bash", "-c"] -ENV TZ=US/Pacific -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ >/etc/timezone - -# Setup docker user -# See example in https://github.com/mlcommons/GaNDLF/blob/master/Dockerfile-CPU -RUN groupadd --gid 10001 cm -RUN useradd --uid 10000 -g cm --create-home --shell /bin/bash cmuser -RUN echo "cmuser ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers - -USER cmuser:cm -WORKDIR /home/cmuser - -# Check CM installation -RUN lsb_release -a > sys-version-os.log -RUN uname -a > sys-version-kernel.log -RUN python3 --version > sys-version-python3.log -RUN cm version > sys-version-cm.log - -################################################################################ -# Get CM automation repository -ARG cm_automation_repo="mlcommons@ck" -ARG cm_automation_repo_checkout="" -ENV CM_AUTOMATION_REPO=${cm_automation_repo} -ENV CM_AUTOMATION_REPO_CHECKOUT=${cm_automation_repo_checkout} -RUN echo ${CM_AUTOMATION_REPO} -RUN cm pull repo ${CM_AUTOMATION_REPO} --checkout=${CM_AUTOMATION_REPO_CHECKOUT} - -################################################################################ -# Install CM system dependencies -RUN cm run script "get sys-utils-cm" --quiet - -# Detect/install python -ARG cm_python_version="" -RUN cm run script "get python3" --version=${cm_python_version} - -################################################################################ -# Build MLPerf loadgen (official with correct seed for submission) -ARG cm_mlperf_inference_loadgen_version="" -RUN cm run script "get mlperf loadgen" --adr.compiler.tags=gcc --version=${cm_mlperf_inference_loadgen_version} --adr.inference-src-loadgen.version=${cm_mlperf_inference_loadgen_version} -v - -# Install MLPerf inference source (can be private development branch) -ARG cm_mlperf_inference_src_tags="" -ARG cm_mlperf_inference_src_version="" -RUN cm run script "get mlperf inference src ${cm_mlperf_inference_src_tags}" --version=${cm_mlperf_inference_src_version} -v - -################################################################################ -# Run CM automation workflow for MLPerf -# https://github.com/mlcommons/cm4mlops/tree/main/script/run-mlperf-inference-app - -ARG CM_MLPERF_CHOICE_SCRIPT= -ARG CM_MLPERF_CHOICE_SUBMITTER="Container" -ARG CM_MLPERF_CHOICE_IMPLEMENTATION="python" -ARG CM_MLPERF_CHOICE_HW_NAME="default" -ARG CM_MLPERF_CHOICE_MODEL="resnet50" -ARG CM_MLPERF_CHOICE_BACKEND="onnxruntime" -ARG CM_MLPERF_CHOICE_DEVICE="cpu" -ARG CM_MLPERF_CHOICE_SCENARIO="Offline" -ARG CM_MLPERF_CHOICE_MODE="performance" -ARG CM_MLPERF_CHOICE_QUERY_COUNT="10" - -RUN cm run script --tags=run,mlperf,inference,generate-run-cmds,${CM_MLPERF_CHOICE_SCRIPT} \ - --adr.compiler.tags=gcc \ - --adr.python.version_min=3.8 \ - --adr.compiler.tags=gcc \ - --submitter="${CM_MLPERF_CHOICE_SUBMITTER}" \ - --lang=${CM_MLPERF_CHOICE_IMPLEMENTATION} \ - --hw_name=${CM_MLPERF_CHOICE_HW_NAME} \ - --model=${CM_MLPERF_CHOICE_MODEL} \ - --backend=${CM_MLPERF_CHOICE_BACKEND} \ - --device=${CM_MLPERF_CHOICE_DEVICE} \ - --scenario=${CM_MLPERF_CHOICE_SCENARIO} \ - --mode=${CM_MLPERF_CHOICE_MODE} \ - --test_query_count=${CM_MLPERF_CHOICE_QUERY_COUNT} \ - --quiet \ - --clean - -################################################################################ -# CMD entry point -CMD /bin/bash diff --git a/script/run-mlperf-inference-app/modular-cm-containers/run.bat b/script/run-mlperf-inference-app/modular-cm-containers/run.bat deleted file mode 100644 index 53b13dcb9..000000000 --- a/script/run-mlperf-inference-app/modular-cm-containers/run.bat +++ /dev/null @@ -1,3 +0,0 @@ -call _common.bat - -docker run -it %CM_DOCKER_ORG%/%CM_DOCKER_NAME%:%CM_OS_NAME%-%CM_OS_VERSION% diff --git a/script/run-mlperf-inference-app/modular-cm-containers/run.sh b/script/run-mlperf-inference-app/modular-cm-containers/run.sh deleted file mode 100644 index 3473716c7..000000000 --- a/script/run-mlperf-inference-app/modular-cm-containers/run.sh +++ /dev/null @@ -1,3 +0,0 @@ -. ./_common.sh - -docker run -it ${CM_DOCKER_ORG}/${CM_DOCKER_NAME}:${CM_OS_NAME}-${CM_OS_VERSION} From 3b8781463401b2d64edd318ba56bbaaec7bb597d Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Sat, 18 Jan 2025 02:19:03 +0530 Subject: [PATCH 17/84] Fixed import for mlc utils in scripts --- script/activate-python-venv/customize.py | 2 +- script/add-custom-nvidia-system/customize.py | 2 +- script/app-image-classification-onnx-py/customize.py | 2 +- script/app-image-corner-detection/customize.py | 2 +- script/app-loadgen-generic-python/customize.py | 2 +- script/app-mlperf-automotive-mlcommons-python/customize.py | 2 +- script/app-mlperf-automotive/customize.py | 2 +- script/app-mlperf-inference-amd/customize.py | 2 +- script/app-mlperf-inference-ctuning-cpp-tflite/customize.py | 2 +- script/app-mlperf-inference-dummy/customize.py | 2 +- script/app-mlperf-inference-intel/customize.py | 2 +- script/app-mlperf-inference-mlcommons-cpp/customize.py | 2 +- script/app-mlperf-inference-mlcommons-python/customize.py | 2 +- script/app-mlperf-inference-nvidia/customize.py | 2 +- script/app-mlperf-inference-qualcomm/customize.py | 2 +- script/app-mlperf-inference-redhat/customize.py | 2 +- script/app-mlperf-inference/customize.py | 2 +- script/app-mlperf-training-nvidia/customize.py | 2 +- script/app-mlperf-training-reference/customize.py | 2 +- script/authenticate-github-cli/customize.py | 2 +- .../benchmark-any-mlperf-inference-implementation/customize.py | 2 +- script/benchmark-program-mlperf/customize.py | 2 +- script/benchmark-program/customize.py | 2 +- script/build-docker-image/customize.py | 2 +- script/build-dockerfile/customize.py | 2 +- script/build-mlperf-inference-server-nvidia/customize.py | 2 +- script/calibrate-model-for.qaic/customize.py | 2 +- script/clean-nvidia-mlperf-inference-scratch-space/customize.py | 2 +- script/compile-model-for.qaic/customize.py | 2 +- script/compile-program/customize.py | 2 +- script/convert-csv-to-md/customize.py | 2 +- script/convert-ml-model-huggingface-to-onnx/customize.py | 2 +- script/create-conda-env/customize.py | 2 +- script/create-custom-cache-entry/customize.py | 2 +- script/create-fpgaconvnet-app-tinyml/customize.py | 2 +- script/create-fpgaconvnet-config-tinyml/customize.py | 2 +- script/create-patch/customize.py | 2 +- script/destroy-terraform/customize.py | 2 +- script/detect-cpu/customize.py | 2 +- script/detect-os/customize.py | 2 +- script/detect-sudo/customize.py | 2 +- script/download-and-extract/customize.py | 2 +- script/download-file/customize.py | 2 +- script/download-torrent/customize.py | 2 +- script/draw-graph-from-json-data/customize.py | 2 +- script/dump-pip-freeze/customize.py | 2 +- script/extract-file/customize.py | 2 +- script/fail/customize.py | 2 +- script/flash-tinyml-binary/customize.py | 2 +- script/generate-mlperf-inference-submission/customize.py | 2 +- script/generate-mlperf-inference-user-conf/customize.py | 2 +- script/generate-mlperf-tiny-report/customize.py | 2 +- script/generate-mlperf-tiny-submission/customize.py | 2 +- script/generate-nvidia-engine/customize.py | 2 +- script/get-android-sdk/customize.py | 2 +- script/get-aocl/customize.py | 2 +- script/get-aria2/customize.py | 2 +- script/get-aws-cli/customize.py | 2 +- script/get-bazel/customize.py | 2 +- script/get-blis/customize.py | 2 +- script/get-cache-dir/customize.py | 2 +- script/get-cl/customize.py | 2 +- script/get-cmake/customize.py | 2 +- script/get-cmsis_5/customize.py | 2 +- script/get-compiler-flags/customize.py | 2 +- script/get-compiler-rust/customize.py | 2 +- script/get-conda/customize.py | 2 +- script/get-croissant/customize.py | 2 +- script/get-cuda-devices/customize.py | 2 +- script/get-cuda/customize.py | 2 +- script/get-cudnn/customize.py | 2 +- script/get-dataset-cifar10/customize.py | 2 +- script/get-dataset-cnndm/customize.py | 2 +- script/get-dataset-coco/customize.py | 2 +- script/get-dataset-coco2014/customize.py | 2 +- script/get-dataset-cognata-mlcommons/customize.py | 2 +- script/get-dataset-igbh/customize.py | 2 +- script/get-dataset-imagenet-helper/customize.py | 2 +- script/get-dataset-imagenet-train/customize.py | 2 +- script/get-dataset-imagenet-val/customize.py | 2 +- script/get-dataset-kits19/customize.py | 2 +- script/get-dataset-librispeech/customize.py | 2 +- script/get-dataset-mlperf-inference-llama3/customize.py | 2 +- script/get-dataset-mlperf-inference-mixtral/customize.py | 2 +- script/get-dataset-openimages-annotations/customize.py | 2 +- script/get-dataset-openimages-calibration/customize.py | 2 +- script/get-dataset-openimages/customize.py | 2 +- script/get-dataset-openorca/customize.py | 2 +- script/get-dataset-squad-vocab/customize.py | 2 +- script/get-dataset-squad/customize.py | 2 +- script/get-dlrm-data-mlperf-inference/customize.py | 2 +- script/get-dlrm/customize.py | 2 +- script/get-docker/customize.py | 2 +- script/get-gcc/customize.py | 2 +- script/get-generic-python-lib/customize.py | 2 +- script/get-generic-sys-util/customize.py | 2 +- script/get-gh-actions-runner/customize.py | 2 +- script/get-git-repo/customize.py | 2 +- script/get-github-cli/customize.py | 2 +- script/get-go/customize.py | 2 +- script/get-google-saxml/customize.py | 2 +- script/get-google-test/customize.py | 2 +- script/get-huggingface-cli/customize.py | 2 +- script/get-ipol-src/customize.py | 2 +- script/get-java/customize.py | 2 +- script/get-javac/customize.py | 2 +- script/get-lib-armnn/customize.py | 2 +- script/get-lib-dnnl/customize.py | 2 +- script/get-lib-protobuf/customize.py | 2 +- script/get-lib-qaic-api/customize.py | 2 +- script/get-llvm/customize.py | 2 +- script/get-microtvm/customize.py | 2 +- script/get-ml-model-3d-unet-kits19/customize.py | 2 +- script/get-ml-model-abtf-ssd-pytorch/customize.py | 2 +- script/get-ml-model-bert-large-squad/customize.py | 2 +- script/get-ml-model-efficientnet-lite/customize.py | 2 +- script/get-ml-model-gptj/customize.py | 2 +- script/get-ml-model-huggingface-zoo/customize.py | 2 +- script/get-ml-model-llama2/customize.py | 2 +- script/get-ml-model-llama3/customize.py | 2 +- script/get-ml-model-mixtral/customize.py | 2 +- script/get-ml-model-mobilenet/customize.py | 2 +- script/get-ml-model-neuralmagic-zoo/customize.py | 2 +- script/get-ml-model-resnet50/customize.py | 2 +- script/get-ml-model-retinanet-nvidia/customize.py | 2 +- script/get-ml-model-retinanet/customize.py | 2 +- script/get-ml-model-rgat/customize.py | 2 +- script/get-ml-model-rnnt/customize.py | 2 +- script/get-ml-model-stable-diffusion/customize.py | 2 +- script/get-ml-model-tiny-resnet/customize.py | 2 +- script/get-ml-model-using-imagenet-from-model-zoo/customize.py | 2 +- script/get-mlperf-automotive-scratch-space/customize.py | 2 +- script/get-mlperf-inference-intel-scratch-space/customize.py | 2 +- script/get-mlperf-inference-loadgen/customize.py | 2 +- script/get-mlperf-inference-nvidia-common-code/customize.py | 2 +- script/get-mlperf-inference-nvidia-scratch-space/customize.py | 2 +- script/get-mlperf-inference-results-dir/customize.py | 2 +- script/get-mlperf-inference-results/customize.py | 2 +- script/get-mlperf-inference-src/customize.py | 2 +- script/get-mlperf-inference-submission-dir/customize.py | 2 +- script/get-mlperf-inference-sut-configs/customize.py | 2 +- script/get-mlperf-inference-sut-description/customize.py | 2 +- script/get-mlperf-inference-utils/customize.py | 2 +- script/get-mlperf-logging/customize.py | 2 +- script/get-mlperf-power-dev/customize.py | 2 +- script/get-mlperf-tiny-eembc-energy-runner-src/customize.py | 2 +- script/get-mlperf-tiny-src/customize.py | 2 +- script/get-mlperf-training-nvidia-code/customize.py | 2 +- script/get-mlperf-training-src/customize.py | 2 +- script/get-nvidia-mitten/customize.py | 2 +- script/get-onnxruntime-prebuilt/customize.py | 2 +- script/get-openssl/customize.py | 2 +- script/get-platform-details/customize.py | 2 +- script/get-preprocessed-dataset-criteo/customize.py | 2 +- script/get-preprocessed-dataset-generic/customize.py | 2 +- script/get-preprocessed-dataset-imagenet/customize.py | 2 +- script/get-preprocessed-dataset-kits19/customize.py | 2 +- script/get-preprocessed-dataset-librispeech/customize.py | 2 +- script/get-preprocessed-dataset-openimages/customize.py | 2 +- script/get-preprocessed-dataset-openorca/customize.py | 2 +- script/get-preprocessed-dataset-squad/customize.py | 2 +- script/get-python3/customize.py | 2 +- script/get-qaic-apps-sdk/customize.py | 2 +- script/get-qaic-platform-sdk/customize.py | 2 +- script/get-qaic-software-kit/customize.py | 2 +- script/get-rclone-config/customize.py | 2 +- script/get-rclone/customize.py | 2 +- script/get-rocm-devices/customize.py | 2 +- script/get-rocm/customize.py | 2 +- script/get-spec-ptd/customize.py | 2 +- script/get-sys-utils-cm/customize.py | 2 +- script/get-sys-utils-min/customize.py | 2 +- script/get-tensorrt/customize.py | 2 +- script/get-terraform/customize.py | 2 +- script/get-tvm-model/customize.py | 2 +- script/get-tvm/customize.py | 2 +- script/get-xilinx-sdk/customize.py | 2 +- script/get-zendnn/customize.py | 2 +- script/get-zephyr-sdk/customize.py | 2 +- script/get-zephyr/customize.py | 2 +- script/install-apt-package/customize.py | 2 +- script/install-aws-cli/customize.py | 2 +- script/install-bazel/customize.py | 2 +- script/install-cmake-prebuilt/customize.py | 2 +- script/install-cuda-package-manager/customize.py | 2 +- script/install-cuda-prebuilt/customize.py | 2 +- script/install-diffusers-from-src/customize.py | 2 +- script/install-gcc-src/customize.py | 2 +- script/install-generic-conda-package/customize.py | 2 +- script/install-gflags-from-src/customize.py | 2 +- script/install-gflags/customize.py | 2 +- script/install-github-cli/customize.py | 2 +- script/install-intel-neural-speed-from-src/customize.py | 2 +- script/install-ipex-from-src/customize.py | 2 +- script/install-llvm-src/customize.py | 2 +- script/install-mlperf-logging-from-src/customize.py | 2 +- script/install-nccl-libs/customize.py | 2 +- script/install-numactl-from-src/customize.py | 2 +- script/install-onednn-from-src/customize.py | 2 +- script/install-onnxruntime-from-src/customize.py | 2 +- script/install-opencv-from-src/customize.py | 2 +- script/install-openssl/customize.py | 2 +- script/install-pip-package-for-cmind-python/customize.py | 2 +- script/install-python-src/customize.py | 2 +- script/install-python-venv/customize.py | 2 +- script/install-pytorch-from-src/customize.py | 2 +- script/install-pytorch-kineto-from-src/customize.py | 2 +- script/install-qaic-compute-sdk-from-src/customize.py | 2 +- script/install-rapidjson-from-src/customize.py | 2 +- script/install-rocm/customize.py | 2 +- script/install-tensorflow-for-c/customize.py | 2 +- script/install-tensorflow-from-src/customize.py | 2 +- script/install-terraform-from-src/customize.py | 2 +- script/install-tflite-from-src/customize.py | 2 +- script/install-torchvision-from-src/customize.py | 2 +- script/install-tpp-pytorch-extension/customize.py | 2 +- script/install-transformers-from-src/customize.py | 2 +- script/plug-prebuilt-cudnn-to-cuda/customize.py | 2 +- script/plug-prebuilt-cusparselt-to-cuda/customize.py | 2 +- script/prepare-training-data-bert/customize.py | 2 +- script/prepare-training-data-resnet/customize.py | 2 +- script/preprocess-mlperf-inference-submission/customize.py | 2 +- script/print-any-text/customize.py | 2 +- script/process-mlperf-accuracy/customize.py | 2 +- script/prune-bert-models/customize.py | 2 +- script/pull-git-repo/customize.py | 2 +- script/push-csv-to-spreadsheet/customize.py | 2 +- script/push-mlperf-inference-results-to-github/customize.py | 2 +- script/remote-run-commands/customize.py | 2 +- script/reproduce-mlperf-octoml-tinyml-results/customize.py | 2 +- script/reproduce-mlperf-training-nvidia/customize.py | 2 +- script/run-all-mlperf-models/customize.py | 2 +- script/run-docker-container/customize.py | 2 +- script/run-mlperf-automotive-app/customize.py | 2 +- script/run-mlperf-inference-mobilenet-models/customize.py | 2 +- script/run-mlperf-inference-submission-checker/customize.py | 2 +- script/run-mlperf-power-client/customize.py | 2 +- script/run-mlperf-power-server/customize.py | 2 +- script/run-mlperf-training-submission-checker/customize.py | 2 +- script/run-terraform/customize.py | 2 +- script/run-vllm-server/customize.py | 2 +- script/runtime-system-infos/customize.py | 2 +- script/save-mlperf-inference-implementation-state/customize.py | 2 +- script/set-device-settings-qaic/customize.py | 2 +- script/set-echo-off-win/customize.py | 2 +- script/set-performance-mode/customize.py | 2 +- script/set-user-limits/customize.py | 2 +- script/set-venv/customize.py | 2 +- script/submit-mlperf-results/customize.py | 2 +- script/tar-my-folder/customize.py | 2 +- script/test-cm-core/customize.py | 2 +- script/test-cm-script-pipeline/customize.py | 2 +- script/test-cm-scripts/customize.py | 2 +- script/test-download-and-extract-artifacts/customize.py | 2 +- script/test-dummy/customize.py | 2 +- script/test-mlperf-inference-retinanet/customize.py | 2 +- script/truncate-mlperf-inference-accuracy-log/customize.py | 2 +- script/wrapper-reproduce-octoml-tinyml-submission/customize.py | 2 +- 258 files changed, 258 insertions(+), 258 deletions(-) diff --git a/script/activate-python-venv/customize.py b/script/activate-python-venv/customize.py index 5858212f9..1d0e96c3c 100644 --- a/script/activate-python-venv/customize.py +++ b/script/activate-python-venv/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/add-custom-nvidia-system/customize.py b/script/add-custom-nvidia-system/customize.py index dbab0597e..714ce821d 100644 --- a/script/add-custom-nvidia-system/customize.py +++ b/script/add-custom-nvidia-system/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import shutil diff --git a/script/app-image-classification-onnx-py/customize.py b/script/app-image-classification-onnx-py/customize.py index 21b57daca..e3371f217 100644 --- a/script/app-image-classification-onnx-py/customize.py +++ b/script/app-image-classification-onnx-py/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import shutil diff --git a/script/app-image-corner-detection/customize.py b/script/app-image-corner-detection/customize.py index de1e344ee..f27ee028a 100644 --- a/script/app-image-corner-detection/customize.py +++ b/script/app-image-corner-detection/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/app-loadgen-generic-python/customize.py b/script/app-loadgen-generic-python/customize.py index 17c923552..55050fadb 100644 --- a/script/app-loadgen-generic-python/customize.py +++ b/script/app-loadgen-generic-python/customize.py @@ -1,6 +1,6 @@ # Developer: Grigori Fursin -from cmind import utils +from mlc import utils import os import shutil diff --git a/script/app-mlperf-automotive-mlcommons-python/customize.py b/script/app-mlperf-automotive-mlcommons-python/customize.py index 58ee04e1f..70ae33af2 100644 --- a/script/app-mlperf-automotive-mlcommons-python/customize.py +++ b/script/app-mlperf-automotive-mlcommons-python/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import json import shutil diff --git a/script/app-mlperf-automotive/customize.py b/script/app-mlperf-automotive/customize.py index 070f2b3c1..0aed805f7 100644 --- a/script/app-mlperf-automotive/customize.py +++ b/script/app-mlperf-automotive/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import json import shutil diff --git a/script/app-mlperf-inference-amd/customize.py b/script/app-mlperf-inference-amd/customize.py index e1958e5a8..16d6245ee 100644 --- a/script/app-mlperf-inference-amd/customize.py +++ b/script/app-mlperf-inference-amd/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import shutil diff --git a/script/app-mlperf-inference-ctuning-cpp-tflite/customize.py b/script/app-mlperf-inference-ctuning-cpp-tflite/customize.py index f5c8e844c..8589a8241 100644 --- a/script/app-mlperf-inference-ctuning-cpp-tflite/customize.py +++ b/script/app-mlperf-inference-ctuning-cpp-tflite/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import shutil diff --git a/script/app-mlperf-inference-dummy/customize.py b/script/app-mlperf-inference-dummy/customize.py index 74ff72927..40e41f738 100644 --- a/script/app-mlperf-inference-dummy/customize.py +++ b/script/app-mlperf-inference-dummy/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import shutil diff --git a/script/app-mlperf-inference-intel/customize.py b/script/app-mlperf-inference-intel/customize.py index 57ab3887d..667e5fb86 100644 --- a/script/app-mlperf-inference-intel/customize.py +++ b/script/app-mlperf-inference-intel/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import shutil diff --git a/script/app-mlperf-inference-mlcommons-cpp/customize.py b/script/app-mlperf-inference-mlcommons-cpp/customize.py index 89356a270..1884a0798 100644 --- a/script/app-mlperf-inference-mlcommons-cpp/customize.py +++ b/script/app-mlperf-inference-mlcommons-cpp/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import shutil diff --git a/script/app-mlperf-inference-mlcommons-python/customize.py b/script/app-mlperf-inference-mlcommons-python/customize.py index cbb8b9bc3..0a4d22cdb 100644 --- a/script/app-mlperf-inference-mlcommons-python/customize.py +++ b/script/app-mlperf-inference-mlcommons-python/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import json import shutil diff --git a/script/app-mlperf-inference-nvidia/customize.py b/script/app-mlperf-inference-nvidia/customize.py index f9eb06822..851f9fa84 100644 --- a/script/app-mlperf-inference-nvidia/customize.py +++ b/script/app-mlperf-inference-nvidia/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import shutil diff --git a/script/app-mlperf-inference-qualcomm/customize.py b/script/app-mlperf-inference-qualcomm/customize.py index 53d0a44be..e14de6d5a 100644 --- a/script/app-mlperf-inference-qualcomm/customize.py +++ b/script/app-mlperf-inference-qualcomm/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import shutil diff --git a/script/app-mlperf-inference-redhat/customize.py b/script/app-mlperf-inference-redhat/customize.py index add2a916f..d5d4ee85d 100644 --- a/script/app-mlperf-inference-redhat/customize.py +++ b/script/app-mlperf-inference-redhat/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import shutil diff --git a/script/app-mlperf-inference/customize.py b/script/app-mlperf-inference/customize.py index 2c34dad70..d0c479e91 100644 --- a/script/app-mlperf-inference/customize.py +++ b/script/app-mlperf-inference/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import json diff --git a/script/app-mlperf-training-nvidia/customize.py b/script/app-mlperf-training-nvidia/customize.py index 0d5c53c44..e1613cd75 100644 --- a/script/app-mlperf-training-nvidia/customize.py +++ b/script/app-mlperf-training-nvidia/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import json import shutil diff --git a/script/app-mlperf-training-reference/customize.py b/script/app-mlperf-training-reference/customize.py index 446939470..54a544fcb 100644 --- a/script/app-mlperf-training-reference/customize.py +++ b/script/app-mlperf-training-reference/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import json import shutil diff --git a/script/authenticate-github-cli/customize.py b/script/authenticate-github-cli/customize.py index f4adae993..a4fb19772 100644 --- a/script/authenticate-github-cli/customize.py +++ b/script/authenticate-github-cli/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/benchmark-any-mlperf-inference-implementation/customize.py b/script/benchmark-any-mlperf-inference-implementation/customize.py index e7f7acc79..b5961dbae 100644 --- a/script/benchmark-any-mlperf-inference-implementation/customize.py +++ b/script/benchmark-any-mlperf-inference-implementation/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/benchmark-program-mlperf/customize.py b/script/benchmark-program-mlperf/customize.py index 23b4db324..fa8c7d627 100644 --- a/script/benchmark-program-mlperf/customize.py +++ b/script/benchmark-program-mlperf/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/benchmark-program/customize.py b/script/benchmark-program/customize.py index 2dd6ffc1c..08e15863c 100644 --- a/script/benchmark-program/customize.py +++ b/script/benchmark-program/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/build-docker-image/customize.py b/script/build-docker-image/customize.py index f674ea677..a231b6b09 100644 --- a/script/build-docker-image/customize.py +++ b/script/build-docker-image/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os from os.path import exists diff --git a/script/build-dockerfile/customize.py b/script/build-dockerfile/customize.py index d6dbd061e..022e0a9d7 100644 --- a/script/build-dockerfile/customize.py +++ b/script/build-dockerfile/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import cmind as cm import os import json diff --git a/script/build-mlperf-inference-server-nvidia/customize.py b/script/build-mlperf-inference-server-nvidia/customize.py index 8d477fcc7..f150d930b 100644 --- a/script/build-mlperf-inference-server-nvidia/customize.py +++ b/script/build-mlperf-inference-server-nvidia/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import shutil diff --git a/script/calibrate-model-for.qaic/customize.py b/script/calibrate-model-for.qaic/customize.py index a77967c49..32ff19353 100644 --- a/script/calibrate-model-for.qaic/customize.py +++ b/script/calibrate-model-for.qaic/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import sys import yaml diff --git a/script/clean-nvidia-mlperf-inference-scratch-space/customize.py b/script/clean-nvidia-mlperf-inference-scratch-space/customize.py index 11d224c59..1d4838f7f 100644 --- a/script/clean-nvidia-mlperf-inference-scratch-space/customize.py +++ b/script/clean-nvidia-mlperf-inference-scratch-space/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import cmind as cm diff --git a/script/compile-model-for.qaic/customize.py b/script/compile-model-for.qaic/customize.py index 3acf5b5cc..8f9f5717c 100644 --- a/script/compile-model-for.qaic/customize.py +++ b/script/compile-model-for.qaic/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/compile-program/customize.py b/script/compile-program/customize.py index c5e2adabb..9fa65ee54 100644 --- a/script/compile-program/customize.py +++ b/script/compile-program/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/convert-csv-to-md/customize.py b/script/convert-csv-to-md/customize.py index 5e63bcd93..872c2b678 100644 --- a/script/convert-csv-to-md/customize.py +++ b/script/convert-csv-to-md/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/convert-ml-model-huggingface-to-onnx/customize.py b/script/convert-ml-model-huggingface-to-onnx/customize.py index 741226f54..90950b120 100644 --- a/script/convert-ml-model-huggingface-to-onnx/customize.py +++ b/script/convert-ml-model-huggingface-to-onnx/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/create-conda-env/customize.py b/script/create-conda-env/customize.py index c9fd8083b..ddc74fab9 100644 --- a/script/create-conda-env/customize.py +++ b/script/create-conda-env/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/create-custom-cache-entry/customize.py b/script/create-custom-cache-entry/customize.py index f15a1e7fd..ce3e0a988 100644 --- a/script/create-custom-cache-entry/customize.py +++ b/script/create-custom-cache-entry/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import shutil diff --git a/script/create-fpgaconvnet-app-tinyml/customize.py b/script/create-fpgaconvnet-app-tinyml/customize.py index 5c6a448bc..a12f17f36 100644 --- a/script/create-fpgaconvnet-app-tinyml/customize.py +++ b/script/create-fpgaconvnet-app-tinyml/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/create-fpgaconvnet-config-tinyml/customize.py b/script/create-fpgaconvnet-config-tinyml/customize.py index 6175a2bdd..90ed2d6f0 100644 --- a/script/create-fpgaconvnet-config-tinyml/customize.py +++ b/script/create-fpgaconvnet-config-tinyml/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/create-patch/customize.py b/script/create-patch/customize.py index 0ebd63b99..14c64623d 100644 --- a/script/create-patch/customize.py +++ b/script/create-patch/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/destroy-terraform/customize.py b/script/destroy-terraform/customize.py index e0bfa63b5..097f3c1a9 100644 --- a/script/destroy-terraform/customize.py +++ b/script/destroy-terraform/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/detect-cpu/customize.py b/script/detect-cpu/customize.py index 852b48a94..cd0c6dc95 100644 --- a/script/detect-cpu/customize.py +++ b/script/detect-cpu/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os lscpu_out = 'tmp-lscpu.out' diff --git a/script/detect-os/customize.py b/script/detect-os/customize.py index c5a0b17c1..82ee00d7a 100644 --- a/script/detect-os/customize.py +++ b/script/detect-os/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import subprocess diff --git a/script/detect-sudo/customize.py b/script/detect-sudo/customize.py index e14d2983c..bc5e92296 100644 --- a/script/detect-sudo/customize.py +++ b/script/detect-sudo/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import subprocess import select diff --git a/script/download-and-extract/customize.py b/script/download-and-extract/customize.py index b3c570dbc..32cac6476 100644 --- a/script/download-and-extract/customize.py +++ b/script/download-and-extract/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import hashlib diff --git a/script/download-file/customize.py b/script/download-file/customize.py index 23514247b..d91418c7d 100644 --- a/script/download-file/customize.py +++ b/script/download-file/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import subprocess diff --git a/script/download-torrent/customize.py b/script/download-torrent/customize.py index 3b4cb4c41..e194e7ff7 100644 --- a/script/download-torrent/customize.py +++ b/script/download-torrent/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/draw-graph-from-json-data/customize.py b/script/draw-graph-from-json-data/customize.py index db1f64b1f..8fafad78f 100644 --- a/script/draw-graph-from-json-data/customize.py +++ b/script/draw-graph-from-json-data/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/dump-pip-freeze/customize.py b/script/dump-pip-freeze/customize.py index 9c5ac3ea9..9c2940d1e 100644 --- a/script/dump-pip-freeze/customize.py +++ b/script/dump-pip-freeze/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/extract-file/customize.py b/script/extract-file/customize.py index dd0394189..f4489105d 100644 --- a/script/extract-file/customize.py +++ b/script/extract-file/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import hashlib diff --git a/script/fail/customize.py b/script/fail/customize.py index 4168a3b7a..69ccec77e 100644 --- a/script/fail/customize.py +++ b/script/fail/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/flash-tinyml-binary/customize.py b/script/flash-tinyml-binary/customize.py index bc0c3bd18..ab0d7e5a3 100644 --- a/script/flash-tinyml-binary/customize.py +++ b/script/flash-tinyml-binary/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/generate-mlperf-inference-submission/customize.py b/script/generate-mlperf-inference-submission/customize.py index d3ab67a2b..ff72ca6f5 100644 --- a/script/generate-mlperf-inference-submission/customize.py +++ b/script/generate-mlperf-inference-submission/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import json import shutil diff --git a/script/generate-mlperf-inference-user-conf/customize.py b/script/generate-mlperf-inference-user-conf/customize.py index 1972092fd..cd32d02f5 100644 --- a/script/generate-mlperf-inference-user-conf/customize.py +++ b/script/generate-mlperf-inference-user-conf/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import json import shutil diff --git a/script/generate-mlperf-tiny-report/customize.py b/script/generate-mlperf-tiny-report/customize.py index 03fdf1c3d..92e808eea 100644 --- a/script/generate-mlperf-tiny-report/customize.py +++ b/script/generate-mlperf-tiny-report/customize.py @@ -1,5 +1,5 @@ import cmind as cm -from cmind import utils +from mlc import utils import os import subprocess diff --git a/script/generate-mlperf-tiny-submission/customize.py b/script/generate-mlperf-tiny-submission/customize.py index 75bd43832..45e7f2d84 100644 --- a/script/generate-mlperf-tiny-submission/customize.py +++ b/script/generate-mlperf-tiny-submission/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import json import shutil diff --git a/script/generate-nvidia-engine/customize.py b/script/generate-nvidia-engine/customize.py index efa6eb7e6..832e32e6c 100644 --- a/script/generate-nvidia-engine/customize.py +++ b/script/generate-nvidia-engine/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import shutil diff --git a/script/get-android-sdk/customize.py b/script/get-android-sdk/customize.py index dee354526..c1f7aea5d 100644 --- a/script/get-android-sdk/customize.py +++ b/script/get-android-sdk/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-aocl/customize.py b/script/get-aocl/customize.py index 285ed97e6..67b95ed28 100644 --- a/script/get-aocl/customize.py +++ b/script/get-aocl/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-aria2/customize.py b/script/get-aria2/customize.py index b7198b30b..c45449430 100644 --- a/script/get-aria2/customize.py +++ b/script/get-aria2/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-aws-cli/customize.py b/script/get-aws-cli/customize.py index 9376577a1..281127a9b 100644 --- a/script/get-aws-cli/customize.py +++ b/script/get-aws-cli/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-bazel/customize.py b/script/get-bazel/customize.py index 39ac03e64..416a20477 100644 --- a/script/get-bazel/customize.py +++ b/script/get-bazel/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-blis/customize.py b/script/get-blis/customize.py index 0582e4bd2..3bfe968fc 100644 --- a/script/get-blis/customize.py +++ b/script/get-blis/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-cache-dir/customize.py b/script/get-cache-dir/customize.py index d1a3edd74..bd5bd1468 100644 --- a/script/get-cache-dir/customize.py +++ b/script/get-cache-dir/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-cl/customize.py b/script/get-cl/customize.py index e36b2c674..2bae685a2 100644 --- a/script/get-cl/customize.py +++ b/script/get-cl/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-cmake/customize.py b/script/get-cmake/customize.py index cea759b2e..b0201bed6 100644 --- a/script/get-cmake/customize.py +++ b/script/get-cmake/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-cmsis_5/customize.py b/script/get-cmsis_5/customize.py index 9f9ebc556..e5fac8d7e 100644 --- a/script/get-cmsis_5/customize.py +++ b/script/get-cmsis_5/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import shutil diff --git a/script/get-compiler-flags/customize.py b/script/get-compiler-flags/customize.py index e9fc57301..dd7ee775a 100644 --- a/script/get-compiler-flags/customize.py +++ b/script/get-compiler-flags/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import subprocess diff --git a/script/get-compiler-rust/customize.py b/script/get-compiler-rust/customize.py index 2a1b202f8..01bf84b37 100644 --- a/script/get-compiler-rust/customize.py +++ b/script/get-compiler-rust/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-conda/customize.py b/script/get-conda/customize.py index 7e9cd9236..3c44af161 100644 --- a/script/get-conda/customize.py +++ b/script/get-conda/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-croissant/customize.py b/script/get-croissant/customize.py index afa821465..344ee1d4b 100644 --- a/script/get-croissant/customize.py +++ b/script/get-croissant/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-cuda-devices/customize.py b/script/get-cuda-devices/customize.py index ba66b8904..26969185d 100644 --- a/script/get-cuda-devices/customize.py +++ b/script/get-cuda-devices/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import subprocess diff --git a/script/get-cuda/customize.py b/script/get-cuda/customize.py index 925e1e8b9..c8a68c4a7 100644 --- a/script/get-cuda/customize.py +++ b/script/get-cuda/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import json diff --git a/script/get-cudnn/customize.py b/script/get-cudnn/customize.py index 7d6984cbe..ed64cd241 100644 --- a/script/get-cudnn/customize.py +++ b/script/get-cudnn/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import tarfile import shutil diff --git a/script/get-dataset-cifar10/customize.py b/script/get-dataset-cifar10/customize.py index d000dc407..4ceebf821 100644 --- a/script/get-dataset-cifar10/customize.py +++ b/script/get-dataset-cifar10/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import shutil diff --git a/script/get-dataset-cnndm/customize.py b/script/get-dataset-cnndm/customize.py index 25966d850..a6cf2d476 100644 --- a/script/get-dataset-cnndm/customize.py +++ b/script/get-dataset-cnndm/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import shutil diff --git a/script/get-dataset-coco/customize.py b/script/get-dataset-coco/customize.py index 60e4a3ae9..b7ee135ee 100644 --- a/script/get-dataset-coco/customize.py +++ b/script/get-dataset-coco/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import shutil diff --git a/script/get-dataset-coco2014/customize.py b/script/get-dataset-coco2014/customize.py index 3f80e76f0..90a502219 100644 --- a/script/get-dataset-coco2014/customize.py +++ b/script/get-dataset-coco2014/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import shutil diff --git a/script/get-dataset-cognata-mlcommons/customize.py b/script/get-dataset-cognata-mlcommons/customize.py index 46f3b87aa..94caa3ac2 100644 --- a/script/get-dataset-cognata-mlcommons/customize.py +++ b/script/get-dataset-cognata-mlcommons/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import json diff --git a/script/get-dataset-igbh/customize.py b/script/get-dataset-igbh/customize.py index de85bd900..c454d415d 100644 --- a/script/get-dataset-igbh/customize.py +++ b/script/get-dataset-igbh/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-dataset-imagenet-helper/customize.py b/script/get-dataset-imagenet-helper/customize.py index b9dd841f5..911411db4 100644 --- a/script/get-dataset-imagenet-helper/customize.py +++ b/script/get-dataset-imagenet-helper/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-dataset-imagenet-train/customize.py b/script/get-dataset-imagenet-train/customize.py index b1f8aea1e..5a760c895 100644 --- a/script/get-dataset-imagenet-train/customize.py +++ b/script/get-dataset-imagenet-train/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-dataset-imagenet-val/customize.py b/script/get-dataset-imagenet-val/customize.py index 2f3243735..e11648adf 100644 --- a/script/get-dataset-imagenet-val/customize.py +++ b/script/get-dataset-imagenet-val/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-dataset-kits19/customize.py b/script/get-dataset-kits19/customize.py index bf5462d9b..5f95125c0 100644 --- a/script/get-dataset-kits19/customize.py +++ b/script/get-dataset-kits19/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import shutil diff --git a/script/get-dataset-librispeech/customize.py b/script/get-dataset-librispeech/customize.py index 0da64539e..969b4b4ad 100644 --- a/script/get-dataset-librispeech/customize.py +++ b/script/get-dataset-librispeech/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-dataset-mlperf-inference-llama3/customize.py b/script/get-dataset-mlperf-inference-llama3/customize.py index 745dc52fe..827dcd2cd 100644 --- a/script/get-dataset-mlperf-inference-llama3/customize.py +++ b/script/get-dataset-mlperf-inference-llama3/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-dataset-mlperf-inference-mixtral/customize.py b/script/get-dataset-mlperf-inference-mixtral/customize.py index 38825cfdb..dc46a6661 100644 --- a/script/get-dataset-mlperf-inference-mixtral/customize.py +++ b/script/get-dataset-mlperf-inference-mixtral/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-dataset-openimages-annotations/customize.py b/script/get-dataset-openimages-annotations/customize.py index f42ee200d..286ba3fa8 100644 --- a/script/get-dataset-openimages-annotations/customize.py +++ b/script/get-dataset-openimages-annotations/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-dataset-openimages-calibration/customize.py b/script/get-dataset-openimages-calibration/customize.py index 032065bc8..5fc459075 100644 --- a/script/get-dataset-openimages-calibration/customize.py +++ b/script/get-dataset-openimages-calibration/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-dataset-openimages/customize.py b/script/get-dataset-openimages/customize.py index ae53a85f5..0f68a45c2 100644 --- a/script/get-dataset-openimages/customize.py +++ b/script/get-dataset-openimages/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import shutil diff --git a/script/get-dataset-openorca/customize.py b/script/get-dataset-openorca/customize.py index db4c116ea..6daca4bf6 100644 --- a/script/get-dataset-openorca/customize.py +++ b/script/get-dataset-openorca/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import shutil diff --git a/script/get-dataset-squad-vocab/customize.py b/script/get-dataset-squad-vocab/customize.py index 40d3c5dd5..538250b19 100644 --- a/script/get-dataset-squad-vocab/customize.py +++ b/script/get-dataset-squad-vocab/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-dataset-squad/customize.py b/script/get-dataset-squad/customize.py index 3af4c8553..c372a75d8 100644 --- a/script/get-dataset-squad/customize.py +++ b/script/get-dataset-squad/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-dlrm-data-mlperf-inference/customize.py b/script/get-dlrm-data-mlperf-inference/customize.py index ebec12749..2684d2594 100644 --- a/script/get-dlrm-data-mlperf-inference/customize.py +++ b/script/get-dlrm-data-mlperf-inference/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-dlrm/customize.py b/script/get-dlrm/customize.py index 561545c67..e7c634f3c 100644 --- a/script/get-dlrm/customize.py +++ b/script/get-dlrm/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import shutil diff --git a/script/get-docker/customize.py b/script/get-docker/customize.py index fbf0a5bbf..08975cf52 100644 --- a/script/get-docker/customize.py +++ b/script/get-docker/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-gcc/customize.py b/script/get-gcc/customize.py index 9dc79c3ee..2b8b33cc4 100644 --- a/script/get-gcc/customize.py +++ b/script/get-gcc/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-generic-python-lib/customize.py b/script/get-generic-python-lib/customize.py index 57f25127f..463fab78b 100644 --- a/script/get-generic-python-lib/customize.py +++ b/script/get-generic-python-lib/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import cmind as cm diff --git a/script/get-generic-sys-util/customize.py b/script/get-generic-sys-util/customize.py index 18f85a750..81f2bf76b 100644 --- a/script/get-generic-sys-util/customize.py +++ b/script/get-generic-sys-util/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import re diff --git a/script/get-gh-actions-runner/customize.py b/script/get-gh-actions-runner/customize.py index ea87909ae..5fa54e71f 100644 --- a/script/get-gh-actions-runner/customize.py +++ b/script/get-gh-actions-runner/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import cmind as cm diff --git a/script/get-git-repo/customize.py b/script/get-git-repo/customize.py index a4bf81720..603340e47 100644 --- a/script/get-git-repo/customize.py +++ b/script/get-git-repo/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import shutil diff --git a/script/get-github-cli/customize.py b/script/get-github-cli/customize.py index b69878bf0..bf6a19089 100644 --- a/script/get-github-cli/customize.py +++ b/script/get-github-cli/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-go/customize.py b/script/get-go/customize.py index c343442f7..b3ccee3cc 100644 --- a/script/get-go/customize.py +++ b/script/get-go/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-google-saxml/customize.py b/script/get-google-saxml/customize.py index 983d681f4..a2acfde43 100644 --- a/script/get-google-saxml/customize.py +++ b/script/get-google-saxml/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-google-test/customize.py b/script/get-google-test/customize.py index 67cbf331d..a22c59349 100644 --- a/script/get-google-test/customize.py +++ b/script/get-google-test/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-huggingface-cli/customize.py b/script/get-huggingface-cli/customize.py index d9e63e42c..56fcb0761 100644 --- a/script/get-huggingface-cli/customize.py +++ b/script/get-huggingface-cli/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-ipol-src/customize.py b/script/get-ipol-src/customize.py index 5bd5d15a9..9291872cf 100644 --- a/script/get-ipol-src/customize.py +++ b/script/get-ipol-src/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-java/customize.py b/script/get-java/customize.py index e103ac4ff..b82010d8d 100644 --- a/script/get-java/customize.py +++ b/script/get-java/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-javac/customize.py b/script/get-javac/customize.py index a5a97c62d..4a1aa03f9 100644 --- a/script/get-javac/customize.py +++ b/script/get-javac/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-lib-armnn/customize.py b/script/get-lib-armnn/customize.py index 4fe934f3b..c365543c7 100644 --- a/script/get-lib-armnn/customize.py +++ b/script/get-lib-armnn/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-lib-dnnl/customize.py b/script/get-lib-dnnl/customize.py index 8b834eb29..051595167 100644 --- a/script/get-lib-dnnl/customize.py +++ b/script/get-lib-dnnl/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-lib-protobuf/customize.py b/script/get-lib-protobuf/customize.py index dc9a423c2..e8e6ea450 100644 --- a/script/get-lib-protobuf/customize.py +++ b/script/get-lib-protobuf/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-lib-qaic-api/customize.py b/script/get-lib-qaic-api/customize.py index 4d9b73865..6c829ae86 100644 --- a/script/get-lib-qaic-api/customize.py +++ b/script/get-lib-qaic-api/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-llvm/customize.py b/script/get-llvm/customize.py index 9b2ff3d5f..c8bb004d6 100644 --- a/script/get-llvm/customize.py +++ b/script/get-llvm/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-microtvm/customize.py b/script/get-microtvm/customize.py index db61f8d73..8572322f4 100644 --- a/script/get-microtvm/customize.py +++ b/script/get-microtvm/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import shutil diff --git a/script/get-ml-model-3d-unet-kits19/customize.py b/script/get-ml-model-3d-unet-kits19/customize.py index 164f34865..d24b386c9 100644 --- a/script/get-ml-model-3d-unet-kits19/customize.py +++ b/script/get-ml-model-3d-unet-kits19/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-ml-model-abtf-ssd-pytorch/customize.py b/script/get-ml-model-abtf-ssd-pytorch/customize.py index 10a3a7f83..7d20952a2 100644 --- a/script/get-ml-model-abtf-ssd-pytorch/customize.py +++ b/script/get-ml-model-abtf-ssd-pytorch/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-ml-model-bert-large-squad/customize.py b/script/get-ml-model-bert-large-squad/customize.py index c58448455..76eddaaed 100644 --- a/script/get-ml-model-bert-large-squad/customize.py +++ b/script/get-ml-model-bert-large-squad/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-ml-model-efficientnet-lite/customize.py b/script/get-ml-model-efficientnet-lite/customize.py index 14f97cbd2..59f3c580e 100644 --- a/script/get-ml-model-efficientnet-lite/customize.py +++ b/script/get-ml-model-efficientnet-lite/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-ml-model-gptj/customize.py b/script/get-ml-model-gptj/customize.py index 90343764d..d4fc749e5 100644 --- a/script/get-ml-model-gptj/customize.py +++ b/script/get-ml-model-gptj/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-ml-model-huggingface-zoo/customize.py b/script/get-ml-model-huggingface-zoo/customize.py index 8a4f3c34c..e117df4e3 100644 --- a/script/get-ml-model-huggingface-zoo/customize.py +++ b/script/get-ml-model-huggingface-zoo/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-ml-model-llama2/customize.py b/script/get-ml-model-llama2/customize.py index 1f5949312..1c091c12b 100644 --- a/script/get-ml-model-llama2/customize.py +++ b/script/get-ml-model-llama2/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-ml-model-llama3/customize.py b/script/get-ml-model-llama3/customize.py index 9ec7edecd..71d309b3a 100644 --- a/script/get-ml-model-llama3/customize.py +++ b/script/get-ml-model-llama3/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-ml-model-mixtral/customize.py b/script/get-ml-model-mixtral/customize.py index a21036883..15ca81033 100644 --- a/script/get-ml-model-mixtral/customize.py +++ b/script/get-ml-model-mixtral/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-ml-model-mobilenet/customize.py b/script/get-ml-model-mobilenet/customize.py index 14f97cbd2..59f3c580e 100644 --- a/script/get-ml-model-mobilenet/customize.py +++ b/script/get-ml-model-mobilenet/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-ml-model-neuralmagic-zoo/customize.py b/script/get-ml-model-neuralmagic-zoo/customize.py index 417bc036f..685eaae6f 100644 --- a/script/get-ml-model-neuralmagic-zoo/customize.py +++ b/script/get-ml-model-neuralmagic-zoo/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-ml-model-resnet50/customize.py b/script/get-ml-model-resnet50/customize.py index 3aced7756..d4095dc65 100644 --- a/script/get-ml-model-resnet50/customize.py +++ b/script/get-ml-model-resnet50/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-ml-model-retinanet-nvidia/customize.py b/script/get-ml-model-retinanet-nvidia/customize.py index 52fce9129..67be9d6a7 100644 --- a/script/get-ml-model-retinanet-nvidia/customize.py +++ b/script/get-ml-model-retinanet-nvidia/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-ml-model-retinanet/customize.py b/script/get-ml-model-retinanet/customize.py index 63a42a72e..71ab2852e 100644 --- a/script/get-ml-model-retinanet/customize.py +++ b/script/get-ml-model-retinanet/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-ml-model-rgat/customize.py b/script/get-ml-model-rgat/customize.py index 3cda5a7a8..469cb3943 100644 --- a/script/get-ml-model-rgat/customize.py +++ b/script/get-ml-model-rgat/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-ml-model-rnnt/customize.py b/script/get-ml-model-rnnt/customize.py index 31f44f416..0fc024cdd 100644 --- a/script/get-ml-model-rnnt/customize.py +++ b/script/get-ml-model-rnnt/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-ml-model-stable-diffusion/customize.py b/script/get-ml-model-stable-diffusion/customize.py index cdaf6b90c..1049ac703 100644 --- a/script/get-ml-model-stable-diffusion/customize.py +++ b/script/get-ml-model-stable-diffusion/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-ml-model-tiny-resnet/customize.py b/script/get-ml-model-tiny-resnet/customize.py index d936088ba..fac34716f 100644 --- a/script/get-ml-model-tiny-resnet/customize.py +++ b/script/get-ml-model-tiny-resnet/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-ml-model-using-imagenet-from-model-zoo/customize.py b/script/get-ml-model-using-imagenet-from-model-zoo/customize.py index a7caca650..fa2e1a85a 100644 --- a/script/get-ml-model-using-imagenet-from-model-zoo/customize.py +++ b/script/get-ml-model-using-imagenet-from-model-zoo/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-mlperf-automotive-scratch-space/customize.py b/script/get-mlperf-automotive-scratch-space/customize.py index 057acd2c4..9c3cda605 100644 --- a/script/get-mlperf-automotive-scratch-space/customize.py +++ b/script/get-mlperf-automotive-scratch-space/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-mlperf-inference-intel-scratch-space/customize.py b/script/get-mlperf-inference-intel-scratch-space/customize.py index b88245660..8862e1adf 100644 --- a/script/get-mlperf-inference-intel-scratch-space/customize.py +++ b/script/get-mlperf-inference-intel-scratch-space/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-mlperf-inference-loadgen/customize.py b/script/get-mlperf-inference-loadgen/customize.py index 524521e42..c6747af04 100644 --- a/script/get-mlperf-inference-loadgen/customize.py +++ b/script/get-mlperf-inference-loadgen/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-mlperf-inference-nvidia-common-code/customize.py b/script/get-mlperf-inference-nvidia-common-code/customize.py index 4edd4cbde..a8b61cf0e 100644 --- a/script/get-mlperf-inference-nvidia-common-code/customize.py +++ b/script/get-mlperf-inference-nvidia-common-code/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-mlperf-inference-nvidia-scratch-space/customize.py b/script/get-mlperf-inference-nvidia-scratch-space/customize.py index 533536389..0e21e01ab 100644 --- a/script/get-mlperf-inference-nvidia-scratch-space/customize.py +++ b/script/get-mlperf-inference-nvidia-scratch-space/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-mlperf-inference-results-dir/customize.py b/script/get-mlperf-inference-results-dir/customize.py index f1beabcaa..997a0564d 100644 --- a/script/get-mlperf-inference-results-dir/customize.py +++ b/script/get-mlperf-inference-results-dir/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-mlperf-inference-results/customize.py b/script/get-mlperf-inference-results/customize.py index 36f71224d..b1e054dac 100644 --- a/script/get-mlperf-inference-results/customize.py +++ b/script/get-mlperf-inference-results/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import shutil diff --git a/script/get-mlperf-inference-src/customize.py b/script/get-mlperf-inference-src/customize.py index 8c545d678..dee74bdaf 100644 --- a/script/get-mlperf-inference-src/customize.py +++ b/script/get-mlperf-inference-src/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import shutil diff --git a/script/get-mlperf-inference-submission-dir/customize.py b/script/get-mlperf-inference-submission-dir/customize.py index f0f95f62f..e7e7eae85 100644 --- a/script/get-mlperf-inference-submission-dir/customize.py +++ b/script/get-mlperf-inference-submission-dir/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-mlperf-inference-sut-configs/customize.py b/script/get-mlperf-inference-sut-configs/customize.py index 8adbdc3b8..8bc64be4c 100644 --- a/script/get-mlperf-inference-sut-configs/customize.py +++ b/script/get-mlperf-inference-sut-configs/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import yaml import shutil diff --git a/script/get-mlperf-inference-sut-description/customize.py b/script/get-mlperf-inference-sut-description/customize.py index 0f7693fa0..3490f4580 100644 --- a/script/get-mlperf-inference-sut-description/customize.py +++ b/script/get-mlperf-inference-sut-description/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import json import shutil diff --git a/script/get-mlperf-inference-utils/customize.py b/script/get-mlperf-inference-utils/customize.py index 179342fc7..2f0310932 100644 --- a/script/get-mlperf-inference-utils/customize.py +++ b/script/get-mlperf-inference-utils/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import sys diff --git a/script/get-mlperf-logging/customize.py b/script/get-mlperf-logging/customize.py index fea70fc38..318a83d0a 100644 --- a/script/get-mlperf-logging/customize.py +++ b/script/get-mlperf-logging/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import shutil diff --git a/script/get-mlperf-power-dev/customize.py b/script/get-mlperf-power-dev/customize.py index d091365bb..1cf439730 100644 --- a/script/get-mlperf-power-dev/customize.py +++ b/script/get-mlperf-power-dev/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import shutil diff --git a/script/get-mlperf-tiny-eembc-energy-runner-src/customize.py b/script/get-mlperf-tiny-eembc-energy-runner-src/customize.py index a2e524315..477df85b1 100644 --- a/script/get-mlperf-tiny-eembc-energy-runner-src/customize.py +++ b/script/get-mlperf-tiny-eembc-energy-runner-src/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import shutil diff --git a/script/get-mlperf-tiny-src/customize.py b/script/get-mlperf-tiny-src/customize.py index f07ee475d..58eba296d 100644 --- a/script/get-mlperf-tiny-src/customize.py +++ b/script/get-mlperf-tiny-src/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import shutil diff --git a/script/get-mlperf-training-nvidia-code/customize.py b/script/get-mlperf-training-nvidia-code/customize.py index 4a2d1f33d..14c0ba345 100644 --- a/script/get-mlperf-training-nvidia-code/customize.py +++ b/script/get-mlperf-training-nvidia-code/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-mlperf-training-src/customize.py b/script/get-mlperf-training-src/customize.py index 1af8336a8..baf805882 100644 --- a/script/get-mlperf-training-src/customize.py +++ b/script/get-mlperf-training-src/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import shutil diff --git a/script/get-nvidia-mitten/customize.py b/script/get-nvidia-mitten/customize.py index 983d681f4..a2acfde43 100644 --- a/script/get-nvidia-mitten/customize.py +++ b/script/get-nvidia-mitten/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-onnxruntime-prebuilt/customize.py b/script/get-onnxruntime-prebuilt/customize.py index ebb13a72f..2184b54de 100644 --- a/script/get-onnxruntime-prebuilt/customize.py +++ b/script/get-onnxruntime-prebuilt/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-openssl/customize.py b/script/get-openssl/customize.py index 2ac5ac73b..2cc8ff2e5 100644 --- a/script/get-openssl/customize.py +++ b/script/get-openssl/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-platform-details/customize.py b/script/get-platform-details/customize.py index 485e5cee6..5db915829 100644 --- a/script/get-platform-details/customize.py +++ b/script/get-platform-details/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import subprocess diff --git a/script/get-preprocessed-dataset-criteo/customize.py b/script/get-preprocessed-dataset-criteo/customize.py index bb60894f6..7200d4795 100644 --- a/script/get-preprocessed-dataset-criteo/customize.py +++ b/script/get-preprocessed-dataset-criteo/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import shutil diff --git a/script/get-preprocessed-dataset-generic/customize.py b/script/get-preprocessed-dataset-generic/customize.py index c470734b9..9a2abdde0 100644 --- a/script/get-preprocessed-dataset-generic/customize.py +++ b/script/get-preprocessed-dataset-generic/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-preprocessed-dataset-imagenet/customize.py b/script/get-preprocessed-dataset-imagenet/customize.py index 60fd02198..0b5a6f0d6 100644 --- a/script/get-preprocessed-dataset-imagenet/customize.py +++ b/script/get-preprocessed-dataset-imagenet/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os from os.path import exists import shutil diff --git a/script/get-preprocessed-dataset-kits19/customize.py b/script/get-preprocessed-dataset-kits19/customize.py index 3b108f88a..6b3ce5c02 100644 --- a/script/get-preprocessed-dataset-kits19/customize.py +++ b/script/get-preprocessed-dataset-kits19/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import shutil diff --git a/script/get-preprocessed-dataset-librispeech/customize.py b/script/get-preprocessed-dataset-librispeech/customize.py index 7a3f6c73f..70389e904 100644 --- a/script/get-preprocessed-dataset-librispeech/customize.py +++ b/script/get-preprocessed-dataset-librispeech/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import shutil diff --git a/script/get-preprocessed-dataset-openimages/customize.py b/script/get-preprocessed-dataset-openimages/customize.py index cec47ecea..f502bf1b2 100644 --- a/script/get-preprocessed-dataset-openimages/customize.py +++ b/script/get-preprocessed-dataset-openimages/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import shutil import glob diff --git a/script/get-preprocessed-dataset-openorca/customize.py b/script/get-preprocessed-dataset-openorca/customize.py index 7c042c839..49b1a8ae4 100644 --- a/script/get-preprocessed-dataset-openorca/customize.py +++ b/script/get-preprocessed-dataset-openorca/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import shutil diff --git a/script/get-preprocessed-dataset-squad/customize.py b/script/get-preprocessed-dataset-squad/customize.py index 1f72f139f..7f89c2275 100644 --- a/script/get-preprocessed-dataset-squad/customize.py +++ b/script/get-preprocessed-dataset-squad/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-python3/customize.py b/script/get-python3/customize.py index 1f05701a4..e6598804d 100644 --- a/script/get-python3/customize.py +++ b/script/get-python3/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-qaic-apps-sdk/customize.py b/script/get-qaic-apps-sdk/customize.py index 5fd343f71..023b9809d 100644 --- a/script/get-qaic-apps-sdk/customize.py +++ b/script/get-qaic-apps-sdk/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import xml.etree.ElementTree as et diff --git a/script/get-qaic-platform-sdk/customize.py b/script/get-qaic-platform-sdk/customize.py index 33e9548ba..9e2079a98 100644 --- a/script/get-qaic-platform-sdk/customize.py +++ b/script/get-qaic-platform-sdk/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import xml.etree.ElementTree as et diff --git a/script/get-qaic-software-kit/customize.py b/script/get-qaic-software-kit/customize.py index 77edac769..6826e2ea2 100644 --- a/script/get-qaic-software-kit/customize.py +++ b/script/get-qaic-software-kit/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-rclone-config/customize.py b/script/get-rclone-config/customize.py index 10893238f..68c1f59a0 100644 --- a/script/get-rclone-config/customize.py +++ b/script/get-rclone-config/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-rclone/customize.py b/script/get-rclone/customize.py index 7dec29c71..197e75f1e 100644 --- a/script/get-rclone/customize.py +++ b/script/get-rclone/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import configparser diff --git a/script/get-rocm-devices/customize.py b/script/get-rocm-devices/customize.py index 0b0d0d9ce..69cb82ff1 100644 --- a/script/get-rocm-devices/customize.py +++ b/script/get-rocm-devices/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import subprocess diff --git a/script/get-rocm/customize.py b/script/get-rocm/customize.py index 1e9c5071c..f864221df 100644 --- a/script/get-rocm/customize.py +++ b/script/get-rocm/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-spec-ptd/customize.py b/script/get-spec-ptd/customize.py index 6e88200dd..3607fa621 100644 --- a/script/get-spec-ptd/customize.py +++ b/script/get-spec-ptd/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import shutil import stat diff --git a/script/get-sys-utils-cm/customize.py b/script/get-sys-utils-cm/customize.py index 2484b5564..0582e9a5e 100644 --- a/script/get-sys-utils-cm/customize.py +++ b/script/get-sys-utils-cm/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-sys-utils-min/customize.py b/script/get-sys-utils-min/customize.py index c4a2ee1d2..2c25d3c4a 100644 --- a/script/get-sys-utils-min/customize.py +++ b/script/get-sys-utils-min/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-tensorrt/customize.py b/script/get-tensorrt/customize.py index 263c645e8..2da2a3b2e 100644 --- a/script/get-tensorrt/customize.py +++ b/script/get-tensorrt/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import tarfile diff --git a/script/get-terraform/customize.py b/script/get-terraform/customize.py index 1ec8af5c6..8b051f01f 100644 --- a/script/get-terraform/customize.py +++ b/script/get-terraform/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-tvm-model/customize.py b/script/get-tvm-model/customize.py index ce883ce36..5869374bc 100644 --- a/script/get-tvm-model/customize.py +++ b/script/get-tvm-model/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-tvm/customize.py b/script/get-tvm/customize.py index b7995264b..9bb912f88 100644 --- a/script/get-tvm/customize.py +++ b/script/get-tvm/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-xilinx-sdk/customize.py b/script/get-xilinx-sdk/customize.py index 52922d29c..f14b9797d 100644 --- a/script/get-xilinx-sdk/customize.py +++ b/script/get-xilinx-sdk/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-zendnn/customize.py b/script/get-zendnn/customize.py index 5310eea52..706398a08 100644 --- a/script/get-zendnn/customize.py +++ b/script/get-zendnn/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-zephyr-sdk/customize.py b/script/get-zephyr-sdk/customize.py index d0b05d675..950a479ec 100644 --- a/script/get-zephyr-sdk/customize.py +++ b/script/get-zephyr-sdk/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/get-zephyr/customize.py b/script/get-zephyr/customize.py index 74b8a9fec..4bbcf5316 100644 --- a/script/get-zephyr/customize.py +++ b/script/get-zephyr/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/install-apt-package/customize.py b/script/install-apt-package/customize.py index 21e27eeda..911067966 100644 --- a/script/install-apt-package/customize.py +++ b/script/install-apt-package/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import re diff --git a/script/install-aws-cli/customize.py b/script/install-aws-cli/customize.py index 032a4f3bf..f4a90798c 100644 --- a/script/install-aws-cli/customize.py +++ b/script/install-aws-cli/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/install-bazel/customize.py b/script/install-bazel/customize.py index 4bd79760b..f18929e25 100644 --- a/script/install-bazel/customize.py +++ b/script/install-bazel/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/install-cmake-prebuilt/customize.py b/script/install-cmake-prebuilt/customize.py index 598dda208..d7122df66 100644 --- a/script/install-cmake-prebuilt/customize.py +++ b/script/install-cmake-prebuilt/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/install-cuda-package-manager/customize.py b/script/install-cuda-package-manager/customize.py index fb84652e3..96100616a 100644 --- a/script/install-cuda-package-manager/customize.py +++ b/script/install-cuda-package-manager/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/install-cuda-prebuilt/customize.py b/script/install-cuda-prebuilt/customize.py index db49f81b3..ddaae605c 100644 --- a/script/install-cuda-prebuilt/customize.py +++ b/script/install-cuda-prebuilt/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/install-diffusers-from-src/customize.py b/script/install-diffusers-from-src/customize.py index 6d5e7f9db..300164858 100644 --- a/script/install-diffusers-from-src/customize.py +++ b/script/install-diffusers-from-src/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/install-gcc-src/customize.py b/script/install-gcc-src/customize.py index a368cdfb8..ff13be8e2 100644 --- a/script/install-gcc-src/customize.py +++ b/script/install-gcc-src/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/install-generic-conda-package/customize.py b/script/install-generic-conda-package/customize.py index 5310923d6..7eb210453 100644 --- a/script/install-generic-conda-package/customize.py +++ b/script/install-generic-conda-package/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import cmind as cm diff --git a/script/install-gflags-from-src/customize.py b/script/install-gflags-from-src/customize.py index 030b0b8b4..c7ad1faa0 100644 --- a/script/install-gflags-from-src/customize.py +++ b/script/install-gflags-from-src/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/install-gflags/customize.py b/script/install-gflags/customize.py index d9caffb60..97f3d2c06 100644 --- a/script/install-gflags/customize.py +++ b/script/install-gflags/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/install-github-cli/customize.py b/script/install-github-cli/customize.py index 5079c4d74..08370ecbd 100644 --- a/script/install-github-cli/customize.py +++ b/script/install-github-cli/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/install-intel-neural-speed-from-src/customize.py b/script/install-intel-neural-speed-from-src/customize.py index 9ac64a4f8..f6cae5a37 100644 --- a/script/install-intel-neural-speed-from-src/customize.py +++ b/script/install-intel-neural-speed-from-src/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/install-ipex-from-src/customize.py b/script/install-ipex-from-src/customize.py index d25749304..7521bc3c5 100644 --- a/script/install-ipex-from-src/customize.py +++ b/script/install-ipex-from-src/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/install-llvm-src/customize.py b/script/install-llvm-src/customize.py index 5a359ac7e..c3ec8e0c8 100644 --- a/script/install-llvm-src/customize.py +++ b/script/install-llvm-src/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/install-mlperf-logging-from-src/customize.py b/script/install-mlperf-logging-from-src/customize.py index 273999d46..3df1d0660 100644 --- a/script/install-mlperf-logging-from-src/customize.py +++ b/script/install-mlperf-logging-from-src/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/install-nccl-libs/customize.py b/script/install-nccl-libs/customize.py index 273999d46..3df1d0660 100644 --- a/script/install-nccl-libs/customize.py +++ b/script/install-nccl-libs/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/install-numactl-from-src/customize.py b/script/install-numactl-from-src/customize.py index 5605e99b0..9f662f3a8 100644 --- a/script/install-numactl-from-src/customize.py +++ b/script/install-numactl-from-src/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/install-onednn-from-src/customize.py b/script/install-onednn-from-src/customize.py index facd107df..18444917d 100644 --- a/script/install-onednn-from-src/customize.py +++ b/script/install-onednn-from-src/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/install-onnxruntime-from-src/customize.py b/script/install-onnxruntime-from-src/customize.py index 0f11967a0..23a0b15de 100644 --- a/script/install-onnxruntime-from-src/customize.py +++ b/script/install-onnxruntime-from-src/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/install-opencv-from-src/customize.py b/script/install-opencv-from-src/customize.py index bc4ebf61f..459536d29 100644 --- a/script/install-opencv-from-src/customize.py +++ b/script/install-opencv-from-src/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/install-openssl/customize.py b/script/install-openssl/customize.py index 23ece8afb..d2c747014 100644 --- a/script/install-openssl/customize.py +++ b/script/install-openssl/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/install-pip-package-for-cmind-python/customize.py b/script/install-pip-package-for-cmind-python/customize.py index 05960de84..be33639d1 100644 --- a/script/install-pip-package-for-cmind-python/customize.py +++ b/script/install-pip-package-for-cmind-python/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import subprocess import sys diff --git a/script/install-python-src/customize.py b/script/install-python-src/customize.py index 25edf22f4..fe0901aa3 100644 --- a/script/install-python-src/customize.py +++ b/script/install-python-src/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/install-python-venv/customize.py b/script/install-python-venv/customize.py index a9a411524..b73e5ac7d 100644 --- a/script/install-python-venv/customize.py +++ b/script/install-python-venv/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/install-pytorch-from-src/customize.py b/script/install-pytorch-from-src/customize.py index d44872d7a..3f8735654 100644 --- a/script/install-pytorch-from-src/customize.py +++ b/script/install-pytorch-from-src/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/install-pytorch-kineto-from-src/customize.py b/script/install-pytorch-kineto-from-src/customize.py index 032a4f3bf..f4a90798c 100644 --- a/script/install-pytorch-kineto-from-src/customize.py +++ b/script/install-pytorch-kineto-from-src/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/install-qaic-compute-sdk-from-src/customize.py b/script/install-qaic-compute-sdk-from-src/customize.py index fec123a6b..ec0a42185 100644 --- a/script/install-qaic-compute-sdk-from-src/customize.py +++ b/script/install-qaic-compute-sdk-from-src/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/install-rapidjson-from-src/customize.py b/script/install-rapidjson-from-src/customize.py index 6d5e7f9db..300164858 100644 --- a/script/install-rapidjson-from-src/customize.py +++ b/script/install-rapidjson-from-src/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/install-rocm/customize.py b/script/install-rocm/customize.py index 2762f8138..9891f8e62 100644 --- a/script/install-rocm/customize.py +++ b/script/install-rocm/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/install-tensorflow-for-c/customize.py b/script/install-tensorflow-for-c/customize.py index d950482c4..c354d0b99 100644 --- a/script/install-tensorflow-for-c/customize.py +++ b/script/install-tensorflow-for-c/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/install-tensorflow-from-src/customize.py b/script/install-tensorflow-from-src/customize.py index f591d5522..e99d0b5a2 100644 --- a/script/install-tensorflow-from-src/customize.py +++ b/script/install-tensorflow-from-src/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/install-terraform-from-src/customize.py b/script/install-terraform-from-src/customize.py index fb46c1192..475c0037c 100644 --- a/script/install-terraform-from-src/customize.py +++ b/script/install-terraform-from-src/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/install-tflite-from-src/customize.py b/script/install-tflite-from-src/customize.py index b23045938..bb4324c62 100644 --- a/script/install-tflite-from-src/customize.py +++ b/script/install-tflite-from-src/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/install-torchvision-from-src/customize.py b/script/install-torchvision-from-src/customize.py index 6d5e7f9db..300164858 100644 --- a/script/install-torchvision-from-src/customize.py +++ b/script/install-torchvision-from-src/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/install-tpp-pytorch-extension/customize.py b/script/install-tpp-pytorch-extension/customize.py index 6ee676b68..dfc6e52df 100644 --- a/script/install-tpp-pytorch-extension/customize.py +++ b/script/install-tpp-pytorch-extension/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/install-transformers-from-src/customize.py b/script/install-transformers-from-src/customize.py index c287139fe..d83e374e3 100644 --- a/script/install-transformers-from-src/customize.py +++ b/script/install-transformers-from-src/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/plug-prebuilt-cudnn-to-cuda/customize.py b/script/plug-prebuilt-cudnn-to-cuda/customize.py index 2beb23e1f..4f495e035 100644 --- a/script/plug-prebuilt-cudnn-to-cuda/customize.py +++ b/script/plug-prebuilt-cudnn-to-cuda/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/plug-prebuilt-cusparselt-to-cuda/customize.py b/script/plug-prebuilt-cusparselt-to-cuda/customize.py index 926267705..20980c022 100644 --- a/script/plug-prebuilt-cusparselt-to-cuda/customize.py +++ b/script/plug-prebuilt-cusparselt-to-cuda/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/prepare-training-data-bert/customize.py b/script/prepare-training-data-bert/customize.py index e2c3907e2..1b0de8e90 100644 --- a/script/prepare-training-data-bert/customize.py +++ b/script/prepare-training-data-bert/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/prepare-training-data-resnet/customize.py b/script/prepare-training-data-resnet/customize.py index ee4c879cc..36fdba4e9 100644 --- a/script/prepare-training-data-resnet/customize.py +++ b/script/prepare-training-data-resnet/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/preprocess-mlperf-inference-submission/customize.py b/script/preprocess-mlperf-inference-submission/customize.py index f4ea74c8d..03f290425 100644 --- a/script/preprocess-mlperf-inference-submission/customize.py +++ b/script/preprocess-mlperf-inference-submission/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import cmind as cm import os from os.path import exists diff --git a/script/print-any-text/customize.py b/script/print-any-text/customize.py index 6437e1c47..ea05b88fc 100644 --- a/script/print-any-text/customize.py +++ b/script/print-any-text/customize.py @@ -1,6 +1,6 @@ # Developer(s): Grigori Fursin -from cmind import utils +from mlc import utils import os diff --git a/script/process-mlperf-accuracy/customize.py b/script/process-mlperf-accuracy/customize.py index 738b21697..844534aae 100644 --- a/script/process-mlperf-accuracy/customize.py +++ b/script/process-mlperf-accuracy/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import cmind as cm import os diff --git a/script/prune-bert-models/customize.py b/script/prune-bert-models/customize.py index ae3a704e9..eac06855d 100644 --- a/script/prune-bert-models/customize.py +++ b/script/prune-bert-models/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/pull-git-repo/customize.py b/script/pull-git-repo/customize.py index 3dfd21e26..2135a1941 100644 --- a/script/pull-git-repo/customize.py +++ b/script/pull-git-repo/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import shutil diff --git a/script/push-csv-to-spreadsheet/customize.py b/script/push-csv-to-spreadsheet/customize.py index 213925e2f..fe99a0b46 100644 --- a/script/push-csv-to-spreadsheet/customize.py +++ b/script/push-csv-to-spreadsheet/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import cmind as cm import os diff --git a/script/push-mlperf-inference-results-to-github/customize.py b/script/push-mlperf-inference-results-to-github/customize.py index 9b2e34e0e..81824c7dc 100644 --- a/script/push-mlperf-inference-results-to-github/customize.py +++ b/script/push-mlperf-inference-results-to-github/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import cmind as cm import os from giturlparse import parse diff --git a/script/remote-run-commands/customize.py b/script/remote-run-commands/customize.py index bd5a0f9db..28f8379a9 100644 --- a/script/remote-run-commands/customize.py +++ b/script/remote-run-commands/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/reproduce-mlperf-octoml-tinyml-results/customize.py b/script/reproduce-mlperf-octoml-tinyml-results/customize.py index 7e9eac690..8f579e8f3 100644 --- a/script/reproduce-mlperf-octoml-tinyml-results/customize.py +++ b/script/reproduce-mlperf-octoml-tinyml-results/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/reproduce-mlperf-training-nvidia/customize.py b/script/reproduce-mlperf-training-nvidia/customize.py index cdc98cc7c..cd78bd8b4 100644 --- a/script/reproduce-mlperf-training-nvidia/customize.py +++ b/script/reproduce-mlperf-training-nvidia/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import shutil diff --git a/script/run-all-mlperf-models/customize.py b/script/run-all-mlperf-models/customize.py index 7887602c0..07460c6be 100644 --- a/script/run-all-mlperf-models/customize.py +++ b/script/run-all-mlperf-models/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/run-docker-container/customize.py b/script/run-docker-container/customize.py index d9518f516..06f0520bc 100644 --- a/script/run-docker-container/customize.py +++ b/script/run-docker-container/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import cmind as cm import os import subprocess diff --git a/script/run-mlperf-automotive-app/customize.py b/script/run-mlperf-automotive-app/customize.py index 14cb9c237..f78e5bb46 100644 --- a/script/run-mlperf-automotive-app/customize.py +++ b/script/run-mlperf-automotive-app/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import json import shutil diff --git a/script/run-mlperf-inference-mobilenet-models/customize.py b/script/run-mlperf-inference-mobilenet-models/customize.py index b6aabca6b..25a0ccf44 100644 --- a/script/run-mlperf-inference-mobilenet-models/customize.py +++ b/script/run-mlperf-inference-mobilenet-models/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import cmind import sys diff --git a/script/run-mlperf-inference-submission-checker/customize.py b/script/run-mlperf-inference-submission-checker/customize.py index dc6cf4bba..a4811146c 100644 --- a/script/run-mlperf-inference-submission-checker/customize.py +++ b/script/run-mlperf-inference-submission-checker/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import cmind as cm import os import subprocess diff --git a/script/run-mlperf-power-client/customize.py b/script/run-mlperf-power-client/customize.py index 49e55c38b..b57eef64c 100644 --- a/script/run-mlperf-power-client/customize.py +++ b/script/run-mlperf-power-client/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import cmind as cm import os import configparser diff --git a/script/run-mlperf-power-server/customize.py b/script/run-mlperf-power-server/customize.py index bcdbe542e..f4d599ef5 100644 --- a/script/run-mlperf-power-server/customize.py +++ b/script/run-mlperf-power-server/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import cmind as cm import os import configparser diff --git a/script/run-mlperf-training-submission-checker/customize.py b/script/run-mlperf-training-submission-checker/customize.py index 606047b51..48b8e7bed 100644 --- a/script/run-mlperf-training-submission-checker/customize.py +++ b/script/run-mlperf-training-submission-checker/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import cmind as cm import os import subprocess diff --git a/script/run-terraform/customize.py b/script/run-terraform/customize.py index b1939f15c..e44a24d2f 100644 --- a/script/run-terraform/customize.py +++ b/script/run-terraform/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import cmind as cm import os import shutil diff --git a/script/run-vllm-server/customize.py b/script/run-vllm-server/customize.py index d9b7a26b0..f8abd76c0 100644 --- a/script/run-vllm-server/customize.py +++ b/script/run-vllm-server/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import subprocess diff --git a/script/runtime-system-infos/customize.py b/script/runtime-system-infos/customize.py index 3428ccf3f..c271bbda2 100644 --- a/script/runtime-system-infos/customize.py +++ b/script/runtime-system-infos/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import shutil # used to measure the system infos(have not tested for obtaining gpu info) diff --git a/script/save-mlperf-inference-implementation-state/customize.py b/script/save-mlperf-inference-implementation-state/customize.py index 07e716955..771e1f34b 100644 --- a/script/save-mlperf-inference-implementation-state/customize.py +++ b/script/save-mlperf-inference-implementation-state/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/set-device-settings-qaic/customize.py b/script/set-device-settings-qaic/customize.py index 3f3e179f7..1e87f2dad 100644 --- a/script/set-device-settings-qaic/customize.py +++ b/script/set-device-settings-qaic/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/set-echo-off-win/customize.py b/script/set-echo-off-win/customize.py index 287737629..ee9f4ef57 100644 --- a/script/set-echo-off-win/customize.py +++ b/script/set-echo-off-win/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/set-performance-mode/customize.py b/script/set-performance-mode/customize.py index 288ebc9c0..61c4f844c 100644 --- a/script/set-performance-mode/customize.py +++ b/script/set-performance-mode/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/set-user-limits/customize.py b/script/set-user-limits/customize.py index ff5767250..22a38fa91 100644 --- a/script/set-user-limits/customize.py +++ b/script/set-user-limits/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/set-venv/customize.py b/script/set-venv/customize.py index 757287bde..4bb0912d4 100644 --- a/script/set-venv/customize.py +++ b/script/set-venv/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/submit-mlperf-results/customize.py b/script/submit-mlperf-results/customize.py index d39b233f3..8f9ab049c 100644 --- a/script/submit-mlperf-results/customize.py +++ b/script/submit-mlperf-results/customize.py @@ -1,5 +1,5 @@ import requests -from cmind import utils +from mlc import utils import cmind as cm import os import json diff --git a/script/tar-my-folder/customize.py b/script/tar-my-folder/customize.py index c1d8498b8..8d3a3791a 100644 --- a/script/tar-my-folder/customize.py +++ b/script/tar-my-folder/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import cmind as cm import os import subprocess diff --git a/script/test-cm-core/customize.py b/script/test-cm-core/customize.py index c3289f345..c394f862f 100644 --- a/script/test-cm-core/customize.py +++ b/script/test-cm-core/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/test-cm-script-pipeline/customize.py b/script/test-cm-script-pipeline/customize.py index d05326d93..f91cfa581 100644 --- a/script/test-cm-script-pipeline/customize.py +++ b/script/test-cm-script-pipeline/customize.py @@ -1,6 +1,6 @@ # Developers: Grigori Fursin -from cmind import utils +from mlc import utils import os diff --git a/script/test-cm-scripts/customize.py b/script/test-cm-scripts/customize.py index 273999d46..3df1d0660 100644 --- a/script/test-cm-scripts/customize.py +++ b/script/test-cm-scripts/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/test-download-and-extract-artifacts/customize.py b/script/test-download-and-extract-artifacts/customize.py index 273999d46..3df1d0660 100644 --- a/script/test-download-and-extract-artifacts/customize.py +++ b/script/test-download-and-extract-artifacts/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/test-dummy/customize.py b/script/test-dummy/customize.py index 273999d46..3df1d0660 100644 --- a/script/test-dummy/customize.py +++ b/script/test-dummy/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/test-mlperf-inference-retinanet/customize.py b/script/test-mlperf-inference-retinanet/customize.py index 1baf6756a..bc9170735 100644 --- a/script/test-mlperf-inference-retinanet/customize.py +++ b/script/test-mlperf-inference-retinanet/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os diff --git a/script/truncate-mlperf-inference-accuracy-log/customize.py b/script/truncate-mlperf-inference-accuracy-log/customize.py index fba057e49..a1011b5fa 100644 --- a/script/truncate-mlperf-inference-accuracy-log/customize.py +++ b/script/truncate-mlperf-inference-accuracy-log/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import cmind as cm import os import subprocess diff --git a/script/wrapper-reproduce-octoml-tinyml-submission/customize.py b/script/wrapper-reproduce-octoml-tinyml-submission/customize.py index 1e5beb50f..460a01159 100644 --- a/script/wrapper-reproduce-octoml-tinyml-submission/customize.py +++ b/script/wrapper-reproduce-octoml-tinyml-submission/customize.py @@ -1,4 +1,4 @@ -from cmind import utils +from mlc import utils import os import cmind as cm From adfbd41228db6efef4388a638fe1971418090f5e Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Sat, 18 Jan 2025 02:31:46 +0530 Subject: [PATCH 18/84] Fixed some downloads via util --- script/download-file/customize.py | 5 ++--- script/install-cmake-prebuilt/customize.py | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/script/download-file/customize.py b/script/download-file/customize.py index d91418c7d..d9691e115 100644 --- a/script/download-file/customize.py +++ b/script/download-file/customize.py @@ -1,7 +1,7 @@ from mlc import utils import os import subprocess - +from utils import * def escape_special_chars(text, tool=None): special_chars = [ @@ -169,8 +169,7 @@ def preprocess(i): if cmutil_require_download == 1: cm = automation.action_object for i in range(1, 5): - r = cm.access({'action': 'download_file', - 'automation': 'utils,dc2743f8450541e3', + r = download_file({ 'url': url, 'verify': verify_ssl}) if r['return'] == 0: diff --git a/script/install-cmake-prebuilt/customize.py b/script/install-cmake-prebuilt/customize.py index d7122df66..8da3c2f43 100644 --- a/script/install-cmake-prebuilt/customize.py +++ b/script/install-cmake-prebuilt/customize.py @@ -1,6 +1,6 @@ from mlc import utils import os - +from utils import download_file def preprocess(i): @@ -72,8 +72,7 @@ def preprocess(i): cm = automation.action_object - r = cm.access({'action': 'download_file', - 'automation': 'utils,dc2743f8450541e3', + r = download_file({ 'url': package_url}) if r['return'] > 0: return r From c6ec4278d96c061526244638f8cca54f1fd0ca0d Mon Sep 17 00:00:00 2001 From: arjunsuresh Date: Fri, 17 Jan 2025 21:02:26 +0000 Subject: [PATCH 19/84] [Automated Commit] Format Codebase --- script/download-file/customize.py | 5 +++-- script/install-cmake-prebuilt/customize.py | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/script/download-file/customize.py b/script/download-file/customize.py index d9691e115..fc237635c 100644 --- a/script/download-file/customize.py +++ b/script/download-file/customize.py @@ -3,6 +3,7 @@ import subprocess from utils import * + def escape_special_chars(text, tool=None): special_chars = [ '&', '|', '(', ')' @@ -170,8 +171,8 @@ def preprocess(i): cm = automation.action_object for i in range(1, 5): r = download_file({ - 'url': url, - 'verify': verify_ssl}) + 'url': url, + 'verify': verify_ssl}) if r['return'] == 0: break oldurl = url diff --git a/script/install-cmake-prebuilt/customize.py b/script/install-cmake-prebuilt/customize.py index 8da3c2f43..1e43d75b3 100644 --- a/script/install-cmake-prebuilt/customize.py +++ b/script/install-cmake-prebuilt/customize.py @@ -2,6 +2,7 @@ import os from utils import download_file + def preprocess(i): os_info = i['os_info'] @@ -73,7 +74,7 @@ def preprocess(i): cm = automation.action_object r = download_file({ - 'url': package_url}) + 'url': package_url}) if r['return'] > 0: return r From 946520cb39d4c8f6b1ad8ac48707116ff26eab78 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Sat, 18 Jan 2025 03:11:06 +0530 Subject: [PATCH 20/84] Fix version compare for mlc --- automation/script/module.py | 36 +++++++++++++----------------------- 1 file changed, 13 insertions(+), 23 deletions(-) diff --git a/automation/script/module.py b/automation/script/module.py index 088f20e4b..e775742da 100644 --- a/automation/script/module.py +++ b/automation/script/module.py @@ -811,13 +811,11 @@ def _run(self, i): # Check min CM version requirement min_mlc_version = meta.get('min_mlc_version', '').strip() if min_mlc_version != '': - # Check compare version while avoiding craches for older version - if 'compare_versions' in dir(utils): - comparison = utils.compare_versions( - current_mlc_version, min_mlc_version) - if comparison < 0: - return {'return': 1, 'error': 'This script requires MLC version >= {} while current MLC version is {} - please update using "pip install mlcflow -U"'.format( - min_mlc_version, current_mlc_version)} + comparison = compare_versions( + current_mlc_version, min_mlc_version) + if comparison < 0: + return {'return': 1, 'error': 'This script requires MLC version >= {} while current MLC version is {} - please update using "pip install mlcflow -U"'.format( + min_mlc_version, current_mlc_version)} # Check path to repo script_repo_path = script_artifact.repo_path @@ -1514,10 +1512,8 @@ def _run(self, i): version = default_version if version_min != '': - ry = self.action_object.access({'action': 'compare_versions', - 'automation': 'utils,dc2743f8450541e3', - 'version1': version, - 'version2': version_min}) + ry = compare_versions({'version1': version, + 'version2': version_min}) if ry['return'] > 0: return ry @@ -1525,10 +1521,8 @@ def _run(self, i): version = version_min if version_max != '': - ry = self.action_object.access({'action': 'compare_versions', - 'automation': 'utils,dc2743f8450541e3', - 'version1': version, - 'version2': version_max}) + ry = compare_versions({'version1': version, + 'version2': version_max}) if ry['return'] > 0: return ry @@ -5350,8 +5344,7 @@ def check_version_constraints(i): skip = True if not skip and detected_version != '' and version_min != '': - ry = action_object.access({'action': 'compare_versions', - 'automation': 'utils,dc2743f8450541e3', + ry = compare_versions({ 'version1': detected_version, 'version2': version_min}) if ry['return'] > 0: @@ -5361,8 +5354,7 @@ def check_version_constraints(i): skip = True if not skip and detected_version != '' and version_max != '': - ry = action_object.access({'action': 'compare_versions', - 'automation': 'utils,dc2743f8450541e3', + ry = compare_versions({ 'version1': detected_version, 'version2': version_max}) if ry['return'] > 0: @@ -6390,8 +6382,7 @@ def check_versions(action_object, cached_script_version, if cached_script_version != '': if version_min != '': - ry = action_object.access({'action': 'compare_versions', - 'automation': 'utils,dc2743f8450541e3', + ry = compare_versions({ 'version1': cached_script_version, 'version2': version_min}) if ry['return'] > 0: @@ -6401,8 +6392,7 @@ def check_versions(action_object, cached_script_version, skip_cached_script = True if not skip_cached_script and version_max != '': - ry = action_object.access({'action': 'compare_versions', - 'automation': 'utils,dc2743f8450541e3', + ry = compare_versions({ 'version1': cached_script_version, 'version2': version_max}) if ry['return'] > 0: From 214a2aa8dd46cce9976b16d6ffa11db6b9d396e7 Mon Sep 17 00:00:00 2001 From: arjunsuresh Date: Fri, 17 Jan 2025 21:41:32 +0000 Subject: [PATCH 21/84] [Automated Commit] Format Codebase --- automation/script/module.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/automation/script/module.py b/automation/script/module.py index e775742da..cab379bfb 100644 --- a/automation/script/module.py +++ b/automation/script/module.py @@ -1513,7 +1513,7 @@ def _run(self, i): if version_min != '': ry = compare_versions({'version1': version, - 'version2': version_min}) + 'version2': version_min}) if ry['return'] > 0: return ry @@ -1522,7 +1522,7 @@ def _run(self, i): if version_max != '': ry = compare_versions({'version1': version, - 'version2': version_max}) + 'version2': version_max}) if ry['return'] > 0: return ry @@ -5345,8 +5345,8 @@ def check_version_constraints(i): if not skip and detected_version != '' and version_min != '': ry = compare_versions({ - 'version1': detected_version, - 'version2': version_min}) + 'version1': detected_version, + 'version2': version_min}) if ry['return'] > 0: return ry @@ -5355,8 +5355,8 @@ def check_version_constraints(i): if not skip and detected_version != '' and version_max != '': ry = compare_versions({ - 'version1': detected_version, - 'version2': version_max}) + 'version1': detected_version, + 'version2': version_max}) if ry['return'] > 0: return ry @@ -6383,8 +6383,8 @@ def check_versions(action_object, cached_script_version, if cached_script_version != '': if version_min != '': ry = compare_versions({ - 'version1': cached_script_version, - 'version2': version_min}) + 'version1': cached_script_version, + 'version2': version_min}) if ry['return'] > 0: return ry @@ -6393,8 +6393,8 @@ def check_versions(action_object, cached_script_version, if not skip_cached_script and version_max != '': ry = compare_versions({ - 'version1': cached_script_version, - 'version2': version_max}) + 'version1': cached_script_version, + 'version2': version_max}) if ry['return'] > 0: return ry From 9c50405232806064d52b27d34750a4af488ee6db Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Sat, 18 Jan 2025 04:26:38 +0530 Subject: [PATCH 22/84] Fixes for app-mlperf-inference for MLC --- script/app-mlperf-automotive/_cm.yaml | 2 +- script/app-mlperf-automotive/customize.py | 28 ++--- script/app-mlperf-inference/_cm.yaml | 2 +- script/app-mlperf-inference/customize.py | 100 +++++++++--------- script/run-mlperf-automotive-app/_cm.yaml | 2 +- script/run-mlperf-automotive-app/customize.py | 8 +- script/run-mlperf-inference-app/_cm.yaml | 2 +- script/run-mlperf-inference-app/customize.py | 8 +- 8 files changed, 75 insertions(+), 77 deletions(-) diff --git a/script/app-mlperf-automotive/_cm.yaml b/script/app-mlperf-automotive/_cm.yaml index cfb22101f..a999c0ee0 100644 --- a/script/app-mlperf-automotive/_cm.yaml +++ b/script/app-mlperf-automotive/_cm.yaml @@ -67,7 +67,7 @@ new_env_keys: - CM_OUTPUT_PREDICTIONS_PATH new_state_keys: - - cm-mlperf-inference-results* + - mlc-mlperf-inference-results* # Dependencies on other CM scripts deps: diff --git a/script/app-mlperf-automotive/customize.py b/script/app-mlperf-automotive/customize.py index 0aed805f7..04019742c 100644 --- a/script/app-mlperf-automotive/customize.py +++ b/script/app-mlperf-automotive/customize.py @@ -76,28 +76,28 @@ def postprocess(i): # result, valid, power_result = mlperf_utils.get_result_from_log(env['CM_MLPERF_LAST_RELEASE'], model, scenario, output_dir, mode) - if not state.get('cm-mlperf-inference-results'): - state['cm-mlperf-inference-results'] = {} - if not state.get('cm-mlperf-inference-results-last'): - state['cm-mlperf-inference-results-last'] = {} - if not state['cm-mlperf-inference-results'].get( + if not state.get('mlc-mlperf-inference-results'): + state['mlc-mlperf-inference-results'] = {} + if not state.get('mlc-mlperf-inference-results-last'): + state['mlc-mlperf-inference-results-last'] = {} + if not state['mlc-mlperf-inference-results'].get( state['CM_SUT_CONFIG_NAME']): - state['cm-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME']] = {} - if not state['cm-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME'] + state['mlc-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME']] = {} + if not state['mlc-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME'] ].get(model): - state['cm-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME']][model] = {} - if not state['cm-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME'] + state['mlc-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME']][model] = {} + if not state['mlc-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME'] ][model].get(scenario): - state['cm-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME'] + state['mlc-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME'] ][model][scenario] = {} - state['cm-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME'] + state['mlc-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME'] ][model][scenario][mode] = result - state['cm-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME'] + state['mlc-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME'] ][model][scenario][mode + '_valid'] = valid.get(mode, False) - state['cm-mlperf-inference-results-last'][mode] = result - state['cm-mlperf-inference-results-last'][mode + + state['mlc-mlperf-inference-results-last'][mode] = result + state['mlc-mlperf-inference-results-last'][mode + '_valid'] = valid.get(mode, False) return {'return': 0} diff --git a/script/app-mlperf-inference/_cm.yaml b/script/app-mlperf-inference/_cm.yaml index 7596b30ef..bf5057814 100644 --- a/script/app-mlperf-inference/_cm.yaml +++ b/script/app-mlperf-inference/_cm.yaml @@ -80,7 +80,7 @@ new_env_keys: new_state_keys: - app_mlperf_inference_* - - cm-mlperf-inference-results* + - mlc-mlperf-inference-results* # Dependencies on other CM scripts deps: diff --git a/script/app-mlperf-inference/customize.py b/script/app-mlperf-inference/customize.py index d0c479e91..d5aa41545 100644 --- a/script/app-mlperf-inference/customize.py +++ b/script/app-mlperf-inference/customize.py @@ -5,7 +5,7 @@ import shutil import subprocess import copy -import cmind as cm +import mlc import platform import sys import mlperf_utils @@ -174,19 +174,19 @@ def postprocess(i): # {model}'} scenario = env['CM_MLPERF_LOADGEN_SCENARIO'] - if not state.get('cm-mlperf-inference-results'): - state['cm-mlperf-inference-results'] = {} - if not state.get('cm-mlperf-inference-results-last'): - state['cm-mlperf-inference-results-last'] = {} - if not state['cm-mlperf-inference-results'].get( + if not state.get('mlc-mlperf-inference-results'): + state['mlc-mlperf-inference-results'] = {} + if not state.get('mlc-mlperf-inference-results-last'): + state['mlc-mlperf-inference-results-last'] = {} + if not state['mlc-mlperf-inference-results'].get( state['CM_SUT_CONFIG_NAME']): - state['cm-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME']] = {} - if not state['cm-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME'] + state['mlc-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME']] = {} + if not state['mlc-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME'] ].get(model): - state['cm-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME']][model] = {} - if not state['cm-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME'] + state['mlc-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME']][model] = {} + if not state['mlc-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME'] ][model].get(scenario): - state['cm-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME'] + state['mlc-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME'] ][model][scenario] = {} # if env.get("CM_MLPERF_FIND_PERFORMANCE_MODE", '') == "yes" and mode == @@ -328,33 +328,33 @@ def postprocess(i): power = power_result_split[0] power_efficiency = power_result_split[1] - state['cm-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME'] + state['mlc-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME'] ][model][scenario][mode] = result - state['cm-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME'] + state['mlc-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME'] ][model][scenario][mode + '_valid'] = valid.get(mode, False) - state['cm-mlperf-inference-results-last'][mode] = result - state['cm-mlperf-inference-results-last'][mode + + state['mlc-mlperf-inference-results-last'][mode] = result + state['mlc-mlperf-inference-results-last'][mode + '_valid'] = valid.get(mode, False) if power: - state['cm-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME'] + state['mlc-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME'] ][model][scenario]['power'] = power - state['cm-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME'] + state['mlc-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME'] ][model][scenario]['power_valid'] = valid['power'] - state['cm-mlperf-inference-results-last']['power'] = power - state['cm-mlperf-inference-results-last']['power_valid'] = valid['power'] + state['mlc-mlperf-inference-results-last']['power'] = power + state['mlc-mlperf-inference-results-last']['power_valid'] = valid['power'] if power_efficiency: - state['cm-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME'] + state['mlc-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME'] ][model][scenario]['power_efficiency'] = power_efficiency - state['cm-mlperf-inference-results-last']['power_efficiency'] = power_efficiency + state['mlc-mlperf-inference-results-last']['power_efficiency'] = power_efficiency # Record basic host info host_info = { "os_version": platform.platform(), "cpu_version": platform.processor(), "python_version": sys.version, - "cm_version": cm.__version__ + "mlc_version": mlc.__version__ } x = '' @@ -371,8 +371,7 @@ def postprocess(i): # Check CM automation repository repo_name = 'mlcommons@mlperf-automations' repo_hash = '' - r = cm.access({'action': 'find', 'automation': 'repo', - 'artifact': 'mlcommons@cm4mlops,9e97bb72b0474657'}) + r = mlc.access({'action': 'find', 'automation': 'repo', 'item': 'mlcommons@mlperf-automations,9e97bb72b0474657'}) if r['return'] == 0 and len(r['list']) == 1: repo_path = r['list'][0].path if os.path.isdir(repo_path): @@ -381,23 +380,22 @@ def postprocess(i): # Check dev # if repo_name == 'cm4mlops': repo_name = 'mlcommons@cm4mlops' - r = cm.access({'action': 'system', - 'automation': 'utils', + r = utils.run_system_cmd({ 'path': repo_path, 'cmd': 'git rev-parse HEAD'}) - if r['return'] == 0 and r['ret'] == 0: - repo_hash = r['stdout'] + if r['return'] == 0: + repo_hash = r['output'] - host_info['cm_repo_name'] = repo_name - host_info['cm_repo_git_hash'] = repo_hash + host_info['mlc_repo_name'] = repo_name + host_info['mlc_repo_git_hash'] = repo_hash - with open("cm-host-info.json", "w") as fp: + with open("mlc-host-info.json", "w") as fp: fp.write(json.dumps(host_info, indent=2) + '\n') # Prepare README if "cmd" in inp: - cmd = "cm run script \\\n\t" + " \\\n\t".join(inp['cmd']) - xcmd = "cm run script " + xsep + "\n\t" + \ + cmd = "mlc run script \\\n\t" + " \\\n\t".join(inp['cmd']) + xcmd = "mlc run script " + xsep + "\n\t" + \ (" " + xsep + "\n\t").join(inp['cmd']) else: cmd = "" @@ -405,31 +403,31 @@ def postprocess(i): readme_init = "*Check [CM MLPerf docs](https://docs.mlcommons.org/inference) for more details.*\n\n" - readme_body = "## Host platform\n\n* OS version: {}\n* CPU version: {}\n* Python version: {}\n* MLCommons CM version: {}\n\n".format(platform.platform(), - platform.processor(), sys.version, cm.__version__) + readme_body = "## Host platform\n\n* OS version: {}\n* CPU version: {}\n* Python version: {}\n* MLC version: {}\n\n".format(platform.platform(), + platform.processor(), sys.version, mlc.__version__) x = repo_name if repo_hash != '': x += ' --checkout=' + str(repo_hash) readme_body += "## CM Run Command\n\nSee [CM installation guide](https://docs.mlcommons.org/inference/install/).\n\n" + \ - "```bash\npip install -U cmind\n\ncm rm cache -f\n\ncm pull repo {}\n\n{}\n```".format( + "```bash\npip install -U mlcflow\n\nmlc rm cache -f\n\nmlc pull repo {}\n\n{}\n```".format( x, xcmd) - readme_body += "\n*Note that if you want to use the [latest automation recipes](https://docs.mlcommons.org/inference) for MLPerf (CM scripts),\n" + \ - " you should simply reload {} without checkout and clean CM cache as follows:*\n\n".format(repo_name) + \ - "```bash\ncm rm repo {}\ncm pull repo {}\ncm rm cache -f\n\n```".format( + readme_body += "\n*Note that if you want to use the [latest automation recipes](https://docs.mlcommons.org/inference) for MLPerf,\n" + \ + " you should simply reload {} without checkout and clean MLC cache as follows:*\n\n".format(repo_name) + \ + "```bash\nmlc rm repo {}\nmlc pull repo {}\nmlc rm cache -f\n\n```".format( repo_name, repo_name) extra_readme_init = '' extra_readme_body = '' - if env.get('CM_MLPERF_README', '') == "yes": - extra_readme_body += "\n## Dependent CM scripts\n\n" + if env.get('MLC_MLPERF_README', '') == "yes": + extra_readme_body += "\n## Dependent MLPerf Automation scripts\n\n" script_tags = inp['tags'] script_adr = inp.get('adr', {}) - cm_input = {'action': 'run', + mlc_input = {'action': 'run', 'automation': 'script', 'tags': script_tags, 'adr': script_adr, @@ -439,7 +437,7 @@ def postprocess(i): 'silent': True, 'fake_run': True } - r = cm.access(cm_input) + r = mlc.access(mlc_input) if r['return'] > 0: return r @@ -452,7 +450,7 @@ def postprocess(i): if state.get( 'mlperf-inference-implementation') and state['mlperf-inference-implementation'].get('print_deps'): - extra_readme_body += "\n## Dependent CM scripts for the MLPerf Inference Implementation\n" + extra_readme_body += "\n## Dependent automation scripts for the MLPerf Inference Implementation\n" print_deps = state['mlperf-inference-implementation']['print_deps'] count = 1 @@ -556,7 +554,7 @@ def postprocess(i): import submission_checker as checker is_valid = checker.check_compliance_perf_dir( COMPLIANCE_DIR) if test != "TEST06" else True - state['cm-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME'] + state['mlc-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME'] ][model][scenario][test] = "passed" if is_valid else "failed" # portion of the code where the avg utilisation and system informations are extracted @@ -611,12 +609,12 @@ def postprocess(i): if state.get( 'mlperf-inference-implementation') and state['mlperf-inference-implementation'].get('version_info'): env['CM_MLPERF_RUN_JSON_VERSION_INFO_FILE'] = os.path.join( - output_dir, "cm-version-info.json") + output_dir, "mlc-version-info.json") env['CM_MLPERF_RUN_DEPS_GRAPH'] = os.path.join( - output_dir, "cm-deps.png") + output_dir, "mlc-deps.png") env['CM_MLPERF_RUN_DEPS_MERMAID'] = os.path.join( - output_dir, "cm-deps.mmd") - with open(os.path.join(output_dir, "cm-version-info.json"), "w") as f: + output_dir, "mlc-deps.mmd") + with open(os.path.join(output_dir, "mlc-version-info.json"), "w") as f: f.write( json.dumps( state['mlperf-inference-implementation']['version_info'], @@ -655,7 +653,7 @@ def postprocess(i): def dump_script_output(script_tags, env, state, output_key, dump_file): - cm_input = {'action': 'run', + mlc_input = {'action': 'run', 'automation': 'script', 'tags': script_tags, 'env': env, @@ -663,7 +661,7 @@ def dump_script_output(script_tags, env, state, output_key, dump_file): 'quiet': True, 'silent': True, } - r = cm.access(cm_input) + r = mlc.access(mlc_input) if r['return'] > 0: return r with open(dump_file, "w") as f: diff --git a/script/run-mlperf-automotive-app/_cm.yaml b/script/run-mlperf-automotive-app/_cm.yaml index 942f499e8..83bf6a1cb 100644 --- a/script/run-mlperf-automotive-app/_cm.yaml +++ b/script/run-mlperf-automotive-app/_cm.yaml @@ -89,7 +89,7 @@ input_mapping: new_state_keys: - app_mlperf_inference_* -- cm-mlperf-inference-results* +- mlc-mlperf-inference-results* deps: - tags: detect,os diff --git a/script/run-mlperf-automotive-app/customize.py b/script/run-mlperf-automotive-app/customize.py index f78e5bb46..970b15854 100644 --- a/script/run-mlperf-automotive-app/customize.py +++ b/script/run-mlperf-automotive-app/customize.py @@ -284,9 +284,9 @@ def preprocess(i): if state.get('docker', {}): del (state['docker']) - if state.get("cm-mlperf-inference-results"): - # print(state["cm-mlperf-inference-results"]) - for sut in state["cm-mlperf-inference-results"]: # only one sut will be there + if state.get("mlc-mlperf-inference-results"): + # print(state["mlc-mlperf-inference-results"]) + for sut in state["mlc-mlperf-inference-results"]: # only one sut will be there # Better to do this in a stand alone CM script with proper deps but # currently we manage this by modifying the sys path of the python # executing CM @@ -294,7 +294,7 @@ def preprocess(i): print(sut) result_table, headers = mlperf_utils.get_result_table( - state["cm-mlperf-inference-results"][sut]) + state["mlc-mlperf-inference-results"][sut]) print(tabulate(result_table, headers=headers, tablefmt="pretty")) print( diff --git a/script/run-mlperf-inference-app/_cm.yaml b/script/run-mlperf-inference-app/_cm.yaml index a8f7b75b8..812e9eeba 100644 --- a/script/run-mlperf-inference-app/_cm.yaml +++ b/script/run-mlperf-inference-app/_cm.yaml @@ -122,7 +122,7 @@ input_mapping: new_state_keys: - app_mlperf_inference_* -- cm-mlperf-inference-results* +- mlc-mlperf-inference-results* deps: - tags: detect,os diff --git a/script/run-mlperf-inference-app/customize.py b/script/run-mlperf-inference-app/customize.py index 7160945fa..82d493993 100644 --- a/script/run-mlperf-inference-app/customize.py +++ b/script/run-mlperf-inference-app/customize.py @@ -320,9 +320,9 @@ def preprocess(i): CMD = f"docker kill {container_id}" docker_out = subprocess.check_output(CMD, shell=True).decode("utf-8") - if state.get("cm-mlperf-inference-results"): - # print(state["cm-mlperf-inference-results"]) - for sut in state["cm-mlperf-inference-results"]: # only one sut will be there + if state.get("mlc-mlperf-inference-results"): + # print(state["mlc-mlperf-inference-results"]) + for sut in state["mlc-mlperf-inference-results"]: # only one sut will be there # Better to do this in a stand alone CM script with proper deps but # currently we manage this by modifying the sys path of the python # executing CM @@ -330,7 +330,7 @@ def preprocess(i): print(sut) result_table, headers = mlperf_utils.get_result_table( - state["cm-mlperf-inference-results"][sut]) + state["mlc-mlperf-inference-results"][sut]) print(tabulate(result_table, headers=headers, tablefmt="pretty")) print( From baee3dded14652ea45861330f8622d06c9f95358 Mon Sep 17 00:00:00 2001 From: arjunsuresh Date: Fri, 17 Jan 2025 22:57:05 +0000 Subject: [PATCH 23/84] [Automated Commit] Format Codebase --- script/app-mlperf-automotive/customize.py | 12 ++--- script/app-mlperf-inference/customize.py | 61 ++++++++++++----------- 2 files changed, 37 insertions(+), 36 deletions(-) diff --git a/script/app-mlperf-automotive/customize.py b/script/app-mlperf-automotive/customize.py index 04019742c..a9ea896d6 100644 --- a/script/app-mlperf-automotive/customize.py +++ b/script/app-mlperf-automotive/customize.py @@ -84,20 +84,20 @@ def postprocess(i): state['CM_SUT_CONFIG_NAME']): state['mlc-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME']] = {} if not state['mlc-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME'] - ].get(model): + ].get(model): state['mlc-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME']][model] = {} if not state['mlc-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME'] - ][model].get(scenario): + ][model].get(scenario): state['mlc-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME'] - ][model][scenario] = {} + ][model][scenario] = {} state['mlc-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME'] - ][model][scenario][mode] = result + ][model][scenario][mode] = result state['mlc-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME'] - ][model][scenario][mode + '_valid'] = valid.get(mode, False) + ][model][scenario][mode + '_valid'] = valid.get(mode, False) state['mlc-mlperf-inference-results-last'][mode] = result state['mlc-mlperf-inference-results-last'][mode + - '_valid'] = valid.get(mode, False) + '_valid'] = valid.get(mode, False) return {'return': 0} diff --git a/script/app-mlperf-inference/customize.py b/script/app-mlperf-inference/customize.py index d5aa41545..976f5124b 100644 --- a/script/app-mlperf-inference/customize.py +++ b/script/app-mlperf-inference/customize.py @@ -182,12 +182,12 @@ def postprocess(i): state['CM_SUT_CONFIG_NAME']): state['mlc-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME']] = {} if not state['mlc-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME'] - ].get(model): + ].get(model): state['mlc-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME']][model] = {} if not state['mlc-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME'] - ][model].get(scenario): + ][model].get(scenario): state['mlc-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME'] - ][model][scenario] = {} + ][model][scenario] = {} # if env.get("CM_MLPERF_FIND_PERFORMANCE_MODE", '') == "yes" and mode == # "performance" and scenario != "Server": @@ -329,24 +329,24 @@ def postprocess(i): power_efficiency = power_result_split[1] state['mlc-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME'] - ][model][scenario][mode] = result + ][model][scenario][mode] = result state['mlc-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME'] - ][model][scenario][mode + '_valid'] = valid.get(mode, False) + ][model][scenario][mode + '_valid'] = valid.get(mode, False) state['mlc-mlperf-inference-results-last'][mode] = result state['mlc-mlperf-inference-results-last'][mode + - '_valid'] = valid.get(mode, False) + '_valid'] = valid.get(mode, False) if power: state['mlc-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME'] - ][model][scenario]['power'] = power + ][model][scenario]['power'] = power state['mlc-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME'] - ][model][scenario]['power_valid'] = valid['power'] + ][model][scenario]['power_valid'] = valid['power'] state['mlc-mlperf-inference-results-last']['power'] = power state['mlc-mlperf-inference-results-last']['power_valid'] = valid['power'] if power_efficiency: state['mlc-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME'] - ][model][scenario]['power_efficiency'] = power_efficiency + ][model][scenario]['power_efficiency'] = power_efficiency state['mlc-mlperf-inference-results-last']['power_efficiency'] = power_efficiency # Record basic host info @@ -371,7 +371,8 @@ def postprocess(i): # Check CM automation repository repo_name = 'mlcommons@mlperf-automations' repo_hash = '' - r = mlc.access({'action': 'find', 'automation': 'repo', 'item': 'mlcommons@mlperf-automations,9e97bb72b0474657'}) + r = mlc.access({'action': 'find', 'automation': 'repo', + 'item': 'mlcommons@mlperf-automations,9e97bb72b0474657'}) if r['return'] == 0 and len(r['list']) == 1: repo_path = r['list'][0].path if os.path.isdir(repo_path): @@ -381,8 +382,8 @@ def postprocess(i): # if repo_name == 'cm4mlops': repo_name = 'mlcommons@cm4mlops' r = utils.run_system_cmd({ - 'path': repo_path, - 'cmd': 'git rev-parse HEAD'}) + 'path': repo_path, + 'cmd': 'git rev-parse HEAD'}) if r['return'] == 0: repo_hash = r['output'] @@ -404,7 +405,7 @@ def postprocess(i): readme_init = "*Check [CM MLPerf docs](https://docs.mlcommons.org/inference) for more details.*\n\n" readme_body = "## Host platform\n\n* OS version: {}\n* CPU version: {}\n* Python version: {}\n* MLC version: {}\n\n".format(platform.platform(), - platform.processor(), sys.version, mlc.__version__) + platform.processor(), sys.version, mlc.__version__) x = repo_name if repo_hash != '': @@ -428,15 +429,15 @@ def postprocess(i): script_adr = inp.get('adr', {}) mlc_input = {'action': 'run', - 'automation': 'script', - 'tags': script_tags, - 'adr': script_adr, - 'print_deps': True, - 'env': env, - 'quiet': True, - 'silent': True, - 'fake_run': True - } + 'automation': 'script', + 'tags': script_tags, + 'adr': script_adr, + 'print_deps': True, + 'env': env, + 'quiet': True, + 'silent': True, + 'fake_run': True + } r = mlc.access(mlc_input) if r['return'] > 0: return r @@ -555,7 +556,7 @@ def postprocess(i): is_valid = checker.check_compliance_perf_dir( COMPLIANCE_DIR) if test != "TEST06" else True state['mlc-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME'] - ][model][scenario][test] = "passed" if is_valid else "failed" + ][model][scenario][test] = "passed" if is_valid else "failed" # portion of the code where the avg utilisation and system informations are extracted # NOTE: The section is under development and print statements are added @@ -654,13 +655,13 @@ def postprocess(i): def dump_script_output(script_tags, env, state, output_key, dump_file): mlc_input = {'action': 'run', - 'automation': 'script', - 'tags': script_tags, - 'env': env, - 'state': state, - 'quiet': True, - 'silent': True, - } + 'automation': 'script', + 'tags': script_tags, + 'env': env, + 'state': state, + 'quiet': True, + 'silent': True, + } r = mlc.access(mlc_input) if r['return'] > 0: return r From 1818571bf2b0998a7d8b59efa6fa16d8543a7b05 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Sat, 18 Jan 2025 16:50:10 +0530 Subject: [PATCH 24/84] Log output fix for MLC --- automation/script/module.py | 103 +++++++++++------------------------- 1 file changed, 30 insertions(+), 73 deletions(-) diff --git a/automation/script/module.py b/automation/script/module.py index cab379bfb..aac77aacf 100644 --- a/automation/script/module.py +++ b/automation/script/module.py @@ -191,7 +191,7 @@ def run(self, i): (print_readme) (bool): if True, will print README with all CM steps (deps) to run a given script - (script_call_prefix) (str): how to call script in logs and READMEs (cm run script) + (script_call_prefix) (str): how to call script in logs and READMEs (mlc run script) (skip_sys_utils) (bool): if True, set env['CM_SKIP_SYS_UTILS']='yes' to skip CM sys installation @@ -293,15 +293,6 @@ def _run(self, i): 'append_lists': True, 'append_unique': True}) - # Check simplified CMD: cm run script "get compiler" - # If artifact has spaces, treat them as tags! - artifact = i.get('artifact', '') - if ' ' in artifact: # or ',' in artifact: - del (i['artifact']) - if 'parsed_artifact' in i: - del (i['parsed_artifact']) - # Force substitute tags - i['tags'] = artifact.replace(' ', ',') # Check if has extra tags as a second artifact # Example: cmr . "_python _tiny" @@ -563,71 +554,46 @@ def _run(self, i): variation_tags = r['variation_tags'] -# # Print what was searched! -# cm_script_info = 'CM script' -# -# x = 'with' -# if parsed_script_alias !='' : -# cm_script_info += ' '+x+' alias "{}"'.format(parsed_script_alias) -# x = 'and' -# -# if len(script_tags)>0: -# cm_script_info += ' '+x+' tags "{}"'.format(script_tags_string.replace(',',' ')) -# x = 'and' -# -# if len(variation_tags)>0: -# x_variation_tags = ['_'+v for v in variation_tags] -# cm_script_info += ' '+x+' variations "{}"'.format(" ".join(x_variation_tags)) -# -# if verbose: -# logging.info('') -# logging.info(recursion_spaces + '* Searching for ' + cm_script_info) -# else: -# logging.info(recursion_spaces + '* Running ' + cm_script_info) - - cm_script_info = i.get('script_call_prefix', '').strip() - if cm_script_info == '': - cm_script_info = 'cm run script' - if not cm_script_info.endswith(' '): - cm_script_info += ' ' - - x = '"' - y = ' ' + mlc_script_info = i.get('script_call_prefix', '').strip() + if mlc_script_info == '': + mlc_script_info = 'mlc run script' + if not mlc_script_info.endswith(' '): + mlc_script_info += ' ' + + x = '--tags=' + y = ',' if parsed_script_alias != '': - cm_script_info += parsed_script_alias - x = ' --tags="' - y = ',' + mlc_script_info += parsed_script_alias + x = '--tags="' if len(script_tags) > 0 or len(variation_tags) > 0: - cm_script_info += x + mlc_script_info += x if len(script_tags) > 0: - cm_script_info += script_tags_string.replace(',', y) + mlc_script_info += script_tags_string if len(variation_tags) > 0: if len(script_tags) > 0: - cm_script_info += ' ' + mlc_script_info += ',' x_variation_tags = ['_' + v for v in variation_tags] - cm_script_info += y.join(x_variation_tags) - - cm_script_info += '"' + mlc_script_info += y.join(x_variation_tags) # if verbose: # logging.info('') if not run_state.get('tmp_silent', False): - logging.info(recursion_spaces + '* ' + cm_script_info) + logging.info(recursion_spaces + '* ' + mlc_script_info) ####################################################################### # Report if scripts were not found or there is an ambiguity with UIDs if not r['found_scripts']: return { - 'return': 1, 'error': 'no scripts were found with above tags (when variations ignored)'} + 'return': 1, 'error': f"""no scripts were found with tags: {tags_string} (when variations ignored)"""} if len(list_of_found_scripts) == 0: return { - 'return': 16, 'error': 'no scripts were found with above tags and variations\n' + r.get('warning', '')} + 'return': 16, 'error': f"""no scripts were found with tags: {tags_string} \n {r.get('warning', '')}"""} # Sometimes there is an ambiguity when someone adds a script # while duplicating a UID. In such case, we will return >1 script @@ -737,7 +703,7 @@ def _run(self, i): if len(list_of_found_scripts) > 0: # If only tags are used, check if there are no cached scripts with tags - then we will reuse them - # The use case: cm run script --tags=get,compiler + # The use case: mlc run script --tags=get,compiler # CM script will always ask to select gcc,llvm,etc even if any of # them will be already cached if len(cache_list) > 0: @@ -2807,15 +2773,6 @@ def search(self, i): console = i.get('out') == 'con' - # Check simplified CMD: cm run script "get compiler" - # If artifact has spaces, treat them as tags! - artifact = i.get('artifact', '') - if ' ' in artifact: # or ',' in artifact: - del (i['artifact']) - if 'parsed_artifact' in i: - del (i['parsed_artifact']) - # Force substitute tags - i['tags'] = artifact.replace(' ', ',') ####################################################################### # Process tags to find script(s) and separate variations @@ -3838,10 +3795,10 @@ def _get_readme(self, cmd_parts, run_state): content += """ *This README was automatically generated.* -## Install CM +## Install MLC ```bash -pip install cm4mlops +pip install mlcflow ``` Check [this readme](https://github.com/mlcommons/ck/blob/master/docs/installation.md) @@ -3850,20 +3807,20 @@ def _get_readme(self, cmd_parts, run_state): """ - current_cm_repo = run_state['script_repo_alias'] - if current_cm_repo not in [ - 'mlcommons@mlperf-automations', 'mlcommons@cm4mlops']: - content += '\ncm pull repo ' + \ + current_mlc_repo = run_state['script_repo_alias'] + if current_mlc_repo not in [ + 'mlcommons@mlperf-automations']: + content += '\nmlc pull repo ' + \ run_state['script_repo_alias'] + '\n' content += """``` -## Run CM script +## Run Automation script ```bash """ - cmd = "cm run script " + cmd = "mlc run script " for cmd_part in cmd_parts: x = '"' if ' ' in cmd_part and not cmd_part.startswith('-') else '' @@ -3873,7 +3830,7 @@ def _get_readme(self, cmd_parts, run_state): content += """``` -## Run individual CM scripts to customize dependencies (optional) +## Run individual Automation scripts to customize dependencies (optional) """ deps_ = '' @@ -3886,7 +3843,7 @@ def _get_readme(self, cmd_parts, run_state): xversion = ' --version={}\n'.format(version) content += "```bash\n" - content += "cm run script --tags=" + \ + content += "mlc run script --tags=" + \ dep_tags + "{}\n".format(xversion) content += "```\n\n" @@ -3949,7 +3906,7 @@ def _get_deps_run_cmds(self, deps): run_cmds = [] for dep_tags in deps: - run_cmds.append("cm run script --tags=" + dep_tags) + run_cmds.append("mlc run script --tags=" + dep_tags) return run_cmds From f03f9f3292964d0c619cc4bf85616363a56a386f Mon Sep 17 00:00:00 2001 From: arjunsuresh Date: Sat, 18 Jan 2025 11:20:34 +0000 Subject: [PATCH 25/84] [Automated Commit] Format Codebase --- automation/script/module.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/automation/script/module.py b/automation/script/module.py index aac77aacf..ca6584c6b 100644 --- a/automation/script/module.py +++ b/automation/script/module.py @@ -293,7 +293,6 @@ def _run(self, i): 'append_lists': True, 'append_unique': True}) - # Check if has extra tags as a second artifact # Example: cmr . "_python _tiny" @@ -593,7 +592,7 @@ def _run(self, i): if len(list_of_found_scripts) == 0: return { - 'return': 16, 'error': f"""no scripts were found with tags: {tags_string} \n {r.get('warning', '')}"""} + 'return': 16, 'error': f"""no scripts were found with tags: {tags_string} \n {r.get('warning', '')}"""} # Sometimes there is an ambiguity when someone adds a script # while duplicating a UID. In such case, we will return >1 script @@ -2773,7 +2772,6 @@ def search(self, i): console = i.get('out') == 'con' - ####################################################################### # Process tags to find script(s) and separate variations # (not needed to find scripts) From 2df690b37b4ba9d0aee9505c02f8464b8086063a Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Sat, 18 Jan 2025 14:58:37 +0000 Subject: [PATCH 26/84] Update and rename cmr.yaml to meta.yaml --- cmr.yaml | 12 ------------ meta.yaml | 6 ++++++ 2 files changed, 6 insertions(+), 12 deletions(-) delete mode 100644 cmr.yaml create mode 100644 meta.yaml diff --git a/cmr.yaml b/cmr.yaml deleted file mode 100644 index 226fd06b6..000000000 --- a/cmr.yaml +++ /dev/null @@ -1,12 +0,0 @@ -alias: mlcommons@cm4mlops -uid: 9e97bb72b0474657 - -git: true - -version: 2.3.9 - -deps: - - alias: mlcommons@ck - uid: a4705959af8e447a - conflict: True - diff --git a/meta.yaml b/meta.yaml new file mode 100644 index 000000000..8bd366bc7 --- /dev/null +++ b/meta.yaml @@ -0,0 +1,6 @@ +alias: mlcommons@mlperf-automation +uid: 9cf241afa6074c89 + +git: true + +version: 0.0.1 From 1e28fdab780d1a33df61bd0f39b8f9039608c6b8 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Sat, 18 Jan 2025 14:58:48 +0000 Subject: [PATCH 27/84] Update meta.yaml --- meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta.yaml b/meta.yaml index 8bd366bc7..d9d752ffc 100644 --- a/meta.yaml +++ b/meta.yaml @@ -1,4 +1,4 @@ -alias: mlcommons@mlperf-automation +alias: mlcommons@mlperf-automations uid: 9cf241afa6074c89 git: true From b1fe9d4e220b15d8e560318763a27611e6a3747e Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Sun, 19 Jan 2025 00:36:12 +0530 Subject: [PATCH 28/84] Fixed mlc imports for scripts --- .../app-mlperf-inference/build_dockerfiles.py | 12 ++++---- script/build-dockerfile/customize.py | 24 +++++++-------- .../customize.py | 3 +- .../customize.py | 16 +++++----- .../generate-mlperf-tiny-report/customize.py | 3 +- script/get-generic-python-lib/customize.py | 1 - .../customize.py | 1 - .../customize.py | 1 - script/process-mlperf-accuracy/customize.py | 1 - script/push-csv-to-spreadsheet/customize.py | 1 - .../customize.py | 1 - script/run-docker-container/customize.py | 8 ++--- script/run-mlperf-automotive-app/customize.py | 6 ++-- .../run-mlperf-inference-app/run_mobilenet.py | 8 ++--- .../customize.py | 30 +++++++++---------- script/run-mlperf-power-client/customize.py | 1 - script/run-mlperf-power-server/customize.py | 1 - .../customize.py | 1 - script/run-terraform/customize.py | 10 +++---- .../customize.py | 6 ++-- script/submit-mlperf-results/customize.py | 1 - script/tar-my-folder/customize.py | 1 - 22 files changed, 61 insertions(+), 76 deletions(-) diff --git a/script/app-mlperf-inference/build_dockerfiles.py b/script/app-mlperf-inference/build_dockerfiles.py index 72aeaf766..0a495bceb 100644 --- a/script/app-mlperf-inference/build_dockerfiles.py +++ b/script/app-mlperf-inference/build_dockerfiles.py @@ -1,4 +1,4 @@ -import cmind +import mlc import os import pathlib current_file_path = pathlib.Path(__file__).parent.resolve() @@ -64,7 +64,7 @@ version + file_name_ext + '.Dockerfile') - cm_input = {'action': 'run', + mlc_input = {'action': 'run', 'automation': 'script', 'tags': 'app,mlperf,inference,generic' + variation_string, 'adr': {'compiler': @@ -79,26 +79,26 @@ 'silent': True, 'fake_run': True } - r = cmind.access(cm_input) + r = mlc.access(mlc_input) print_deps = r['new_state']['print_deps'] comments = ["#RUN " + dep for dep in print_deps] comments.append("") comments.append( "# Run CM workflow for MLPerf inference") - cm_docker_input = {'action': 'run', + mlc_docker_input = {'action': 'run', 'automation': 'script', 'tags': 'build,dockerfile', 'docker_os': _os, 'docker_os_version': version, 'file_path': dockerfile_path, 'comments': comments, - 'run_cmd': 'cm run script --tags=app,mlperf,inference,generic' + variation_string + ' --adr.compiler.tags=gcc --adr.inference-src.tags=_octoml', + 'run_cmd': 'mlc run script --tags=app,mlperf,inference,generic' + variation_string + ' --adr.compiler.tags=gcc --adr.inference-src.tags=_octoml', 'script_tags': 'app,mlperf,inference,generic', 'quiet': True, 'print_deps': True, 'real_run': True } - r = cmind.access(cm_docker_input) + r = mlc.access(mlc_docker_input) if r['return'] > 0: print(r) exit(1) diff --git a/script/build-dockerfile/customize.py b/script/build-dockerfile/customize.py index 022e0a9d7..d09307c40 100644 --- a/script/build-dockerfile/customize.py +++ b/script/build-dockerfile/customize.py @@ -27,7 +27,7 @@ def preprocess(i): if env.get('CM_DOCKER_RUN_SCRIPT_TAGS', '') != '': script_tags = env['CM_DOCKER_RUN_SCRIPT_TAGS'] - found_scripts = cm.access( + found_scripts = mlc.access( {'action': 'search', 'automation': 'script', 'tags': script_tags}) scripts_list = found_scripts['list'] @@ -61,18 +61,18 @@ def preprocess(i): 'return': 1, 'error': f"Version \"{env['CM_DOCKER_OS_VERSION']}\" is not supported yet for \"{env['CM_DOCKER_OS']}\" "} # Handle cm_mlops Repository - if env.get("CM_REPO_PATH", "") != "": + if env.get("MLC_REPO_PATH", "") != "": use_copy_repo = True - cm_repo_path = os.path.abspath(env["CM_REPO_PATH"]) + mlc_repo_path = os.path.abspath(env["MLC_REPO_PATH"]) - if not os.path.exists(cm_repo_path): + if not os.path.exists(mlc_repo_path): return { - 'return': 1, 'error': f"Specified CM_REPO_PATH does not exist: {cm_repo_path}"} + 'return': 1, 'error': f"Specified MLC_REPO_PATH does not exist: {mlc_repo_path}"} - cmr_yml_path = os.path.join(cm_repo_path, "cmr.yaml") - if not os.path.isfile(cmr_yml_path): + meta_yml_path = os.path.join(mlc_repo_path, "meta.yaml") + if not os.path.isfile(meta_yml_path): return { - 'return': 1, 'error': f"cmr.yaml not found in CM_REPO_PATH: {cm_repo_path}"} + 'return': 1, 'error': f"meta.yaml not found in MLC_REPO_PATH: {mlc_repo_path}"} # Define the build context directory (where the Dockerfile will be) build_context_dir = os.path.dirname( @@ -83,8 +83,8 @@ def preprocess(i): "Dockerfile"))) os.makedirs(build_context_dir, exist_ok=True) - # Create cm_repo directory relative to the build context - repo_build_context_path = os.path.join(build_context_dir, "cm_repo") + # Create mlc_repo directory relative to the build context + repo_build_context_path = os.path.join(build_context_dir, "mlc_repo") # Remove existing directory if it exists if os.path.exists(repo_build_context_path): @@ -108,12 +108,12 @@ def preprocess(i): 'return': 1, 'error': f"cm_repo was not successfully copied to the build context at {repo_build_context_path}"} else: print( - f"cm_repo is present in the build context at {repo_build_context_path}") + f"mlc_repo is present in the build context at {repo_build_context_path}") relative_repo_path = os.path.relpath( repo_build_context_path, build_context_dir) else: - # CM_REPO_PATH is not set; use cm pull repo as before + # MLC_REPO_PATH is not set; use mlc pull repo as before use_copy_repo = False if env.get("CM_MLOPS_REPO", "") != "": diff --git a/script/clean-nvidia-mlperf-inference-scratch-space/customize.py b/script/clean-nvidia-mlperf-inference-scratch-space/customize.py index 1d4838f7f..2fa0c7f84 100644 --- a/script/clean-nvidia-mlperf-inference-scratch-space/customize.py +++ b/script/clean-nvidia-mlperf-inference-scratch-space/customize.py @@ -1,6 +1,5 @@ from mlc import utils import os -import cmind as cm def preprocess(i): @@ -33,7 +32,7 @@ def preprocess(i): cache_rm_tags = cache_rm_tags + extra_cache_rm_tags if cache_rm_tags: - r = cm.access({'action': 'rm', 'automation': 'cache', + r = mlc.access({'action': 'rm', 'automation': 'cache', 'tags': cache_rm_tags, 'f': True}) print(r) if r['return'] != 0 and r['return'] != 16: # ignore missing ones diff --git a/script/generate-mlperf-inference-submission/customize.py b/script/generate-mlperf-inference-submission/customize.py index ff72ca6f5..2e4a277fc 100644 --- a/script/generate-mlperf-inference-submission/customize.py +++ b/script/generate-mlperf-inference-submission/customize.py @@ -2,7 +2,7 @@ import os import json import shutil -import cmind +import mlc import sys from tabulate import tabulate import mlperf_utils @@ -203,19 +203,19 @@ def generate_submission(env, state, inp, submission_division): # check whether the root folder contains the sut infos # if yes then there is no need to check for meta files inside # individual model folders - if "cm-sut-info.json" in os.listdir(result_path): + if "mlc-sut-info.json" in os.listdir(result_path): sut_info = fill_from_json( os.path.join( result_path, - "cm-sut-info.json"), + "mlc-sut-info.json"), sut_info.keys(), sut_info) if sut_info == -1: return { - 'return': 1, 'error': f"key value mismatch. Refer the populating dictionary:\n{sut_info}\n and file {os.path.join(result_path, 'cm-sut-info.json')}"} + 'return': 1, 'error': f"key value mismatch. Refer the populating dictionary:\n{sut_info}\n and file {os.path.join(result_path, 'mlc-sut-info.json')}"} if check_dict_filled(sut_info.keys(), sut_info): print( - f"sut info completely filled from {os.path.join(result_path, 'cm-sut-info.json')}!") + f"sut info completely filled from {os.path.join(result_path, 'mlc-sut-info.json')}!") # Check whether the root folder contains the model mapping file # expects json file in the format: @@ -597,7 +597,7 @@ def generate_submission(env, state, inp, submission_division): files.append(f) elif f == "spl.txt": files.append(f) - elif f in ["README.md", "README-extra.md", "cm-version-info.json", "os_info.json", "cpu_info.json", "pip_freeze.json", "system_info.txt", "cm-deps.png", "cm-deps.mmd"] and mode == "performance": + elif f in ["README.md", "README-extra.md", "mlc-version-info.json", "os_info.json", "cpu_info.json", "pip_freeze.json", "system_info.txt", "mlc-deps.png", "mlc-deps.mmd"] and mode == "performance": shutil.copy( os.path.join( result_mode_path, f), os.path.join( @@ -694,13 +694,13 @@ def generate_submission(env, state, inp, submission_division): "system_info.txt")) else: if env.get('CM_GET_PLATFORM_DETAILS', '') == "yes": - cm_input = {'action': 'run', + mlc_input = {'action': 'run', 'automation': 'script', 'tags': 'get,platform,details', 'env': {'CM_PLATFORM_DETAILS_FILE_PATH': os.path.join(measurement_path, "system_info.txt")}, 'quiet': True } - r = cmind.access(cm_input) + r = mlc.access(mlc_input) if r['return'] > 0: return r diff --git a/script/generate-mlperf-tiny-report/customize.py b/script/generate-mlperf-tiny-report/customize.py index 92e808eea..0f9d54f0d 100644 --- a/script/generate-mlperf-tiny-report/customize.py +++ b/script/generate-mlperf-tiny-report/customize.py @@ -1,4 +1,3 @@ -import cmind as cm from mlc import utils import os @@ -17,7 +16,7 @@ def preprocess(i): env_repo_tags = env.get('CM_IMPORT_TINYMLPERF_REPO_TAGS', '').strip() xtags = '' if env_repo_tags == '' else ',version-' + env_repo_tags - r = cm.access({'action': 'find', + r = mlc.access({'action': 'find', 'automation': 'cache,541d6f712a6b464e', 'tags': 'get,repo,mlperf-tiny-results' + xtags}) if r['return'] > 0: diff --git a/script/get-generic-python-lib/customize.py b/script/get-generic-python-lib/customize.py index 463fab78b..2b259feca 100644 --- a/script/get-generic-python-lib/customize.py +++ b/script/get-generic-python-lib/customize.py @@ -1,6 +1,5 @@ from mlc import utils import os -import cmind as cm def preprocess(i): diff --git a/script/install-generic-conda-package/customize.py b/script/install-generic-conda-package/customize.py index 7eb210453..2fe548677 100644 --- a/script/install-generic-conda-package/customize.py +++ b/script/install-generic-conda-package/customize.py @@ -1,6 +1,5 @@ from mlc import utils import os -import cmind as cm def preprocess(i): diff --git a/script/preprocess-mlperf-inference-submission/customize.py b/script/preprocess-mlperf-inference-submission/customize.py index 03f290425..40a00bf39 100644 --- a/script/preprocess-mlperf-inference-submission/customize.py +++ b/script/preprocess-mlperf-inference-submission/customize.py @@ -1,5 +1,4 @@ from mlc import utils -import cmind as cm import os from os.path import exists import shutil diff --git a/script/process-mlperf-accuracy/customize.py b/script/process-mlperf-accuracy/customize.py index 844534aae..9e3a99885 100644 --- a/script/process-mlperf-accuracy/customize.py +++ b/script/process-mlperf-accuracy/customize.py @@ -1,5 +1,4 @@ from mlc import utils -import cmind as cm import os diff --git a/script/push-csv-to-spreadsheet/customize.py b/script/push-csv-to-spreadsheet/customize.py index fe99a0b46..e3a082660 100644 --- a/script/push-csv-to-spreadsheet/customize.py +++ b/script/push-csv-to-spreadsheet/customize.py @@ -1,5 +1,4 @@ from mlc import utils -import cmind as cm import os diff --git a/script/push-mlperf-inference-results-to-github/customize.py b/script/push-mlperf-inference-results-to-github/customize.py index 81824c7dc..88f1a90c5 100644 --- a/script/push-mlperf-inference-results-to-github/customize.py +++ b/script/push-mlperf-inference-results-to-github/customize.py @@ -1,5 +1,4 @@ from mlc import utils -import cmind as cm import os from giturlparse import parse diff --git a/script/run-docker-container/customize.py b/script/run-docker-container/customize.py index 06f0520bc..aa2176ae0 100644 --- a/script/run-docker-container/customize.py +++ b/script/run-docker-container/customize.py @@ -1,5 +1,5 @@ from mlc import utils -import cmind as cm +import mlc import os import subprocess from os.path import exists @@ -19,12 +19,12 @@ def preprocess(i): if 'CM_DOCKER_RUN_SCRIPT_TAGS' not in env: env['CM_DOCKER_RUN_SCRIPT_TAGS'] = "run,docker,container" - CM_RUN_CMD = "cm version" + CM_RUN_CMD = "mlc version" else: - CM_RUN_CMD = "cm run script --tags=" + \ + CM_RUN_CMD = "mlc run script --tags=" + \ env['CM_DOCKER_RUN_SCRIPT_TAGS'] + ' --quiet' - r = cm.access({'action': 'search', + r = mlc.access({'action': 'search', 'automation': 'script', 'tags': env['CM_DOCKER_RUN_SCRIPT_TAGS']}) if len(r['list']) < 1: diff --git a/script/run-mlperf-automotive-app/customize.py b/script/run-mlperf-automotive-app/customize.py index 970b15854..4133b60ed 100644 --- a/script/run-mlperf-automotive-app/customize.py +++ b/script/run-mlperf-automotive-app/customize.py @@ -3,7 +3,7 @@ import json import shutil import subprocess -import cmind as cm +import mlc import copy from tabulate import tabulate @@ -249,7 +249,7 @@ def preprocess(i): if action == "docker": for k in docker_extra_input: ii[k] = docker_extra_input[k] - r = cm.access(ii) + r = mlc.access(ii) if r['return'] > 0: return r if action == "docker": @@ -278,7 +278,7 @@ def preprocess(i): if action == "docker": for k in docker_extra_input: ii[k] = docker_extra_input[k] - r = cm.access(ii) + r = mlc.access(ii) if r['return'] > 0: return r if state.get('docker', {}): diff --git a/script/run-mlperf-inference-app/run_mobilenet.py b/script/run-mlperf-inference-app/run_mobilenet.py index 63ad8986e..bfe0657fe 100644 --- a/script/run-mlperf-inference-app/run_mobilenet.py +++ b/script/run-mlperf-inference-app/run_mobilenet.py @@ -1,4 +1,4 @@ -import cmind +import mlc import os import sys @@ -73,7 +73,7 @@ continue if model == "efficientnet" and precision == "uint8": precision = "int8" - cm_input = { + mlc_input = { 'action': 'run', 'automation': 'script', 'tags': f'generate-run-cmds,mlperf,inference,{var}', @@ -96,8 +96,8 @@ } } } - print(cm_input) - r = cmind.access(cm_input) + print(mlc_input) + r = mlc.access(cm_input) if r['return'] > 0: print(r) # exit(1) diff --git a/script/run-mlperf-inference-mobilenet-models/customize.py b/script/run-mlperf-inference-mobilenet-models/customize.py index 25a0ccf44..4101f3d52 100644 --- a/script/run-mlperf-inference-mobilenet-models/customize.py +++ b/script/run-mlperf-inference-mobilenet-models/customize.py @@ -1,6 +1,6 @@ from mlc import utils import os -import cmind +import mlc import sys @@ -132,7 +132,7 @@ def preprocess(i): if model == "efficientnet" and precision == "uint8": precision = "int8" - cm_input = { + mlc_input = { 'action': 'run', 'automation': 'script', 'tags': f'generate-run-cmds,mlperf,inference,{var}', @@ -157,37 +157,37 @@ def preprocess(i): } if add_deps_recursive: # script automation will merge adr and add_deps_recursive - cm_input['add_deps_recursive'] = add_deps_recursive + mlc_input['add_deps_recursive'] = add_deps_recursive if adr: utils.merge_dicts( - {'dict1': cm_input['adr'], 'dict2': adr, 'append_lists': True, 'append_unique': True}) + {'dict1': mlc_input['adr'], 'dict2': adr, 'append_lists': True, 'append_unique': True}) if env.get('CM_MLPERF_INFERENCE_RESULTS_DIR', '') != '': - cm_input['results_dir'] = env['CM_MLPERF_INFERENCE_RESULTS_DIR'] + mlc_input['results_dir'] = env['CM_MLPERF_INFERENCE_RESULTS_DIR'] if env.get('CM_MLPERF_INFERENCE_SUBMISSION_DIR', '') != '': - cm_input['submission_dir'] = env['CM_MLPERF_INFERENCE_SUBMISSION_DIR'] + mlc_input['submission_dir'] = env['CM_MLPERF_INFERENCE_SUBMISSION_DIR'] if env.get('CM_MLPERF_FIND_PERFORMANCE_MODE', '') == "yes" and env.get( 'CM_MLPERF_NO_RERUN', '') != 'yes': - cm_input['rerun'] = True + mlc_input['rerun'] = True if env.get('CM_MLPERF_POWER', '') == "yes": - cm_input['power'] = 'yes' + mlc_input['power'] = 'yes' if env.get('CM_MLPERF_ACCURACY_MODE', '') == "yes": - cm_input['mode'] = 'accuracy' - print(cm_input) - r = cmind.access(cm_input) + mlc_input['mode'] = 'accuracy' + print(mlc_input) + r = cmind.access(mlc_input) if r['return'] > 0: return r if env.get('CM_MLPERF_PERFORMANCE_MODE', '') == "yes": - cm_input['mode'] = 'performance' + mlc_input['mode'] = 'performance' - print(cm_input) - r = cmind.access(cm_input) + print(mlc_input) + r = mlc.access(mlc_input) if r['return'] > 0: return r @@ -202,7 +202,7 @@ def preprocess(i): 'v': verbose, 'f': 'True' } - r = cmind.access(clean_input) + r = mlc.access(clean_input) # if r['return'] > 0: # return r return {'return': 0} diff --git a/script/run-mlperf-power-client/customize.py b/script/run-mlperf-power-client/customize.py index b57eef64c..b93d9e121 100644 --- a/script/run-mlperf-power-client/customize.py +++ b/script/run-mlperf-power-client/customize.py @@ -1,5 +1,4 @@ from mlc import utils -import cmind as cm import os import configparser diff --git a/script/run-mlperf-power-server/customize.py b/script/run-mlperf-power-server/customize.py index f4d599ef5..0593bc170 100644 --- a/script/run-mlperf-power-server/customize.py +++ b/script/run-mlperf-power-server/customize.py @@ -1,5 +1,4 @@ from mlc import utils -import cmind as cm import os import configparser diff --git a/script/run-mlperf-training-submission-checker/customize.py b/script/run-mlperf-training-submission-checker/customize.py index 48b8e7bed..3dba45eb6 100644 --- a/script/run-mlperf-training-submission-checker/customize.py +++ b/script/run-mlperf-training-submission-checker/customize.py @@ -1,5 +1,4 @@ from mlc import utils -import cmind as cm import os import subprocess diff --git a/script/run-terraform/customize.py b/script/run-terraform/customize.py index e44a24d2f..5d9aa83a5 100644 --- a/script/run-terraform/customize.py +++ b/script/run-terraform/customize.py @@ -1,5 +1,5 @@ from mlc import utils -import cmind as cm +import mlc import os import shutil import json @@ -62,10 +62,8 @@ def postprocess(i): "sudo apt-get update", "sudo apt-get -y upgrade", "sudo apt-get install -y python3-pip", - "python3 -m pip install cmind", - "source ~/.profile", - "cm pull repo ctuning@mlcommons-ck", - "cm run script --tags=get,sys-utils-cm" + "python3 -m pip install mlc", + "source ~/.profile" ] } if env.get('CM_TERRAFORM_RUN_COMMANDS'): @@ -74,7 +72,7 @@ def postprocess(i): cmd = cmd.replace(":", "=") cmd = cmd.replace(";;", ",") run_input['run_cmds'].append(cmd) - r = cm.access(run_input) + r = mlc.access(run_input) if r['return'] > 0: return r # print(r) diff --git a/script/save-mlperf-inference-implementation-state/customize.py b/script/save-mlperf-inference-implementation-state/customize.py index 771e1f34b..0ac4b241a 100644 --- a/script/save-mlperf-inference-implementation-state/customize.py +++ b/script/save-mlperf-inference-implementation-state/customize.py @@ -20,7 +20,7 @@ def preprocess(i): return {'return': 0} if env.get('CM_MLPERF_README', "") == "yes": - import cmind as cm + import mlc inp = i['input'] script_tags = state['mlperf-inference-implementation'].get( @@ -29,7 +29,7 @@ def preprocess(i): 'script_adr', {}) if script_tags != '': - cm_input = {'action': 'run', + mlc_input = {'action': 'run', 'automation': 'script', 'tags': script_tags, 'adr': script_adr, @@ -40,7 +40,7 @@ def preprocess(i): 'fake_run': True } - r = cm.access(cm_input) + r = mlc.access(cm_input) if r['return'] > 0: return r diff --git a/script/submit-mlperf-results/customize.py b/script/submit-mlperf-results/customize.py index 8f9ab049c..918b16c4b 100644 --- a/script/submit-mlperf-results/customize.py +++ b/script/submit-mlperf-results/customize.py @@ -1,6 +1,5 @@ import requests from mlc import utils -import cmind as cm import os import json diff --git a/script/tar-my-folder/customize.py b/script/tar-my-folder/customize.py index 8d3a3791a..37dfd2271 100644 --- a/script/tar-my-folder/customize.py +++ b/script/tar-my-folder/customize.py @@ -1,5 +1,4 @@ from mlc import utils -import cmind as cm import os import subprocess from os.path import exists From a85217cc296a8b8b504e8fbc62fc62f1cf404ab0 Mon Sep 17 00:00:00 2001 From: arjunsuresh Date: Sat, 18 Jan 2025 19:06:33 +0000 Subject: [PATCH 29/84] [Automated Commit] Format Codebase --- .../app-mlperf-inference/build_dockerfiles.py | 52 +++++++++---------- .../customize.py | 2 +- .../customize.py | 10 ++-- .../generate-mlperf-tiny-report/customize.py | 2 +- script/run-docker-container/customize.py | 2 +- .../customize.py | 18 +++---- 6 files changed, 43 insertions(+), 43 deletions(-) diff --git a/script/app-mlperf-inference/build_dockerfiles.py b/script/app-mlperf-inference/build_dockerfiles.py index 0a495bceb..52f2726b8 100644 --- a/script/app-mlperf-inference/build_dockerfiles.py +++ b/script/app-mlperf-inference/build_dockerfiles.py @@ -65,20 +65,20 @@ file_name_ext + '.Dockerfile') mlc_input = {'action': 'run', - 'automation': 'script', - 'tags': 'app,mlperf,inference,generic' + variation_string, - 'adr': {'compiler': - {'tags': 'gcc'}, - 'inference-src': - {'tags': '_octoml'}, - 'openimages-preprocessed': - {'tags': '_50'} - }, - 'print_deps': True, - 'quiet': True, - 'silent': True, - 'fake_run': True - } + 'automation': 'script', + 'tags': 'app,mlperf,inference,generic' + variation_string, + 'adr': {'compiler': + {'tags': 'gcc'}, + 'inference-src': + {'tags': '_octoml'}, + 'openimages-preprocessed': + {'tags': '_50'} + }, + 'print_deps': True, + 'quiet': True, + 'silent': True, + 'fake_run': True + } r = mlc.access(mlc_input) print_deps = r['new_state']['print_deps'] comments = ["#RUN " + dep for dep in print_deps] @@ -86,18 +86,18 @@ comments.append( "# Run CM workflow for MLPerf inference") mlc_docker_input = {'action': 'run', - 'automation': 'script', - 'tags': 'build,dockerfile', - 'docker_os': _os, - 'docker_os_version': version, - 'file_path': dockerfile_path, - 'comments': comments, - 'run_cmd': 'mlc run script --tags=app,mlperf,inference,generic' + variation_string + ' --adr.compiler.tags=gcc --adr.inference-src.tags=_octoml', - 'script_tags': 'app,mlperf,inference,generic', - 'quiet': True, - 'print_deps': True, - 'real_run': True - } + 'automation': 'script', + 'tags': 'build,dockerfile', + 'docker_os': _os, + 'docker_os_version': version, + 'file_path': dockerfile_path, + 'comments': comments, + 'run_cmd': 'mlc run script --tags=app,mlperf,inference,generic' + variation_string + ' --adr.compiler.tags=gcc --adr.inference-src.tags=_octoml', + 'script_tags': 'app,mlperf,inference,generic', + 'quiet': True, + 'print_deps': True, + 'real_run': True + } r = mlc.access(mlc_docker_input) if r['return'] > 0: print(r) diff --git a/script/clean-nvidia-mlperf-inference-scratch-space/customize.py b/script/clean-nvidia-mlperf-inference-scratch-space/customize.py index 2fa0c7f84..149fe34e7 100644 --- a/script/clean-nvidia-mlperf-inference-scratch-space/customize.py +++ b/script/clean-nvidia-mlperf-inference-scratch-space/customize.py @@ -33,7 +33,7 @@ def preprocess(i): if cache_rm_tags: r = mlc.access({'action': 'rm', 'automation': 'cache', - 'tags': cache_rm_tags, 'f': True}) + 'tags': cache_rm_tags, 'f': True}) print(r) if r['return'] != 0 and r['return'] != 16: # ignore missing ones return r diff --git a/script/generate-mlperf-inference-submission/customize.py b/script/generate-mlperf-inference-submission/customize.py index 2e4a277fc..a6f5167aa 100644 --- a/script/generate-mlperf-inference-submission/customize.py +++ b/script/generate-mlperf-inference-submission/customize.py @@ -695,11 +695,11 @@ def generate_submission(env, state, inp, submission_division): else: if env.get('CM_GET_PLATFORM_DETAILS', '') == "yes": mlc_input = {'action': 'run', - 'automation': 'script', - 'tags': 'get,platform,details', - 'env': {'CM_PLATFORM_DETAILS_FILE_PATH': os.path.join(measurement_path, "system_info.txt")}, - 'quiet': True - } + 'automation': 'script', + 'tags': 'get,platform,details', + 'env': {'CM_PLATFORM_DETAILS_FILE_PATH': os.path.join(measurement_path, "system_info.txt")}, + 'quiet': True + } r = mlc.access(mlc_input) if r['return'] > 0: return r diff --git a/script/generate-mlperf-tiny-report/customize.py b/script/generate-mlperf-tiny-report/customize.py index 0f9d54f0d..6efd29616 100644 --- a/script/generate-mlperf-tiny-report/customize.py +++ b/script/generate-mlperf-tiny-report/customize.py @@ -18,7 +18,7 @@ def preprocess(i): r = mlc.access({'action': 'find', 'automation': 'cache,541d6f712a6b464e', - 'tags': 'get,repo,mlperf-tiny-results' + xtags}) + 'tags': 'get,repo,mlperf-tiny-results' + xtags}) if r['return'] > 0: return r diff --git a/script/run-docker-container/customize.py b/script/run-docker-container/customize.py index aa2176ae0..9dce09564 100644 --- a/script/run-docker-container/customize.py +++ b/script/run-docker-container/customize.py @@ -26,7 +26,7 @@ def preprocess(i): r = mlc.access({'action': 'search', 'automation': 'script', - 'tags': env['CM_DOCKER_RUN_SCRIPT_TAGS']}) + 'tags': env['CM_DOCKER_RUN_SCRIPT_TAGS']}) if len(r['list']) < 1: raise Exception( 'CM script with tags ' + diff --git a/script/save-mlperf-inference-implementation-state/customize.py b/script/save-mlperf-inference-implementation-state/customize.py index 0ac4b241a..a7d920cd8 100644 --- a/script/save-mlperf-inference-implementation-state/customize.py +++ b/script/save-mlperf-inference-implementation-state/customize.py @@ -30,15 +30,15 @@ def preprocess(i): if script_tags != '': mlc_input = {'action': 'run', - 'automation': 'script', - 'tags': script_tags, - 'adr': script_adr, - 'env': env, - 'print_deps': True, - 'quiet': True, - 'silent': True, - 'fake_run': True - } + 'automation': 'script', + 'tags': script_tags, + 'adr': script_adr, + 'env': env, + 'print_deps': True, + 'quiet': True, + 'silent': True, + 'fake_run': True + } r = mlc.access(cm_input) if r['return'] > 0: From 970b9ac8433353cb3e7daa0c9df5214bd218f2f2 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Sun, 19 Jan 2025 00:43:53 +0530 Subject: [PATCH 30/84] Fixed mlc imports for scripts --- script/build-dockerfile/customize.py | 46 +++++++++---------- .../customize.py | 1 - .../customize.py | 1 - .../customize.py | 1 - .../customize.py | 7 ++- 5 files changed, 26 insertions(+), 30 deletions(-) diff --git a/script/build-dockerfile/customize.py b/script/build-dockerfile/customize.py index d09307c40..75c805b9f 100644 --- a/script/build-dockerfile/customize.py +++ b/script/build-dockerfile/customize.py @@ -1,6 +1,6 @@ from mlc import utils -import cmind as cm import os +import mlc import json import re import shutil @@ -92,8 +92,8 @@ def preprocess(i): try: print( - f"Copying repository from {cm_repo_path} to {repo_build_context_path}") - shutil.copytree(cm_repo_path, repo_build_context_path) + f"Copying repository from {mlc_repo_path} to {repo_build_context_path}") + shutil.copytree(mlc_repo_path, repo_build_context_path) except Exception as e: return { 'return': 1, 'error': f"Failed to copy repository to build context: {str(e)}"} @@ -105,7 +105,7 @@ def preprocess(i): # (Optional) Verify the copy if not os.path.isdir(repo_build_context_path): return { - 'return': 1, 'error': f"cm_repo was not successfully copied to the build context at {repo_build_context_path}"} + 'return': 1, 'error': f"mlc_repo was not successfully copied to the build context at {repo_build_context_path}"} else: print( f"mlc_repo is present in the build context at {repo_build_context_path}") @@ -271,7 +271,7 @@ def preprocess(i): ' ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers' + EOL) f.write('USER ' + docker_user + ":" + docker_group + EOL) - f.write('ENV HOME=/home/cmuser' + EOL) + f.write('ENV HOME=/home/mlcuser' + EOL) else: f.write('ENV HOME=/root' + EOL) @@ -283,7 +283,7 @@ def preprocess(i): docker_env_key + "=" + str(dockerfile_env[docker_env_key]) workdir = get_value(env, config, 'WORKDIR', 'CM_DOCKER_WORKDIR') - if workdir and ("/home/cmuser" not in workdir or str(env.get('CM_DOCKER_USE_DEFAULT_USER', '')).lower() not in [ + if workdir and ("/home/mlcuser" not in workdir or str(env.get('CM_DOCKER_USE_DEFAULT_USER', '')).lower() not in [ "yes", "1", "true"]): f.write('WORKDIR ' + workdir + EOL) @@ -292,9 +292,9 @@ def preprocess(i): docker_use_virtual_python = env.get('CM_DOCKER_USE_VIRTUAL_PYTHON', "yes") if str(docker_use_virtual_python).lower() not in ["no", "0", "false"]: - f.write('RUN {} -m venv $HOME/venv/cm'.format(python) + " " + EOL) - f.write('ENV PATH="$HOME/venv/cm/bin:$PATH"' + EOL) - # f.write('RUN . /opt/venv/cm/bin/activate' + EOL) + f.write('RUN {} -m venv $HOME/venv/mlc'.format(python) + " " + EOL) + f.write('ENV PATH="$HOME/venv/mlc/bin:$PATH"' + EOL) + # f.write('RUN . /opt/venv/mlc/bin/activate' + EOL) f.write( 'RUN {} -m pip install '.format(python) + @@ -308,26 +308,26 @@ def preprocess(i): ' ' + EOL) - f.write(EOL + '# Download CM repo for scripts' + EOL) + f.write(EOL + '# Download MLC repo for scripts' + EOL) if use_copy_repo: - docker_repo_dest = "$HOME/CM/repos/mlcommons@mlperf-automations" + docker_repo_dest = "$HOME/MLC/repos/mlcommons@mlperf-automations" f.write( - f'COPY --chown=cmuser:cm {relative_repo_path} {docker_repo_dest}' + + f'COPY --chown=mlcuser:mlc {relative_repo_path} {docker_repo_dest}' + EOL) - f.write(EOL + '# Register CM repository' + EOL) - f.write('RUN cm pull repo --url={} --quiet'.format(docker_repo_dest) + EOL) + f.write(EOL + '# Register MLC repository' + EOL) + f.write('RUN mlc pull repo --url={} --quiet'.format(docker_repo_dest) + EOL) f.write(EOL) else: - # Use cm pull repo as before + # Use mlc pull repo as before x = env.get('CM_DOCKER_ADD_FLAG_TO_CM_MLOPS_REPO', '') if x != '': x = ' ' + x f.write( - 'RUN cm pull repo ' + + 'RUN mlc pull repo ' + cm_mlops_repo + cm_mlops_repo_branch_string + x + @@ -342,7 +342,7 @@ def preprocess(i): if str(env.get('CM_DOCKER_SKIP_CM_SYS_UPGRADE', False) ).lower() not in ["true", "1", "yes"]: f.write(EOL + '# Install all system dependencies' + EOL) - f.write('RUN cm run script --tags=get,sys-utils-cm --quiet' + EOL) + f.write('RUN mlc run script --tags=get,sys-utils-cm --quiet' + EOL) if 'CM_DOCKER_PRE_RUN_COMMANDS' in env: for pre_run_cmd in env['CM_DOCKER_PRE_RUN_COMMANDS']: @@ -362,18 +362,18 @@ def preprocess(i): if 'CM_DOCKER_RUN_CMD' not in env: env['CM_DOCKER_RUN_CMD'] = "" if 'CM_DOCKER_RUN_SCRIPT_TAGS' not in env: - env['CM_DOCKER_RUN_CMD'] += "cm version" + env['CM_DOCKER_RUN_CMD'] += "mlc version" skip_extra = True else: if str(env.get('CM_DOCKER_NOT_PULL_UPDATE', 'False') ).lower() not in ["yes", "1", "true"]: - env['CM_DOCKER_RUN_CMD'] += "cm pull repo && " - env['CM_DOCKER_RUN_CMD'] += "cm run script --tags=" + \ + env['CM_DOCKER_RUN_CMD'] += "mlc pull repo && " + env['CM_DOCKER_RUN_CMD'] += "mlc run script --tags=" + \ env['CM_DOCKER_RUN_SCRIPT_TAGS'] + ' --quiet' else: if str(env.get('CM_DOCKER_NOT_PULL_UPDATE', 'False') ).lower() not in ["yes", "1", "true"]: - env['CM_DOCKER_RUN_CMD'] = "cm pull repo && " + \ + env['CM_DOCKER_RUN_CMD'] = "mlc pull repo && " + \ env['CM_DOCKER_RUN_CMD'] print(env['CM_DOCKER_RUN_CMD']) @@ -393,7 +393,7 @@ def preprocess(i): if env.get('CM_DOCKER_RUN_SCRIPT_TAGS', '') != '' and str(env.get( 'CM_DOCKER_ADD_DEPENDENT_SCRIPTS_RUN_COMMANDS', '')).lower() in ["yes", "1", "true"]: - cm_input = {'action': 'run', + mlc_input = {'action': 'run', 'automation': 'script', 'tags': f"""{env['CM_DOCKER_RUN_SCRIPT_TAGS']}""", 'print_deps': True, @@ -402,7 +402,7 @@ def preprocess(i): 'fake_run': True, 'fake_deps': True } - r = self_module.cmind.access(cm_input) + r = self_module.mlc.access(mlc_input) if r['return'] > 0: return r print_deps = r['new_state']['print_deps'] diff --git a/script/generate-mlperf-inference-user-conf/customize.py b/script/generate-mlperf-inference-user-conf/customize.py index cd32d02f5..88255718c 100644 --- a/script/generate-mlperf-inference-user-conf/customize.py +++ b/script/generate-mlperf-inference-user-conf/customize.py @@ -3,7 +3,6 @@ import json import shutil import subprocess -import cmind as cm import sys diff --git a/script/run-mlperf-inference-submission-checker/customize.py b/script/run-mlperf-inference-submission-checker/customize.py index a4811146c..ddb6f7c60 100644 --- a/script/run-mlperf-inference-submission-checker/customize.py +++ b/script/run-mlperf-inference-submission-checker/customize.py @@ -1,5 +1,4 @@ from mlc import utils -import cmind as cm import os import subprocess diff --git a/script/truncate-mlperf-inference-accuracy-log/customize.py b/script/truncate-mlperf-inference-accuracy-log/customize.py index a1011b5fa..264fb72c9 100644 --- a/script/truncate-mlperf-inference-accuracy-log/customize.py +++ b/script/truncate-mlperf-inference-accuracy-log/customize.py @@ -1,5 +1,4 @@ from mlc import utils -import cmind as cm import os import subprocess from os.path import exists diff --git a/script/wrapper-reproduce-octoml-tinyml-submission/customize.py b/script/wrapper-reproduce-octoml-tinyml-submission/customize.py index 460a01159..989920d27 100644 --- a/script/wrapper-reproduce-octoml-tinyml-submission/customize.py +++ b/script/wrapper-reproduce-octoml-tinyml-submission/customize.py @@ -1,7 +1,6 @@ from mlc import utils import os -import cmind as cm - +import mlc def preprocess(i): @@ -26,11 +25,11 @@ def preprocess(i): variation_tags_string = "_" + board + ",_" + microtvm_variant + ",_" + model tags = script_tags + "," + variation_tags_string if 'CM_RECREATE_BINARY' in env: - r = cm.access( + r = mlc.access( {'action': 'rm', 'automation': 'cache', 'tags': tags, 'force': 'true'}) if r['return'] > 0: return r - r = cm.access({'action': 'run', 'automation': 'script', 'tags': tags, 'quiet': 'true', 'env': env, + r = mlc.access({'action': 'run', 'automation': 'script', 'tags': tags, 'quiet': 'true', 'env': env, 'input': inp, 'state': state, 'add_deps': inp.get('add_deps', {}), 'add_deps_recursive': inp.get('add_deps_recursive', {})}) if r['return'] > 0: From 92b393ba6029f53c99294b086a8aaf338b360bd4 Mon Sep 17 00:00:00 2001 From: arjunsuresh Date: Sat, 18 Jan 2025 19:14:18 +0000 Subject: [PATCH 31/84] [Automated Commit] Format Codebase --- script/build-dockerfile/customize.py | 16 ++++++++-------- .../customize.py | 3 ++- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/script/build-dockerfile/customize.py b/script/build-dockerfile/customize.py index 75c805b9f..493ca2e8c 100644 --- a/script/build-dockerfile/customize.py +++ b/script/build-dockerfile/customize.py @@ -394,14 +394,14 @@ def preprocess(i): if env.get('CM_DOCKER_RUN_SCRIPT_TAGS', '') != '' and str(env.get( 'CM_DOCKER_ADD_DEPENDENT_SCRIPTS_RUN_COMMANDS', '')).lower() in ["yes", "1", "true"]: mlc_input = {'action': 'run', - 'automation': 'script', - 'tags': f"""{env['CM_DOCKER_RUN_SCRIPT_TAGS']}""", - 'print_deps': True, - 'quiet': True, - 'silent': True, - 'fake_run': True, - 'fake_deps': True - } + 'automation': 'script', + 'tags': f"""{env['CM_DOCKER_RUN_SCRIPT_TAGS']}""", + 'print_deps': True, + 'quiet': True, + 'silent': True, + 'fake_run': True, + 'fake_deps': True + } r = self_module.mlc.access(mlc_input) if r['return'] > 0: return r diff --git a/script/wrapper-reproduce-octoml-tinyml-submission/customize.py b/script/wrapper-reproduce-octoml-tinyml-submission/customize.py index 989920d27..e1dfaf976 100644 --- a/script/wrapper-reproduce-octoml-tinyml-submission/customize.py +++ b/script/wrapper-reproduce-octoml-tinyml-submission/customize.py @@ -2,6 +2,7 @@ import os import mlc + def preprocess(i): os_info = i['os_info'] @@ -31,7 +32,7 @@ def preprocess(i): return r r = mlc.access({'action': 'run', 'automation': 'script', 'tags': tags, 'quiet': 'true', 'env': env, 'input': inp, 'state': state, 'add_deps': inp.get('add_deps', {}), 'add_deps_recursive': - inp.get('add_deps_recursive', {})}) + inp.get('add_deps_recursive', {})}) if r['return'] > 0: return r From e498cb029f7fc72c727643349a5e4cc0e3eb8f0d Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Tue, 21 Jan 2025 03:15:35 +0530 Subject: [PATCH 32/84] Added docker code for MLC --- automation/script/docker.py | 333 ++++++++++++++++++++++++ automation/script/docker_utils.py | 279 ++++++++++++++++++++ automation/script/module.py | 100 +------ script/build-dockerfile/_cm.yaml | 2 +- script/build-dockerfile/customize.py | 8 +- script/build-dockerfile/dockerinfo.json | 10 +- 6 files changed, 627 insertions(+), 105 deletions(-) create mode 100644 automation/script/docker.py create mode 100644 automation/script/docker_utils.py diff --git a/automation/script/docker.py b/automation/script/docker.py new file mode 100644 index 000000000..3a1dfbf96 --- /dev/null +++ b/automation/script/docker.py @@ -0,0 +1,333 @@ +import os +from mlc import utils +from utils import * +import logging +from pathlib import PureWindowsPath, PurePosixPath +from script.docker_utils import * +import copy + +def dockerfile(self_module, input_params): + + # Step 1: Prune and prepare input + prune_result = prune_input({'input': input_params, 'extra_keys_starts_with': ['docker_']}) + if prune_result['return'] > 0: + return prune_result + + run_command_arc = prune_result['new_input'] + current_directory = os.getcwd() + is_quiet_mode = input_params.get('quiet', False) + verbose = input_params.get('v', False) + is_console_output = input_params.get('out') == 'con' + + # Step 2: Search for scripts + search_result = self_module.search(input_params) + if search_result['return'] > 0: + return search_result + + scripts_list = search_result['list'] + if not scripts_list: + return {'return': 1, 'error': 'No scripts were found'} + + # Step 3: Process Dockerfile-related configurations + environment_vars = input_params.get('env', {}) + state_data = input_params.get('state', {}) + constant_vars = input_params.get('const', {}) + constant_state = input_params.get('const_state', {}) + dockerfile_environment_vars = input_params.get('dockerfile_env', {}) + tag_values = input_params.get('tags', '').split(",") + variation_tags = [tag[1:] for tag in tag_values if tag.startswith("_")] + + # Step 4: Iterate over scripts and generate Dockerfile + for script in sorted(scripts_list, key=lambda x: x.meta.get('alias', '')): + metadata = script.meta + script_directory = script.path + script_tags = metadata.get("tags", []) + script_alias = metadata.get('alias', '') + script_uid = metadata.get('uid', '') + + + run_state = { + 'deps': [], + 'fake_deps': [], + 'parent': None, + 'script_id': f"{script_alias},{script_uid}", + 'script_variation_tags': variation_tags + } + docker_settings = metadata.get('docker', {}) + docker_settings['dockerfile_env'] = dockerfile_environment_vars + state_data['docker'] = docker_settings + add_deps_recursive = input_params.get('add_deps_recursive', {}) + + # Update state with metadata and variations + update_state_result = self_module.update_state_from_meta( + metadata, environment_vars, state_data, constant_vars, constant_state, + deps=[], + post_deps=[], + prehook_deps=[], + posthook_deps=[], + new_env_keys=[], + new_state_keys=[], + run_state=run_state, + i=input_params + ) + if update_state_result['return'] > 0: + return update_state_result + + update_variations_result = self_module._update_state_from_variations( + input_params, metadata, variation_tags, metadata.get('variations', {}), + environment_vars, state_data, constant_vars, constant_state, + deps=[], # Add your dependencies if needed + post_deps=[], # Add post dependencies if needed + prehook_deps=[], # Add prehook dependencies if needed + posthook_deps=[], # Add posthook dependencies if needed + new_env_keys_from_meta=[], # Add keys from meta if needed + new_state_keys_from_meta=[], # Add state keys from meta if needed + add_deps_recursive=add_deps_recursive, + run_state=run_state, + recursion_spaces='', + verbose=verbose # Set to True or False as needed + ) + if update_variations_result['return'] > 0: + return update_variations_result + + # Set Docker-specific configurations + docker_settings = state_data.get('docker', {}) + docker_settings['dockerfile_env'] = dockerfile_environment_vars + dockerfile_environment_vars['CM_RUN_STATE_DOCKER'] = True + + if not docker_settings.get('run', True) and not input_params.get('docker_run_override', False): + logging.info("Docker 'run' is set to False in meta.json") + continue + + # Handle build dependencies + build_dependencies = docker_settings.get('build_deps', []) + if build_dependencies: + deps_result = self_module._run_deps( + build_dependencies, run_state=run_state, verbose=input_params.get('v', False) + ) + if deps_result['return'] > 0: + return deps_result + + # Prune temporary environment variables + run_command = copy.deepcopy(run_command_arc) + for key in list(run_command.get('env', {}).keys()): + if key.startswith("CM_TMP_"): + del run_command['env'][key] + + # Regenerate script command + regenerate_result = regenerate_script_cmd({ + 'script_uid': script_uid, + 'script_alias': script_alias, + 'run_cmd': run_command, + 'tags': script_tags, + 'fake_run': True, + 'docker_settings': docker_settings, + 'docker_run_cmd_prefix': input_params.get('docker_run_cmd_prefix', docker_settings.get('run_cmd_prefix', '')) + }) + if regenerate_result['return'] > 0: + return regenerate_result + + run_command_string = regenerate_result['run_cmd_string'] + + # Collect Dockerfile inputs + dockerfile_inputs = { + key: input_params.get(f"docker_{key}", docker_settings.get(key, get_docker_default(key))) + for key in [ + "mlc_repo", "mlc_repo_branch", "base_image", "os", "os_version", + "mlc_repos", "skip_mlc_sys_upgrade", "extra_sys_deps", + "gh_token", "fake_run_deps", "run_final_cmds", "real_run", "copy_files", "path" + ] + if (value := input_params.get(f"docker_{key}", docker_settings.get(key, get_docker_default(key)))) is not None + } + + # Determine Dockerfile suffix and path + docker_base_image = dockerfile_inputs.get('base_image') + docker_path = dockerfile_inputs.get('path') + if not docker_path: + docker_path = script_directory + docker_filename_suffix = ( + docker_base_image.replace('/', '-').replace(':', '-') + if docker_base_image else f"{dockerfile_inputs['os']}_{dockerfile_inputs['os_version']}" + ) + dockerfile_path = os.path.join(docker_path, 'dockerfiles', f"{docker_filename_suffix}.Dockerfile") + + # Handle optional dependencies and comments + if input_params.get('print_deps'): + mlc_input = { + 'action': 'run', 'automation': 'script', 'tags': input_params.get('tags'), + 'print_deps': True, 'quiet': True, 'silent': True, + 'fake_run': True, 'fake_deps': True + } + deps_result = self_module.action_object.access(mlc_input) + if deps_result['return'] > 0: + return deps_result + comments = [f"#RUN {dep}" for dep in deps_result['new_state']['print_deps']] + else: + comments = [] + + # Push Docker image if specified + if input_params.get('docker_push_image') in [True, 'True', 'yes']: + environment_vars['CM_DOCKER_PUSH_IMAGE'] = 'yes' + + # Generate Dockerfile + mlc_docker_input = { + 'action': 'run', 'automation': 'script', 'tags': 'build,dockerfile', + 'fake_run_option': " " if dockerfile_inputs.get('real_run') else " --fake_run", + 'comments': comments, 'run_cmd': f"{run_command_string} --quiet", + 'script_tags': input_params.get('tags'), 'env': environment_vars, + 'dockerfile_env': dockerfile_environment_vars, + 'quiet': True, 'v': input_params.get('v', False), 'real_run': True + } + mlc_docker_input.update(dockerfile_inputs) + + dockerfile_result = self_module.action_object.access(mlc_docker_input) + if dockerfile_result['return'] > 0: + return dockerfile_result + + logging.info(f"Dockerfile generated at {dockerfile_path}") + + return {'return': 0} + +def docker_run(self_module, i): + """ + Automates the execution of MLC scripts within a Docker container. + + Args: + self_module: Reference to the current module for internal calls. + i: Dictionary containing input parameters for the Docker execution. + + Returns: + Dictionary with the result of the operation. Keys: + - 'return': 0 on success, >0 on error. + - 'error': Error message (if any). + """ + + # Extract and handle basic inputs + quiet = i.get('quiet', False) + detached = i.get('docker_detached', i.get('docker_dt', 'no')) + interactive = i.get('docker_interactive', i.get('docker_it', '')) + verbose = i.get('v', False) + show_time = i.get('show_time', False) + + env = i.get('env', {}) + noregenerate_docker_file = i.get('docker_noregenerate', False) + norecreate_docker_image = not i.get('docker_recreate', False) + + if i.get('docker_skip_build', False): + noregenerate_docker_file = True + norecreate_docker_image = True + env['CM_DOCKER_SKIP_BUILD'] = 'yes' + + # Prune unnecessary Docker-related input keys + r = prune_input({'input': i, 'extra_keys_starts_with': ['docker_']}) + f_run_cmd = r['new_input'] + + # Regenerate Dockerfile if required + if not noregenerate_docker_file: + r = dockerfile(self_module, i) + if r['return'] > 0: + return r + + # Save current directory and prepare to search for scripts + cur_dir = os.getcwd() + r = self_module.search(i) + if r['return'] > 0: + return r + + lst = r['list'] + if not lst: + return {'return': 1, 'error': 'No scripts were found'} + + env['CM_RUN_STATE_DOCKER'] = False + state, const, const_state = i.get('state', {}), i.get('const', {}), i.get('const_state', {}) + variation_tags = [t[1:] for t in i.get('tags', '').split(",") if t.startswith("_")] + + docker_cache = i.get('docker_cache', "yes") + if docker_cache.lower() in ["no", "false"]: + env.setdefault('CM_DOCKER_CACHE', docker_cache) + + image_repo = i.get('docker_image_repo', '') + add_deps_recursive = i.get('add_deps_recursive') + + # Ensure Docker is available + r = self_module.action_object.access({'action': 'run', 'automation': 'script', 'tags': "get,docker"}) + if r['return'] > 0: + return r + + # Process each artifact + for artifact in sorted(lst, key=lambda x: x.meta.get('alias', '')): + meta, script_path = artifact.meta, artifact.path + tags, script_alias, script_uid = meta.get("tags", []), meta.get('alias', ''), meta.get('uid', '') + + mounts = copy.deepcopy(i.get('docker_mounts', [])) + variations = meta.get('variations', {}) + docker_settings = meta.get('docker', {}) + state['docker'] = docker_settings + run_state = { + 'deps': [], 'fake_deps': [], 'parent': None, + 'script_id': f"{script_alias},{script_uid}", + 'script_variation_tags': variation_tags + } + + # Update state and handle variations + r = self_module.update_state_from_meta(meta, env, state, const, const_state, deps=[], + post_deps=[], + prehook_deps=[], + posthook_deps=[], + new_env_keys=[], + new_state_keys=[], run_state=run_state, i=i) + if r['return'] > 0: + return r + + r = self_module._update_state_from_variations( + i, meta, variation_tags, variations, env, state, const, const_state, deps=[], + post_deps=[], + prehook_deps=[], + posthook_deps=[], + new_env_keys_from_meta=[], + new_state_keys_from_meta=[], + add_deps_recursive=add_deps_recursive, run_state=run_state, recursion_spaces='', + verbose=False) + if r['return'] > 0: + return r + + # Skip scripts marked as non-runnable + if not docker_settings.get('run', True) and not i.get('docker_run_override', False): + logging.info("docker.run set to False in meta.yaml") + continue + + r = self_module._update_env_from_input(env, i) + if r['return'] > 0: + return r + + # Handle environment variable-based mounts + mounts = process_mounts(mounts, env, i, docker_settings) + if mounts is None: + return {'return': 1, 'error': 'Error processing mounts'} + + # Prepare Docker-specific inputs + docker_inputs, dockerfile_path = prepare_docker_inputs(i, docker_settings, script_path) + if docker_inputs is None: + return {'return': 1, 'error': 'Error preparing Docker inputs'} + + # Generate the run command + r = regenerate_script_cmd({'script_uid': script_uid, 'script_alias': script_alias, 'tags': tags, 'run_cmd': f_run_cmd}) + if r['return'] > 0: + return r + final_run_cmd = r['run_cmd_string'] + + # Execute the Docker container + mlc_docker_input = { + 'action': 'run', 'automation': 'script', 'tags': 'run,docker,container', + 'recreate': 'yes' if not norecreate_docker_image else 'no', + 'env': env, 'interactive': interactive, 'mounts': mounts, 'detached': detached, + 'script_tags': i.get('tags'), 'run_cmd': final_run_cmd, 'v': verbose, + '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 + + return {'return': 0} + diff --git a/automation/script/docker_utils.py b/automation/script/docker_utils.py new file mode 100644 index 000000000..512b25da6 --- /dev/null +++ b/automation/script/docker_utils.py @@ -0,0 +1,279 @@ +import os +from mlc import utils +from utils import * +import logging +from pathlib import PureWindowsPath, PurePosixPath +from script.docker_utils import * +import copy + +def process_mounts(mounts, env, i, docker_settings): + """ + Processes and updates the Docker mounts based on the provided inputs and environment variables. + + Args: + mounts: List of existing mount configurations. + env: Current environment variables dictionary. + i: Input dictionary with user-specified overrides. + docker_settings: Docker-specific settings from the script's metadata. + + Returns: + Updated mounts list or None in case of an error. + """ + try: + # Add mounts specified via `env` variables + for mount_key in docker_settings.get('env_mounts', []): + mount_path = env.get(mount_key, '') + if mount_path: + mounts.append(mount_path) + + # Include user-specified additional mounts + if 'docker_additional_mounts' in i: + mounts.extend(i['docker_additional_mounts']) + + return mounts + except Exception as e: + logging.error(f"Error processing mounts: {e}") + return None + + +def prepare_docker_inputs(i, docker_settings, script_path): + """ + Prepares Docker-specific inputs such as Dockerfile path and runtime options. + + Args: + i: Input dictionary with user-specified overrides. + docker_settings: Docker-specific settings from the script's metadata. + script_path: Path to the script being executed. + + Returns: + Tuple with Docker inputs dictionary and Dockerfile path or None in case of an error. + """ + try: + dockerfile_path = os.path.join(script_path, docker_settings.get('dockerfile', 'Dockerfile')) + docker_args = docker_settings.get('args', {}) + docker_image = i.get('docker_image', docker_settings.get('image', '')) + + docker_inputs = { + 'dockerfile': dockerfile_path, + 'docker_image': docker_image, + 'docker_args': docker_args + } + + return docker_inputs, dockerfile_path + except Exception as e: + logging.error(f"Error preparing Docker inputs: {e}") + return None, None + + +def update_docker_paths(path, mounts=None, force_target_path=''): + """ + Update and return the absolute paths for a given host path and its container equivalent. + Optionally updates a mounts list with the mapping of host and container paths. + + :param path: The original host path. + :param mounts: A list to store host-to-container path mappings in the format "host_path:container_path". + :param force_target_path: Optional; overrides the default container path target. + :return: A tuple of (original_host_path, container_path). + """ + if not path: + return '', '' # Return empty paths if no path is provided. + + # Normalize and resolve the absolute path. + host_path = os.path.abspath(path) + container_path = host_path # Default to the same path for containers. + + # Handle Windows-specific path conversion for Docker. + if os.name == 'nt': + windows_path = PureWindowsPath(host_path) + container_path = str(PurePosixPath('/', *windows_path.parts[1:])) + + # Ensure the container path starts with a forward slash. + if not container_path.startswith('/'): + container_path = '/' + container_path + + # Prepend default container mount base unless overridden. + container_path = '/mlc-mount' + container_path if not force_target_path else force_target_path + + # Determine the mount string based on whether the path is a file or directory. + if os.path.isfile(host_path) or not os.path.isdir(host_path): + mount_entry = f"{os.path.dirname(host_path)}:{os.path.dirname(container_path)}" + else: + mount_entry = f"{host_path}:{container_path}" + + # Add the mount entry to the mounts list if it's not already present. + if mounts is not None: + if all(mount.lower() != mount_entry.lower() for mount in mounts): + mounts.append(mount_entry) + + return host_path, container_path + + +def regenerate_script_cmd(i): + + script_uid = i['script_uid'] + script_alias = i['script_alias'] + tags = i['tags'] + docker_settings = i.get('docker_settings', {}) + fake_run = i.get('fake_run', False) + + i_run_cmd = i['run_cmd'] + + # Remove environment variables with host path values + if 'env' in i_run_cmd: + env = i_run_cmd['env'] + for key in list(env): + value = env[key] + + # Check if the value is a string containing the specified paths + if isinstance(value, str) and ( + os.path.join("local", "cache", "") in value or + os.path.join("MLC", "repos", "") in value + ): + del env[key] + + # Check if the value is a list and remove matching items + elif isinstance(value, list): + # Identify values to remove + values_to_remove = [ + val for val in value + if isinstance(val, str) and ( + os.path.join("local", "cache", "") in val or + os.path.join("MLC", "repos", "") in val + ) + ] + + # Remove key if all values match; otherwise, filter the list + if len(values_to_remove) == len(value): + del env[key] + else: + env[key] = [val for val in value if val not in values_to_remove] + + + docker_run_cmd_prefix = i.get('docker_run_cmd_prefix', '') + + # Regenerate command from dictionary input + run_cmd = 'mlc run script' + + skip_input_for_fake_run = docker_settings.get( + 'skip_input_for_fake_run', []) + add_quotes_to_keys = docker_settings.get('add_quotes_to_keys', []) + + def rebuild_flags( + command_dict, + is_fake_run, + skip_keys_for_fake_run, + quote_keys, + prefix + ): + """ + Recursively rebuilds command-line flags from a dictionary of inputs. + + :param command_dict: Dictionary containing command-line keys and values. + :param is_fake_run: Boolean indicating if this is a fake run. + :param skip_keys_for_fake_run: List of keys to skip in fake run mode. + :param quote_keys: List of keys that require values to be quoted. + :param prefix: String to prepend to keys for hierarchical keys. + :return: A reconstructed command-line string. + """ + command_line = "" + + # Sort keys to ensure 'tags' appears first if present. + keys = sorted(command_dict.keys(), key=lambda x: x != "tags") + + for key in keys: + # Construct the full key with the prefix. + full_key = f"{prefix}.{key}" if prefix else key + + # Skip keys marked for exclusion in fake run mode. + if is_fake_run and full_key in skip_keys_for_fake_run: + continue + + value = command_dict[key] + quote = '\\"' if full_key in quote_keys else "" + + # Recursively process nested dictionaries. + if isinstance(value, dict): + command_line += rebuild_flags( + value, + is_fake_run, + skip_keys_for_fake_run, + quote_keys, + full_key + ) + # Process lists by concatenating values with commas. + elif isinstance(value, list): + list_values = ",".join(f"{quote}{str(item)}{quote}" for item in value) + command_line += f" --{full_key},={list_values}" + # Process scalar values. + else: + command_line += f" --{full_key}={quote}{str(value)}{quote}" + + return command_line + + + run_cmd += rebuild_flags(i_run_cmd, + fake_run, + skip_input_for_fake_run, + add_quotes_to_keys, + '') + + run_cmd = docker_run_cmd_prefix + ' && ' + \ + run_cmd if docker_run_cmd_prefix != '' else run_cmd + + return {'return': 0, 'run_cmd_string': run_cmd} + +def get_docker_default(key): + defaults = { + "mlc_repo": "mlcommons@mlperf-automations", + "mlc_repo_branch": "mlc", + "os": "ubuntu", + "os_version": "24.04", + "fake_run_deps": False, + "run_final_cmds": [], + "skip_run_cmd": False, + "image_tag_extra": "-latest" + } + if key in defaults: + return defaults[key] + return None + + +def get_host_path(value): + path_split = value.split(os.sep) + if len(path_split) == 1: + return value + + new_value = '' + if "cache" in path_split and "local": + repo_entry_index = path_split.index("local") + if len(path_split) >= repo_entry_index + 3: + return os.sep.join(path_split[0:repo_entry_index + 3]) + + return value + + +def get_container_path_script(i): + tmp_dep_cached_path = i['tmp_dep_cached_path'] + value_mnt, value_env = get_container_path(tmp_dep_cached_path) + return {'return': 0, 'value_mnt': value_mnt, 'value_env': value_env} + + +def get_container_path(value): + path_split = value.split(os.sep) + if len(path_split) == 1: + return value + + new_value = '' + if "cache" in path_split and "local" in path_split: + new_path_split = ["", "home", "mlcuser", "MLC", "repos"] + repo_entry_index = path_split.index("local") + if len(path_split) >= repo_entry_index + 3: + new_path_split1 = new_path_split + \ + path_split[repo_entry_index:repo_entry_index + 3] + new_path_split2 = new_path_split + path_split[repo_entry_index:] + return "/".join(new_path_split1), "/".join(new_path_split2) + else: + orig_path, target_path = update_path_for_docker(path=value) + return target_path, target_path + + diff --git a/automation/script/module.py b/automation/script/module.py index ca6584c6b..97b502282 100644 --- a/automation/script/module.py +++ b/automation/script/module.py @@ -4703,105 +4703,13 @@ def doc(self, i): ############################################################ def dockerfile(self, i): - """ - Generate Dockerfile for CM script. - - Args: - (CM input dict): - - (out) (str): if 'con', output to console - - parsed_artifact (list): prepared in CM CLI or CM access function - [ (artifact alias, artifact UID) ] or - [ (artifact alias, artifact UID), (artifact repo alias, artifact repo UID) ] - - (repos) (str): list of repositories to search for automations - - (output_dir) (str): output directory (./ by default) - - Returns: - (CM return dict): - - * return (int): return code == 0 if no error and >0 if error - * (error) (str): error string if return>0 - - """ - - return utils.call_internal_module( - self, __file__, 'module_misc', 'dockerfile', i) + from script.docker import dockerfile + return dockerfile(self, i) ############################################################ def docker(self, i): - """ - Run CM script in an automatically-generated container. - - Args: - (CM input dict): - - (out) (str): if 'con', output to console - - (repos) (str): list of repositories to search for automations - - (output_dir) (str): output directory (./ by default) - - (docker) (dict): convert keys into docker_{key} strings for CM >= 2.3.8.1 - - - (docker_skip_build) (bool): do not generate Dockerfiles and do not recreate Docker image (must exist) - (docker_noregenerate) (bool): do not generate Dockerfiles - (docker_norecreate) (bool): do not recreate Docker image - - (docker_cfg) (str): if True, show all available basic docker configurations, otherwise pre-select one - (docker_cfg_uid) (str): if True, select docker configuration with this UID - - (docker_path) (str): where to create or find Dockerfile - (docker_gh_token) (str): GitHub token for private repositories - (docker_save_script) (str): if !='' name of script to save docker command - (docker_interactive) (bool): if True, run in interactive mode - (docker_it) (bool): the same as `docker_interactive` - (docker_detached) (bool): detach Docker - (docker_dt) (bool) the same as `docker_detached` - - (docker_base_image) (str): force base image - (docker_os) (str): force docker OS (default: ubuntu) - (docker_os_version) (str): force docker OS version (default: 22.04) - (docker_image_tag_extra) (str): add extra tag (default:-latest) - - (docker_cm_repo) (str): force CM automation repository when building Docker (default: mlperf-automations) - (docker_cm_repos) - (docker_cm_repo_flags) - - (dockerfile_env) - - (docker_skip_cm_sys_upgrade) (bool): if True, do not install CM sys deps - - (docker_extra_sys_deps) - - (fake_run_deps) - (docker_run_final_cmds) - - (all_gpus) - (num_gpus) - - (docker_device) - - (docker_port_maps) - - (docker_shm_size) - - (docker_extra_run_args) - - - Returns: - (CM return dict): - - * return (int): return code == 0 if no error and >0 if error - * (error) (str): error string if return>0 - - """ - - return utils.call_internal_module( - self, __file__, 'module_misc', 'docker', i) + from script.docker import docker_run + return docker_run(self, i) ########################################################################## diff --git a/script/build-dockerfile/_cm.yaml b/script/build-dockerfile/_cm.yaml index 9f91c0775..cc81fe3c5 100644 --- a/script/build-dockerfile/_cm.yaml +++ b/script/build-dockerfile/_cm.yaml @@ -19,7 +19,7 @@ default_env: ' CM_DOCKER_OS: ubuntu CM_DOCKER_NOT_PULL_UPDATE: False - CM_MLOPS_REPO_BRANCH: dev + CM_MLOPS_REPO_BRANCH: mlc input_mapping: build: CM_BUILD_DOCKER_IMAGE diff --git a/script/build-dockerfile/customize.py b/script/build-dockerfile/customize.py index 493ca2e8c..604062bf0 100644 --- a/script/build-dockerfile/customize.py +++ b/script/build-dockerfile/customize.py @@ -24,10 +24,13 @@ def preprocess(i): build_args_default = {} input_args = [] copy_files = [] + automation = i['automation'] + + #print(env['CM_DOCKER_RUN_SCRIPT_TAGS']) if env.get('CM_DOCKER_RUN_SCRIPT_TAGS', '') != '': script_tags = env['CM_DOCKER_RUN_SCRIPT_TAGS'] - found_scripts = mlc.access( + found_scripts = automation.action_object.access( {'action': 'search', 'automation': 'script', 'tags': script_tags}) scripts_list = found_scripts['list'] @@ -154,9 +157,8 @@ def preprocess(i): # Maintainers f.write(EOL) f.write( - '# Automatically generated by the CM workflow automation meta-framework' + + '# Automatically generated by the MLC workflow automation meta-framework' + EOL) - f.write('# https://github.com/mlcommons/ck' + EOL) f.write(EOL) f.write('LABEL github=""' + EOL) diff --git a/script/build-dockerfile/dockerinfo.json b/script/build-dockerfile/dockerinfo.json index df9c6c90a..a68dec88d 100644 --- a/script/build-dockerfile/dockerinfo.json +++ b/script/build-dockerfile/dockerinfo.json @@ -1,6 +1,6 @@ { "python-packages": [ - "wheel", "cmind", "requests", "giturlparse", "tabulate" + "wheel", "mlcflow", "requests", "giturlparse", "tabulate" ], "ARGS": [ "CM_GH_TOKEN" @@ -12,18 +12,18 @@ "ENTRYPOINT": "[\"/bin/bash\", \"-c\"]", "ENV": { "TZ": "US/Pacific", - "PATH": "${PATH}:/home/cmuser/.local/bin" + "PATH": "${PATH}:/home/mlcuser/.local/bin" }, "RUN_CMDS": [ "ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ >/etc/timezone" ], "PYTHON": "python3", "UID": "", - "USER": "cmuser", + "USER": "mlcuser", "GID": "", "GROUP": "cm", "SHELL": "[\"/bin/bash\", \"-c\"]", - "WORKDIR": "/home/cmuser", + "WORKDIR": "/home/mlcuser", "distros": { "ubuntu": { "package-manager-update-cmd": "apt-get update -y", @@ -65,7 +65,7 @@ "python39", "python39-pip", "git", "wget", "sudo", "binutils" ], "python-packages": [ - "cmind", "requests", "giturlparse", "tabulate" + "mlcflow", "requests", "giturlparse", "tabulate" ], "PYTHON": "python3.9" } From 5cf398517a66d4b17aee54d59759dea5907df653 Mon Sep 17 00:00:00 2001 From: arjunsuresh Date: Mon, 20 Jan 2025 21:45:56 +0000 Subject: [PATCH 33/84] [Automated Commit] Format Codebase --- automation/script/docker.py | 191 +++++++++++++++------------ automation/script/docker_utils.py | 74 ++++++----- script/build-dockerfile/customize.py | 3 +- 3 files changed, 147 insertions(+), 121 deletions(-) diff --git a/automation/script/docker.py b/automation/script/docker.py index 3a1dfbf96..bd511d7e3 100644 --- a/automation/script/docker.py +++ b/automation/script/docker.py @@ -6,10 +6,12 @@ from script.docker_utils import * import copy + def dockerfile(self_module, input_params): # Step 1: Prune and prepare input - prune_result = prune_input({'input': input_params, 'extra_keys_starts_with': ['docker_']}) + prune_result = prune_input( + {'input': input_params, 'extra_keys_starts_with': ['docker_']}) if prune_result['return'] > 0: return prune_result @@ -45,14 +47,13 @@ def dockerfile(self_module, input_params): script_alias = metadata.get('alias', '') script_uid = metadata.get('uid', '') - run_state = { - 'deps': [], - 'fake_deps': [], - 'parent': None, - 'script_id': f"{script_alias},{script_uid}", - 'script_variation_tags': variation_tags - } + 'deps': [], + 'fake_deps': [], + 'parent': None, + 'script_id': f"{script_alias},{script_uid}", + 'script_variation_tags': variation_tags + } docker_settings = metadata.get('docker', {}) docker_settings['dockerfile_env'] = dockerfile_environment_vars state_data['docker'] = docker_settings @@ -60,33 +61,34 @@ def dockerfile(self_module, input_params): # Update state with metadata and variations update_state_result = self_module.update_state_from_meta( - metadata, environment_vars, state_data, constant_vars, constant_state, - deps=[], - post_deps=[], - prehook_deps=[], - posthook_deps=[], - new_env_keys=[], - new_state_keys=[], - run_state=run_state, - i=input_params - ) + metadata, environment_vars, state_data, constant_vars, constant_state, + deps=[], + post_deps=[], + prehook_deps=[], + posthook_deps=[], + new_env_keys=[], + new_state_keys=[], + run_state=run_state, + i=input_params + ) if update_state_result['return'] > 0: return update_state_result update_variations_result = self_module._update_state_from_variations( - input_params, metadata, variation_tags, metadata.get('variations', {}), - environment_vars, state_data, constant_vars, constant_state, - deps=[], # Add your dependencies if needed - post_deps=[], # Add post dependencies if needed - prehook_deps=[], # Add prehook dependencies if needed - posthook_deps=[], # Add posthook dependencies if needed - new_env_keys_from_meta=[], # Add keys from meta if needed - new_state_keys_from_meta=[], # Add state keys from meta if needed - add_deps_recursive=add_deps_recursive, - run_state=run_state, - recursion_spaces='', - verbose=verbose # Set to True or False as needed - ) + input_params, metadata, variation_tags, metadata.get( + 'variations', {}), + environment_vars, state_data, constant_vars, constant_state, + deps=[], # Add your dependencies if needed + post_deps=[], # Add post dependencies if needed + prehook_deps=[], # Add prehook dependencies if needed + posthook_deps=[], # Add posthook dependencies if needed + new_env_keys_from_meta=[], # Add keys from meta if needed + new_state_keys_from_meta=[], # Add state keys from meta if needed + add_deps_recursive=add_deps_recursive, + run_state=run_state, + recursion_spaces='', + verbose=verbose # Set to True or False as needed + ) if update_variations_result['return'] > 0: return update_variations_result @@ -95,7 +97,8 @@ def dockerfile(self_module, input_params): docker_settings['dockerfile_env'] = dockerfile_environment_vars dockerfile_environment_vars['CM_RUN_STATE_DOCKER'] = True - if not docker_settings.get('run', True) and not input_params.get('docker_run_override', False): + if not docker_settings.get('run', True) and not input_params.get( + 'docker_run_override', False): logging.info("Docker 'run' is set to False in meta.json") continue @@ -103,8 +106,9 @@ def dockerfile(self_module, input_params): build_dependencies = docker_settings.get('build_deps', []) if build_dependencies: deps_result = self_module._run_deps( - build_dependencies, run_state=run_state, verbose=input_params.get('v', False) - ) + build_dependencies, run_state=run_state, verbose=input_params.get( + 'v', False) + ) if deps_result['return'] > 0: return deps_result @@ -123,7 +127,7 @@ def dockerfile(self_module, input_params): 'fake_run': True, 'docker_settings': docker_settings, 'docker_run_cmd_prefix': input_params.get('docker_run_cmd_prefix', docker_settings.get('run_cmd_prefix', '')) - }) + }) if regenerate_result['return'] > 0: return regenerate_result @@ -131,14 +135,16 @@ def dockerfile(self_module, input_params): # Collect Dockerfile inputs dockerfile_inputs = { - key: input_params.get(f"docker_{key}", docker_settings.get(key, get_docker_default(key))) - for key in [ - "mlc_repo", "mlc_repo_branch", "base_image", "os", "os_version", - "mlc_repos", "skip_mlc_sys_upgrade", "extra_sys_deps", - "gh_token", "fake_run_deps", "run_final_cmds", "real_run", "copy_files", "path" - ] - if (value := input_params.get(f"docker_{key}", docker_settings.get(key, get_docker_default(key)))) is not None - } + key: input_params.get( + f"docker_{key}", docker_settings.get( + key, get_docker_default(key))) + for key in [ + "mlc_repo", "mlc_repo_branch", "base_image", "os", "os_version", + "mlc_repos", "skip_mlc_sys_upgrade", "extra_sys_deps", + "gh_token", "fake_run_deps", "run_final_cmds", "real_run", "copy_files", "path" + ] + if (value := input_params.get(f"docker_{key}", docker_settings.get(key, get_docker_default(key)))) is not None + } # Determine Dockerfile suffix and path docker_base_image = dockerfile_inputs.get('base_image') @@ -146,22 +152,26 @@ def dockerfile(self_module, input_params): if not docker_path: docker_path = script_directory docker_filename_suffix = ( - docker_base_image.replace('/', '-').replace(':', '-') - if docker_base_image else f"{dockerfile_inputs['os']}_{dockerfile_inputs['os_version']}" - ) - dockerfile_path = os.path.join(docker_path, 'dockerfiles', f"{docker_filename_suffix}.Dockerfile") + docker_base_image.replace('/', '-').replace(':', '-') + if docker_base_image else f"{dockerfile_inputs['os']}_{dockerfile_inputs['os_version']}" + ) + dockerfile_path = os.path.join( + docker_path, + 'dockerfiles', + f"{docker_filename_suffix}.Dockerfile") # Handle optional dependencies and comments if input_params.get('print_deps'): mlc_input = { - 'action': 'run', 'automation': 'script', 'tags': input_params.get('tags'), - 'print_deps': True, 'quiet': True, 'silent': True, - 'fake_run': True, 'fake_deps': True - } + 'action': 'run', 'automation': 'script', 'tags': input_params.get('tags'), + 'print_deps': True, 'quiet': True, 'silent': True, + 'fake_run': True, 'fake_deps': True + } deps_result = self_module.action_object.access(mlc_input) if deps_result['return'] > 0: return deps_result - comments = [f"#RUN {dep}" for dep in deps_result['new_state']['print_deps']] + comments = [ + f"#RUN {dep}" for dep in deps_result['new_state']['print_deps']] else: comments = [] @@ -171,13 +181,13 @@ def dockerfile(self_module, input_params): # Generate Dockerfile mlc_docker_input = { - 'action': 'run', 'automation': 'script', 'tags': 'build,dockerfile', - 'fake_run_option': " " if dockerfile_inputs.get('real_run') else " --fake_run", - 'comments': comments, 'run_cmd': f"{run_command_string} --quiet", - 'script_tags': input_params.get('tags'), 'env': environment_vars, - 'dockerfile_env': dockerfile_environment_vars, - 'quiet': True, 'v': input_params.get('v', False), 'real_run': True - } + 'action': 'run', 'automation': 'script', 'tags': 'build,dockerfile', + 'fake_run_option': " " if dockerfile_inputs.get('real_run') else " --fake_run", + 'comments': comments, 'run_cmd': f"{run_command_string} --quiet", + 'script_tags': input_params.get('tags'), 'env': environment_vars, + 'dockerfile_env': dockerfile_environment_vars, + 'quiet': True, 'v': input_params.get('v', False), 'real_run': True + } mlc_docker_input.update(dockerfile_inputs) dockerfile_result = self_module.action_object.access(mlc_docker_input) @@ -188,6 +198,7 @@ def dockerfile(self_module, input_params): return {'return': 0} + def docker_run(self_module, i): """ Automates the execution of MLC scripts within a Docker container. @@ -239,8 +250,12 @@ def docker_run(self_module, i): return {'return': 1, 'error': 'No scripts were found'} env['CM_RUN_STATE_DOCKER'] = False - state, const, const_state = i.get('state', {}), i.get('const', {}), i.get('const_state', {}) - variation_tags = [t[1:] for t in i.get('tags', '').split(",") if t.startswith("_")] + state, const, const_state = i.get( + 'state', {}), i.get( + 'const', {}), i.get( + 'const_state', {}) + variation_tags = [t[1:] + for t in i.get('tags', '').split(",") if t.startswith("_")] docker_cache = i.get('docker_cache', "yes") if docker_cache.lower() in ["no", "false"]: @@ -250,37 +265,41 @@ def docker_run(self_module, i): add_deps_recursive = i.get('add_deps_recursive') # Ensure Docker is available - r = self_module.action_object.access({'action': 'run', 'automation': 'script', 'tags': "get,docker"}) + r = self_module.action_object.access( + {'action': 'run', 'automation': 'script', 'tags': "get,docker"}) if r['return'] > 0: return r # Process each artifact for artifact in sorted(lst, key=lambda x: x.meta.get('alias', '')): meta, script_path = artifact.meta, artifact.path - tags, script_alias, script_uid = meta.get("tags", []), meta.get('alias', ''), meta.get('uid', '') + tags, script_alias, script_uid = meta.get( + "tags", []), meta.get( + 'alias', ''), meta.get( + 'uid', '') mounts = copy.deepcopy(i.get('docker_mounts', [])) variations = meta.get('variations', {}) docker_settings = meta.get('docker', {}) state['docker'] = docker_settings run_state = { - 'deps': [], 'fake_deps': [], 'parent': None, - 'script_id': f"{script_alias},{script_uid}", - 'script_variation_tags': variation_tags - } + 'deps': [], 'fake_deps': [], 'parent': None, + 'script_id': f"{script_alias},{script_uid}", + 'script_variation_tags': variation_tags + } # Update state and handle variations r = self_module.update_state_from_meta(meta, env, state, const, const_state, deps=[], - post_deps=[], - prehook_deps=[], - posthook_deps=[], - new_env_keys=[], - new_state_keys=[], run_state=run_state, i=i) + post_deps=[], + prehook_deps=[], + posthook_deps=[], + new_env_keys=[], + new_state_keys=[], run_state=run_state, i=i) if r['return'] > 0: return r r = self_module._update_state_from_variations( - i, meta, variation_tags, variations, env, state, const, const_state, deps=[], + i, meta, variation_tags, variations, env, state, const, const_state, deps=[], post_deps=[], prehook_deps=[], posthook_deps=[], @@ -292,7 +311,8 @@ def docker_run(self_module, i): return r # Skip scripts marked as non-runnable - if not docker_settings.get('run', True) and not i.get('docker_run_override', False): + if not docker_settings.get('run', True) and not i.get( + 'docker_run_override', False): logging.info("docker.run set to False in meta.yaml") continue @@ -306,28 +326,31 @@ def docker_run(self_module, i): return {'return': 1, 'error': 'Error processing mounts'} # Prepare Docker-specific inputs - docker_inputs, dockerfile_path = prepare_docker_inputs(i, docker_settings, script_path) + docker_inputs, dockerfile_path = prepare_docker_inputs( + i, docker_settings, script_path) if docker_inputs is None: return {'return': 1, 'error': 'Error preparing Docker inputs'} # Generate the run command - r = regenerate_script_cmd({'script_uid': script_uid, 'script_alias': script_alias, 'tags': tags, 'run_cmd': f_run_cmd}) + r = regenerate_script_cmd({'script_uid': script_uid, + 'script_alias': script_alias, + 'tags': tags, + 'run_cmd': f_run_cmd}) if r['return'] > 0: return r final_run_cmd = r['run_cmd_string'] # Execute the Docker container mlc_docker_input = { - 'action': 'run', 'automation': 'script', 'tags': 'run,docker,container', - 'recreate': 'yes' if not norecreate_docker_image else 'no', - 'env': env, 'interactive': interactive, 'mounts': mounts, 'detached': detached, - 'script_tags': i.get('tags'), 'run_cmd': final_run_cmd, 'v': verbose, - 'quiet': True, 'real_run': True, 'add_deps_recursive': {'build-docker-image': {'dockerfile': dockerfile_path}}, - **docker_inputs - } + 'action': 'run', 'automation': 'script', 'tags': 'run,docker,container', + 'recreate': 'yes' if not norecreate_docker_image else 'no', + 'env': env, 'interactive': interactive, 'mounts': mounts, 'detached': detached, + 'script_tags': i.get('tags'), 'run_cmd': final_run_cmd, 'v': verbose, + '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 return {'return': 0} - diff --git a/automation/script/docker_utils.py b/automation/script/docker_utils.py index 512b25da6..2e1f40b9f 100644 --- a/automation/script/docker_utils.py +++ b/automation/script/docker_utils.py @@ -6,6 +6,7 @@ from script.docker_utils import * import copy + def process_mounts(mounts, env, i, docker_settings): """ Processes and updates the Docker mounts based on the provided inputs and environment variables. @@ -49,7 +50,9 @@ def prepare_docker_inputs(i, docker_settings, script_path): Tuple with Docker inputs dictionary and Dockerfile path or None in case of an error. """ try: - dockerfile_path = os.path.join(script_path, docker_settings.get('dockerfile', 'Dockerfile')) + dockerfile_path = os.path.join( + script_path, docker_settings.get( + 'dockerfile', 'Dockerfile')) docker_args = docker_settings.get('args', {}) docker_image = i.get('docker_image', docker_settings.get('image', '')) @@ -92,9 +95,11 @@ def update_docker_paths(path, mounts=None, force_target_path=''): container_path = '/' + container_path # Prepend default container mount base unless overridden. - container_path = '/mlc-mount' + container_path if not force_target_path else force_target_path + container_path = '/mlc-mount' + \ + container_path if not force_target_path else force_target_path - # Determine the mount string based on whether the path is a file or directory. + # Determine the mount string based on whether the path is a file or + # directory. if os.path.isfile(host_path) or not os.path.isdir(host_path): mount_entry = f"{os.path.dirname(host_path)}:{os.path.dirname(container_path)}" else: @@ -128,26 +133,26 @@ def regenerate_script_cmd(i): if isinstance(value, str) and ( os.path.join("local", "cache", "") in value or os.path.join("MLC", "repos", "") in value - ): + ): del env[key] # Check if the value is a list and remove matching items elif isinstance(value, list): # Identify values to remove values_to_remove = [ - val for val in value - if isinstance(val, str) and ( - os.path.join("local", "cache", "") in val or - os.path.join("MLC", "repos", "") in val - ) - ] + val for val in value + if isinstance(val, str) and ( + os.path.join("local", "cache", "") in val or + os.path.join("MLC", "repos", "") in val + ) + ] # Remove key if all values match; otherwise, filter the list if len(values_to_remove) == len(value): del env[key] else: - env[key] = [val for val in value if val not in values_to_remove] - + env[key] = [ + val for val in value if val not in values_to_remove] docker_run_cmd_prefix = i.get('docker_run_cmd_prefix', '') @@ -155,7 +160,7 @@ def regenerate_script_cmd(i): run_cmd = 'mlc run script' skip_input_for_fake_run = docker_settings.get( - 'skip_input_for_fake_run', []) + 'skip_input_for_fake_run', []) add_quotes_to_keys = docker_settings.get('add_quotes_to_keys', []) def rebuild_flags( @@ -164,7 +169,7 @@ def rebuild_flags( skip_keys_for_fake_run, quote_keys, prefix - ): + ): """ Recursively rebuilds command-line flags from a dictionary of inputs. @@ -194,15 +199,16 @@ def rebuild_flags( # Recursively process nested dictionaries. if isinstance(value, dict): command_line += rebuild_flags( - value, - is_fake_run, - skip_keys_for_fake_run, - quote_keys, - full_key - ) + value, + is_fake_run, + skip_keys_for_fake_run, + quote_keys, + full_key + ) # Process lists by concatenating values with commas. elif isinstance(value, list): - list_values = ",".join(f"{quote}{str(item)}{quote}" for item in value) + list_values = ",".join( + f"{quote}{str(item)}{quote}" for item in value) command_line += f" --{full_key},={list_values}" # Process scalar values. else: @@ -210,7 +216,6 @@ def rebuild_flags( return command_line - run_cmd += rebuild_flags(i_run_cmd, fake_run, skip_input_for_fake_run, @@ -218,21 +223,22 @@ def rebuild_flags( '') run_cmd = docker_run_cmd_prefix + ' && ' + \ - run_cmd if docker_run_cmd_prefix != '' else run_cmd + run_cmd if docker_run_cmd_prefix != '' else run_cmd return {'return': 0, 'run_cmd_string': run_cmd} + def get_docker_default(key): defaults = { - "mlc_repo": "mlcommons@mlperf-automations", - "mlc_repo_branch": "mlc", - "os": "ubuntu", - "os_version": "24.04", - "fake_run_deps": False, - "run_final_cmds": [], - "skip_run_cmd": False, - "image_tag_extra": "-latest" - } + "mlc_repo": "mlcommons@mlperf-automations", + "mlc_repo_branch": "mlc", + "os": "ubuntu", + "os_version": "24.04", + "fake_run_deps": False, + "run_final_cmds": [], + "skip_run_cmd": False, + "image_tag_extra": "-latest" + } if key in defaults: return defaults[key] return None @@ -269,11 +275,9 @@ def get_container_path(value): repo_entry_index = path_split.index("local") if len(path_split) >= repo_entry_index + 3: new_path_split1 = new_path_split + \ - path_split[repo_entry_index:repo_entry_index + 3] + path_split[repo_entry_index:repo_entry_index + 3] new_path_split2 = new_path_split + path_split[repo_entry_index:] return "/".join(new_path_split1), "/".join(new_path_split2) else: orig_path, target_path = update_path_for_docker(path=value) return target_path, target_path - - diff --git a/script/build-dockerfile/customize.py b/script/build-dockerfile/customize.py index 604062bf0..01ccba365 100644 --- a/script/build-dockerfile/customize.py +++ b/script/build-dockerfile/customize.py @@ -26,8 +26,7 @@ def preprocess(i): copy_files = [] automation = i['automation'] - - #print(env['CM_DOCKER_RUN_SCRIPT_TAGS']) + # print(env['CM_DOCKER_RUN_SCRIPT_TAGS']) if env.get('CM_DOCKER_RUN_SCRIPT_TAGS', '') != '': script_tags = env['CM_DOCKER_RUN_SCRIPT_TAGS'] found_scripts = automation.action_object.access( From 0998095519ee484e1b36743f7270e585b30722f8 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Tue, 21 Jan 2025 03:35:45 +0530 Subject: [PATCH 34/84] Fixes on Windows for MLC --- automation/script/module.py | 4 ++-- script/get-sys-utils-min/customize.py | 22 ++++++---------------- 2 files changed, 8 insertions(+), 18 deletions(-) diff --git a/automation/script/module.py b/automation/script/module.py index 97b502282..98d5441e6 100644 --- a/automation/script/module.py +++ b/automation/script/module.py @@ -4960,8 +4960,8 @@ def find_cached_script(i): # TODO Need to restrict the below check to within container # env i['tmp_dep_cached_path'] = dependent_cached_path - r = utils.call_internal_module( - self_obj, __file__, 'module_misc', 'get_container_path_script', i) + import script.docker_utils + r = docker_utils.utils.get_container_path_script(i) if not os.path.exists(r['value_env']): # Need to rm this cache entry skip_cached_script = True diff --git a/script/get-sys-utils-min/customize.py b/script/get-sys-utils-min/customize.py index 2c25d3c4a..bbbb9232e 100644 --- a/script/get-sys-utils-min/customize.py +++ b/script/get-sys-utils-min/customize.py @@ -38,26 +38,16 @@ def preprocess(i): print('') print('Downloading from {}'.format(url)) - - r = cm.access({'action': 'download_file', - 'automation': 'utils,dc2743f8450541e3', + env['CM_DAE_FINAL_ENV_NAME'] = 'FILENAME' + env['CM_OUTDIRNAME'] = os.curdir() + r = cm.access({'action': 'run', + 'target': 'script' + 'env': env, + 'tags': 'download-and-extract' 'url': url}) if r['return'] > 0: return r - filename = r['filename'] - - print('Unzipping file {}'.format(filename)) - - r = cm.access({'action': 'unzip_file', - 'automation': 'utils,dc2743f8450541e3', - 'filename': filename}) - if r['return'] > 0: - return r - - if os.path.isfile(filename): - print('Removing file {}'.format(filename)) - os.remove(filename) print('') From 6da9756ed6b56780442243ae69a632f6c23c91ab Mon Sep 17 00:00:00 2001 From: arjunsuresh Date: Mon, 20 Jan 2025 22:06:12 +0000 Subject: [PATCH 35/84] [Automated Commit] Format Codebase --- script/get-sys-utils-min/customize.py | 1 - 1 file changed, 1 deletion(-) diff --git a/script/get-sys-utils-min/customize.py b/script/get-sys-utils-min/customize.py index bbbb9232e..c0aafeb8a 100644 --- a/script/get-sys-utils-min/customize.py +++ b/script/get-sys-utils-min/customize.py @@ -48,7 +48,6 @@ def preprocess(i): if r['return'] > 0: return r - print('') # Add to path From 4c5aa36b47f489f31bcbd3e7c1c258dbcfdbcf3b Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Tue, 21 Jan 2025 17:25:26 +0530 Subject: [PATCH 36/84] Fix for mlc docker --- script/build-dockerfile/customize.py | 4 ++-- script/build-dockerfile/dockerinfo.json | 4 ++-- script/run-docker-container/customize.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/script/build-dockerfile/customize.py b/script/build-dockerfile/customize.py index 01ccba365..c95c2f96f 100644 --- a/script/build-dockerfile/customize.py +++ b/script/build-dockerfile/customize.py @@ -248,8 +248,8 @@ def preprocess(i): f.write('RUN ' + cmd + EOL) f.write(EOL + '# Setup docker user' + EOL) - docker_user = get_value(env, config, 'USER', 'CM_DOCKER_USER') - docker_group = get_value(env, config, 'GROUP', 'CM_DOCKER_GROUP') + docker_user = get_value(env, config, 'USER', 'MLC_DOCKER_USER') + docker_group = get_value(env, config, 'GROUP', 'MLC_DOCKER_GROUP') if env.get('CM_CONTAINER_TOOL', '') == 'podman' and env.get( 'CM_DOCKER_USE_DEFAULT_USER', '') == '': diff --git a/script/build-dockerfile/dockerinfo.json b/script/build-dockerfile/dockerinfo.json index a68dec88d..4cc98e35c 100644 --- a/script/build-dockerfile/dockerinfo.json +++ b/script/build-dockerfile/dockerinfo.json @@ -3,7 +3,7 @@ "wheel", "mlcflow", "requests", "giturlparse", "tabulate" ], "ARGS": [ - "CM_GH_TOKEN" + "MLC_GH_TOKEN" ], "ARGS_DEFAULT": { "UID" : "1000", @@ -21,7 +21,7 @@ "UID": "", "USER": "mlcuser", "GID": "", - "GROUP": "cm", + "GROUP": "mlc", "SHELL": "[\"/bin/bash\", \"-c\"]", "WORKDIR": "/home/mlcuser", "distros": { diff --git a/script/run-docker-container/customize.py b/script/run-docker-container/customize.py index 9dce09564..f35f22f57 100644 --- a/script/run-docker-container/customize.py +++ b/script/run-docker-container/customize.py @@ -386,7 +386,7 @@ def update_docker_info(env): if env.get('CM_DOCKER_IMAGE_NAME', '') != '': docker_image_name = env['CM_DOCKER_IMAGE_NAME'] else: - docker_image_name = 'cm-script-' + \ + docker_image_name = 'mlc-script-' + \ env['CM_DOCKER_RUN_SCRIPT_TAGS'].replace( ',', '-').replace('_', '-').replace('+', 'plus') env['CM_DOCKER_IMAGE_NAME'] = docker_image_name From 1c432c67310a13b564452e1d5cda61729c27a2d7 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Tue, 21 Jan 2025 22:03:38 +0530 Subject: [PATCH 37/84] Changes to support repo class in mlc --- automation/script/module.py | 16 ++++++------- script/test-cm-core/src/test_search_speed.py | 6 ++--- script/test-dummy/COPYRIGHT.md | 9 -------- script/test-dummy/README-extra.md | 1 - script/test-dummy/_cm.yaml | 11 --------- script/test-dummy/customize.py | 24 -------------------- script/test-dummy/run.bat | 1 - script/test-dummy/run.sh | 2 -- script/test-set-sys-user-cm/COPYRIGHT.md | 9 -------- script/test-set-sys-user-cm/README.md | 1 - script/test-set-sys-user-cm/_cm.yaml | 14 ------------ script/test-set-sys-user-cm/run.sh | 7 ------ 12 files changed, 11 insertions(+), 90 deletions(-) delete mode 100644 script/test-dummy/COPYRIGHT.md delete mode 100644 script/test-dummy/README-extra.md delete mode 100644 script/test-dummy/_cm.yaml delete mode 100644 script/test-dummy/customize.py delete mode 100644 script/test-dummy/run.bat delete mode 100644 script/test-dummy/run.sh delete mode 100644 script/test-set-sys-user-cm/COPYRIGHT.md delete mode 100644 script/test-set-sys-user-cm/README.md delete mode 100644 script/test-set-sys-user-cm/_cm.yaml delete mode 100644 script/test-set-sys-user-cm/run.sh diff --git a/automation/script/module.py b/automation/script/module.py index 98d5441e6..559fffb3a 100644 --- a/automation/script/module.py +++ b/automation/script/module.py @@ -783,12 +783,12 @@ def _run(self, i): min_mlc_version, current_mlc_version)} # Check path to repo - script_repo_path = script_artifact.repo_path + script_repo_path = script_artifact.repo.path - script_repo_path_with_prefix = script_artifact.repo_path - if script_artifact.repo_meta.get('prefix', '') != '': + script_repo_path_with_prefix = script_artifact.repo.path + if script_artifact.repo.meta.get('prefix', '') != '': script_repo_path_with_prefix = os.path.join( - script_repo_path, script_artifact.repo_meta['prefix']) + script_repo_path, script_artifact.repo.meta['prefix']) env['CM_TMP_CURRENT_SCRIPT_REPO_PATH'] = script_repo_path env['CM_TMP_CURRENT_SCRIPT_REPO_PATH_WITH_PREFIX'] = script_repo_path_with_prefix @@ -801,18 +801,18 @@ def _run(self, i): run_state['script_id'] = meta['alias'] + "," + meta['uid'] run_state['script_tags'] = script_tags run_state['script_variation_tags'] = variation_tags - run_state['script_repo_alias'] = script_artifact.repo_meta.get( + run_state['script_repo_alias'] = script_artifact.repo.meta.get( 'alias', '') - run_state['script_repo_git'] = script_artifact.repo_meta.get( + run_state['script_repo_git'] = script_artifact.repo.meta.get( 'git', False) run_state['cache'] = meta.get('cache', False) if not recursion: run_state['script_entry_repo_to_report_errors'] = meta.get( 'repo_to_report_errors', '') - run_state['script_entry_repo_alias'] = script_artifact.repo_meta.get( + run_state['script_entry_repo_alias'] = script_artifact.repo.meta.get( 'alias', '') - run_state['script_entry_repo_git'] = script_artifact.repo_meta.get( + run_state['script_entry_repo_git'] = script_artifact.repo.meta.get( 'git', False) deps = meta.get('deps', []) diff --git a/script/test-cm-core/src/test_search_speed.py b/script/test-cm-core/src/test_search_speed.py index 577c4f0b8..c52900431 100644 --- a/script/test-cm-core/src/test_search_speed.py +++ b/script/test-cm-core/src/test_search_speed.py @@ -1,4 +1,4 @@ -import cmind as cm +import mlc import time times = [] @@ -10,13 +10,13 @@ for step in range(steps): start = time.time() - r = cm.access({'action': 'search', + r = mlc.access({'action': 'search', 'automation': 'script', 'tags': 'detect,os'}) timer = time.time() - start if r['return'] > 0: - cm.error(r) + mlc.error(r) times.append(timer) diff --git a/script/test-dummy/COPYRIGHT.md b/script/test-dummy/COPYRIGHT.md deleted file mode 100644 index a059b0c49..000000000 --- a/script/test-dummy/COPYRIGHT.md +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright Notice - -© 2024-2025 MLCommons. All Rights Reserved. - -This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of the License can be obtained at: - -[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0) - -Unless required by applicable law or agreed to in writing, software distributed under the License is provided on an "AS IS" basis, without warranties or conditions of any kind, either express or implied. Please refer to the License for the specific language governing permissions and limitations under the License. diff --git a/script/test-dummy/README-extra.md b/script/test-dummy/README-extra.md deleted file mode 100644 index 582991f6d..000000000 --- a/script/test-dummy/README-extra.md +++ /dev/null @@ -1 +0,0 @@ -# CM script diff --git a/script/test-dummy/_cm.yaml b/script/test-dummy/_cm.yaml deleted file mode 100644 index 09ba01f92..000000000 --- a/script/test-dummy/_cm.yaml +++ /dev/null @@ -1,11 +0,0 @@ -alias: test-dummy -uid: 3ef5d69f929349bc - -automation_alias: script -automation_uid: 5b4e0237da074764 - -cache: false - -tags: -- test -- dummy diff --git a/script/test-dummy/customize.py b/script/test-dummy/customize.py deleted file mode 100644 index 3df1d0660..000000000 --- a/script/test-dummy/customize.py +++ /dev/null @@ -1,24 +0,0 @@ -from mlc import utils -import os - - -def preprocess(i): - - os_info = i['os_info'] - - env = i['env'] - - meta = i['meta'] - - automation = i['automation'] - - quiet = (env.get('CM_QUIET', False) == 'yes') - - return {'return': 0} - - -def postprocess(i): - - env = i['env'] - - return {'return': 0} diff --git a/script/test-dummy/run.bat b/script/test-dummy/run.bat deleted file mode 100644 index 648302ca7..000000000 --- a/script/test-dummy/run.bat +++ /dev/null @@ -1 +0,0 @@ -rem native script diff --git a/script/test-dummy/run.sh b/script/test-dummy/run.sh deleted file mode 100644 index 05a7907cf..000000000 --- a/script/test-dummy/run.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash - diff --git a/script/test-set-sys-user-cm/COPYRIGHT.md b/script/test-set-sys-user-cm/COPYRIGHT.md deleted file mode 100644 index 9e44ad290..000000000 --- a/script/test-set-sys-user-cm/COPYRIGHT.md +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright Notice - -© 2022-2025 MLCommons. All Rights Reserved. - -This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of the License can be obtained at: - -[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0) - -Unless required by applicable law or agreed to in writing, software distributed under the License is provided on an "AS IS" basis, without warranties or conditions of any kind, either express or implied. Please refer to the License for the specific language governing permissions and limitations under the License. diff --git a/script/test-set-sys-user-cm/README.md b/script/test-set-sys-user-cm/README.md deleted file mode 100644 index 3fd22bc6c..000000000 --- a/script/test-set-sys-user-cm/README.md +++ /dev/null @@ -1 +0,0 @@ -Please see [https://docs.mlcommons.org/cm4mlops/scripts/Tests/test-set-sys-user-cm](https://docs.mlcommons.org/cm4mlops/scripts/Tests/test-set-sys-user-cm) for the documentation of this CM script. diff --git a/script/test-set-sys-user-cm/_cm.yaml b/script/test-set-sys-user-cm/_cm.yaml deleted file mode 100644 index 742309e1b..000000000 --- a/script/test-set-sys-user-cm/_cm.yaml +++ /dev/null @@ -1,14 +0,0 @@ -alias: test-set-sys-user-cm -automation_alias: script -automation_uid: 5b4e0237da074764 -cache: true -category: Tests -default_env: - CM_SUDO: sudo -tags: -- demo -- set -- sys-user -- cm -- sys-user-cm -uid: 25fdfcf0fe434af2 diff --git a/script/test-set-sys-user-cm/run.sh b/script/test-set-sys-user-cm/run.sh deleted file mode 100644 index c0d513db7..000000000 --- a/script/test-set-sys-user-cm/run.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -${CM_SUDO} groupadd -g 1111 ckuser -${CM_SUDO} useradd -u 2222 -g ckuser --create-home --shell /bin/bash ckuser -${CM_SUDO} echo "ckuser:ckuser" | chpasswd -${CM_SUDO} adduser ckuser sudo -${CM_SUDO} echo "ckuser ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers From 1e306d3f2229f230319711316af1dd432a193536 Mon Sep 17 00:00:00 2001 From: arjunsuresh Date: Tue, 21 Jan 2025 16:33:57 +0000 Subject: [PATCH 38/84] [Automated Commit] Format Codebase --- script/test-cm-core/src/test_search_speed.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/test-cm-core/src/test_search_speed.py b/script/test-cm-core/src/test_search_speed.py index c52900431..b153f2162 100644 --- a/script/test-cm-core/src/test_search_speed.py +++ b/script/test-cm-core/src/test_search_speed.py @@ -12,7 +12,7 @@ start = time.time() r = mlc.access({'action': 'search', 'automation': 'script', - 'tags': 'detect,os'}) + 'tags': 'detect,os'}) timer = time.time() - start if r['return'] > 0: From 75cfd6f72a9b6eee41aaacc1ca407c4ef87753b7 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Tue, 21 Jan 2025 23:12:17 +0530 Subject: [PATCH 39/84] fixes to get-sys-utils-min --- script/get-sys-utils-min/customize.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/script/get-sys-utils-min/customize.py b/script/get-sys-utils-min/customize.py index c0aafeb8a..9c91e0d90 100644 --- a/script/get-sys-utils-min/customize.py +++ b/script/get-sys-utils-min/customize.py @@ -39,11 +39,11 @@ def preprocess(i): print('') print('Downloading from {}'.format(url)) env['CM_DAE_FINAL_ENV_NAME'] = 'FILENAME' - env['CM_OUTDIRNAME'] = os.curdir() + env['CM_OUTDIRNAME'] = os.getcwd() r = cm.access({'action': 'run', - 'target': 'script' + 'target': 'script', 'env': env, - 'tags': 'download-and-extract' + 'tags': 'download-and-extract,_extract', 'url': url}) if r['return'] > 0: return r From 37fb87fe3ff57135e5c577f545ef6d13a275d1b5 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Wed, 22 Jan 2025 00:03:08 +0530 Subject: [PATCH 40/84] Fix to get-cmake on windows --- script/install-cmake-prebuilt/customize.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/script/install-cmake-prebuilt/customize.py b/script/install-cmake-prebuilt/customize.py index 1e43d75b3..2ccdd52d9 100644 --- a/script/install-cmake-prebuilt/customize.py +++ b/script/install-cmake-prebuilt/customize.py @@ -84,10 +84,9 @@ def preprocess(i): if os_info['platform'] == 'windows': print('Unzipping file {}'.format(filename)) - r = cm.access({'action': 'unzip_file', - 'automation': 'utils,dc2743f8450541e3', - 'strip_folders': 1, - 'filename': filename}) + r = extract_file({ + 'strip_folders': 1, + 'filename': filename}) if r['return'] > 0: return r From d4ef51782c0d81589225f76c61a25aa0373f2230 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Wed, 22 Jan 2025 00:12:36 +0530 Subject: [PATCH 41/84] Use unzip and not extract in install-cmake --- script/install-cmake-prebuilt/customize.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/script/install-cmake-prebuilt/customize.py b/script/install-cmake-prebuilt/customize.py index 2ccdd52d9..5eef0848a 100644 --- a/script/install-cmake-prebuilt/customize.py +++ b/script/install-cmake-prebuilt/customize.py @@ -1,6 +1,6 @@ from mlc import utils import os -from utils import download_file +from utils import download_file, unzip_file def preprocess(i): @@ -84,7 +84,7 @@ def preprocess(i): if os_info['platform'] == 'windows': print('Unzipping file {}'.format(filename)) - r = extract_file({ + r = unzip_file({ 'strip_folders': 1, 'filename': filename}) if r['return'] > 0: From 00651adefb4eeb0f186aea40437f1d66fee12dc0 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Wed, 22 Jan 2025 04:47:24 +0530 Subject: [PATCH 42/84] Renamed meta files to meta.yaml --- script/activate-python-venv/{_cm.yaml => meta.yaml} | 0 script/add-custom-nvidia-system/{_cm.yaml => meta.yaml} | 0 script/app-image-classification-onnx-py/{_cm.yaml => meta.yaml} | 0 .../app-image-classification-tf-onnx-cpp/{_cm.yaml => meta.yaml} | 0 script/app-image-classification-torch-py/{_cm.yaml => meta.yaml} | 0 .../app-image-classification-tvm-onnx-py/{_cm.yaml => meta.yaml} | 0 script/app-image-corner-detection/{_cm.yaml => meta.yaml} | 0 script/app-loadgen-generic-python/{_cm.yaml => meta.yaml} | 0 .../{_cm.yaml => meta.yaml} | 0 script/app-mlperf-automotive/{_cm.yaml => meta.yaml} | 0 script/app-mlperf-inference-amd/{_cm.yaml => meta.yaml} | 0 .../{_cm.yaml => meta.yaml} | 0 script/app-mlperf-inference-dummy/{_cm.yaml => meta.yaml} | 0 script/app-mlperf-inference-intel/{_cm.yaml => meta.yaml} | 0 script/app-mlperf-inference-mlcommons-cpp/{_cm.yaml => meta.yaml} | 0 .../app-mlperf-inference-mlcommons-python/{_cm.yaml => meta.yaml} | 0 script/app-mlperf-inference-nvidia/{_cm.yaml => meta.yaml} | 0 script/app-mlperf-inference-qualcomm/{_cm.yaml => meta.yaml} | 0 script/app-mlperf-inference-redhat/{_cm.yaml => meta.yaml} | 0 script/app-mlperf-inference/{_cm.yaml => meta.yaml} | 0 script/app-mlperf-training-nvidia/{_cm.yaml => meta.yaml} | 0 script/app-mlperf-training-reference/{_cm.yaml => meta.yaml} | 0 script/app-stable-diffusion-onnx-py/{_cm.yaml => meta.yaml} | 0 script/authenticate-github-cli/{_cm.yaml => meta.yaml} | 0 .../{_cm.yaml => meta.yaml} | 0 script/benchmark-program-mlperf/{_cm.yaml => meta.yaml} | 0 script/benchmark-program/{_cm.yaml => meta.yaml} | 0 script/build-docker-image/{_cm.yaml => meta.yaml} | 0 script/build-dockerfile/{_cm.yaml => meta.yaml} | 0 .../build-mlperf-inference-server-nvidia/{_cm.yaml => meta.yaml} | 0 script/calibrate-model-for.qaic/{_cm.yaml => meta.yaml} | 0 .../{_cm.yaml => meta.yaml} | 0 script/compile-model-for.qaic/{_cm.yaml => meta.yaml} | 0 script/compile-program/{_cm.yaml => meta.yaml} | 0 script/convert-csv-to-md/{_cm.yaml => meta.yaml} | 0 .../convert-ml-model-huggingface-to-onnx/{_cm.yaml => meta.yaml} | 0 script/copy-to-clipboard/{_cm.yaml => meta.yaml} | 0 script/create-conda-env/{_cm.yaml => meta.yaml} | 0 script/create-custom-cache-entry/{_cm.yaml => meta.yaml} | 0 script/create-fpgaconvnet-app-tinyml/{_cm.yaml => meta.yaml} | 0 script/create-fpgaconvnet-config-tinyml/{_cm.yaml => meta.yaml} | 0 script/create-patch/{_cm.yaml => meta.yaml} | 0 script/destroy-terraform/{_cm.yaml => meta.yaml} | 0 script/detect-cpu/{_cm.yaml => meta.yaml} | 0 script/detect-os/{_cm.yaml => meta.yaml} | 0 script/detect-sudo/{_cm.yaml => meta.yaml} | 0 script/download-and-extract/{_cm.yaml => meta.yaml} | 0 script/download-file/{_cm.yaml => meta.yaml} | 0 script/download-torrent/{_cm.yaml => meta.yaml} | 0 script/draw-graph-from-json-data/{_cm.yaml => meta.yaml} | 0 script/dump-pip-freeze/{_cm.yaml => meta.yaml} | 0 script/extract-file/{_cm.yaml => meta.yaml} | 0 script/fail/{_cm.yaml => meta.yaml} | 0 script/flash-tinyml-binary/{_cm.yaml => meta.yaml} | 0 .../generate-mlperf-inference-submission/{_cm.yaml => meta.yaml} | 0 .../generate-mlperf-inference-user-conf/{_cm.yaml => meta.yaml} | 0 script/generate-mlperf-tiny-report/{_cm.yaml => meta.yaml} | 0 script/generate-mlperf-tiny-submission/{_cm.yaml => meta.yaml} | 0 script/generate-nvidia-engine/{_cm.yaml => meta.yaml} | 0 script/get-android-sdk/{_cm.yaml => meta.yaml} | 0 script/get-aocl/{_cm.yaml => meta.yaml} | 0 script/get-aria2/{_cm.yaml => meta.yaml} | 0 script/get-aws-cli/{_cm.yaml => meta.yaml} | 0 script/get-bazel/{_cm.yaml => meta.yaml} | 0 script/get-blis/{_cm.yaml => meta.yaml} | 0 script/get-brew/{_cm.yaml => meta.yaml} | 0 script/get-cache-dir/{_cm.yaml => meta.yaml} | 0 script/get-ck/{_cm.yaml => meta.yaml} | 0 script/get-cl/{_cm.yaml => meta.yaml} | 0 script/get-cmake/{_cm.yaml => meta.yaml} | 0 script/get-cmsis_5/{_cm.yaml => meta.yaml} | 0 script/get-compiler-flags/{_cm.yaml => meta.yaml} | 0 script/get-compiler-rust/{_cm.yaml => meta.yaml} | 0 script/get-conda/{_cm.yaml => meta.yaml} | 0 script/get-croissant/{_cm.yaml => meta.yaml} | 0 script/get-cuda-devices/{_cm.yaml => meta.yaml} | 0 script/get-cuda/{_cm.yaml => meta.yaml} | 0 script/get-cudnn/{_cm.yaml => meta.yaml} | 0 script/get-dataset-cifar10/{_cm.yaml => meta.yaml} | 0 script/get-dataset-cnndm/{_cm.yaml => meta.yaml} | 0 script/get-dataset-coco/{_cm.yaml => meta.yaml} | 0 script/get-dataset-coco2014/{_cm.yaml => meta.yaml} | 0 script/get-dataset-cognata-mlcommons/{_cm.yaml => meta.yaml} | 0 script/get-dataset-criteo/{_cm.yaml => meta.yaml} | 0 script/get-dataset-igbh/{_cm.yaml => meta.yaml} | 0 script/get-dataset-imagenet-aux/{_cm.yaml => meta.yaml} | 0 script/get-dataset-imagenet-calibration/{_cm.yaml => meta.yaml} | 0 script/get-dataset-imagenet-helper/{_cm.yaml => meta.yaml} | 0 script/get-dataset-imagenet-train/{_cm.yaml => meta.yaml} | 0 script/get-dataset-imagenet-val/{_cm.yaml => meta.yaml} | 0 script/get-dataset-kits19/{_cm.yaml => meta.yaml} | 0 script/get-dataset-librispeech/{_cm.yaml => meta.yaml} | 0 .../get-dataset-mlperf-inference-llama3/{_cm.yaml => meta.yaml} | 0 .../get-dataset-mlperf-inference-mixtral/{_cm.yaml => meta.yaml} | 0 script/get-dataset-openimages-annotations/{_cm.yaml => meta.yaml} | 0 script/get-dataset-openimages-calibration/{_cm.yaml => meta.yaml} | 0 script/get-dataset-openimages/{_cm.yaml => meta.yaml} | 0 script/get-dataset-openorca/{_cm.yaml => meta.yaml} | 0 script/get-dataset-squad-vocab/{_cm.yaml => meta.yaml} | 0 script/get-dataset-squad/{_cm.yaml => meta.yaml} | 0 script/get-dlrm-data-mlperf-inference/{_cm.yaml => meta.yaml} | 0 script/get-dlrm/{_cm.yaml => meta.yaml} | 0 script/get-docker/{_cm.yaml => meta.yaml} | 0 script/get-gcc/{_cm.yaml => meta.yaml} | 0 script/get-generic-python-lib/{_cm.yaml => meta.yaml} | 0 script/get-generic-sys-util/{_cm.yaml => meta.yaml} | 0 script/get-gh-actions-runner/{_cm.yaml => meta.yaml} | 0 script/get-git-repo/{_cm.yaml => meta.yaml} | 0 script/get-github-cli/{_cm.yaml => meta.yaml} | 0 script/get-go/{_cm.yaml => meta.yaml} | 0 script/get-google-saxml/{_cm.yaml => meta.yaml} | 0 script/get-google-test/{_cm.yaml => meta.yaml} | 0 script/get-huggingface-cli/{_cm.yaml => meta.yaml} | 0 script/get-ipol-src/{_cm.yaml => meta.yaml} | 0 script/get-java/{_cm.yaml => meta.yaml} | 0 script/get-javac/{_cm.yaml => meta.yaml} | 0 script/get-lib-armnn/{_cm.yaml => meta.yaml} | 0 script/get-lib-dnnl/{_cm.yaml => meta.yaml} | 0 script/get-lib-protobuf/{_cm.yaml => meta.yaml} | 0 script/get-lib-qaic-api/{_cm.yaml => meta.yaml} | 0 script/get-llvm/{_cm.yaml => meta.yaml} | 0 script/get-microtvm/{_cm.yaml => meta.yaml} | 0 script/get-ml-model-3d-unet-kits19/{_cm.yaml => meta.yaml} | 0 script/get-ml-model-abtf-ssd-pytorch/{_cm.yaml => meta.yaml} | 0 script/get-ml-model-bert-base-squad/{_cm.yaml => meta.yaml} | 0 script/get-ml-model-bert-large-squad/{_cm.yaml => meta.yaml} | 0 script/get-ml-model-dlrm-terabyte/{_cm.yaml => meta.yaml} | 0 script/get-ml-model-efficientnet-lite/{_cm.yaml => meta.yaml} | 0 script/get-ml-model-gptj/{_cm.yaml => meta.yaml} | 0 script/get-ml-model-huggingface-zoo/{_cm.yaml => meta.yaml} | 0 script/get-ml-model-llama2/{_cm.yaml => meta.yaml} | 0 script/get-ml-model-llama3/{_cm.yaml => meta.yaml} | 0 script/get-ml-model-mixtral/{_cm.yaml => meta.yaml} | 0 script/get-ml-model-mobilenet/{_cm.yaml => meta.yaml} | 0 script/get-ml-model-neuralmagic-zoo/{_cm.yaml => meta.yaml} | 0 script/get-ml-model-resnet50/{_cm.yaml => meta.yaml} | 0 script/get-ml-model-retinanet-nvidia/{_cm.yaml => meta.yaml} | 0 script/get-ml-model-retinanet/{_cm.yaml => meta.yaml} | 0 script/get-ml-model-rgat/{_cm.yaml => meta.yaml} | 0 script/get-ml-model-rnnt/{_cm.yaml => meta.yaml} | 0 script/get-ml-model-stable-diffusion/{_cm.yaml => meta.yaml} | 0 script/get-ml-model-tiny-resnet/{_cm.yaml => meta.yaml} | 0 .../{_cm.yaml => meta.yaml} | 0 .../get-mlperf-automotive-scratch-space/{_cm.yaml => meta.yaml} | 0 .../{_cm.yaml => meta.yaml} | 0 script/get-mlperf-inference-loadgen/{_cm.yaml => meta.yaml} | 0 .../{_cm.yaml => meta.yaml} | 0 .../{_cm.yaml => meta.yaml} | 0 script/get-mlperf-inference-results-dir/{_cm.yaml => meta.yaml} | 0 script/get-mlperf-inference-results/{_cm.yaml => meta.yaml} | 0 script/get-mlperf-inference-src/{_cm.yaml => meta.yaml} | 0 .../get-mlperf-inference-submission-dir/{_cm.yaml => meta.yaml} | 0 script/get-mlperf-inference-sut-configs/{_cm.yaml => meta.yaml} | 0 .../get-mlperf-inference-sut-description/{_cm.yaml => meta.yaml} | 0 script/get-mlperf-inference-utils/{_cm.yaml => meta.yaml} | 0 script/get-mlperf-logging/{_cm.yaml => meta.yaml} | 0 script/get-mlperf-power-dev/{_cm.yaml => meta.yaml} | 0 .../{_cm.yaml => meta.yaml} | 0 script/get-mlperf-tiny-src/{_cm.yaml => meta.yaml} | 0 script/get-mlperf-training-nvidia-code/{_cm.yaml => meta.yaml} | 0 script/get-mlperf-training-src/{_cm.yaml => meta.yaml} | 0 script/get-nvidia-docker/{_cm.yaml => meta.yaml} | 0 script/get-nvidia-mitten/{_cm.yaml => meta.yaml} | 0 script/get-onnxruntime-prebuilt/{_cm.yaml => meta.yaml} | 0 script/get-openssl/{_cm.yaml => meta.yaml} | 0 script/get-platform-details/{_cm.yaml => meta.yaml} | 0 script/get-preprocessed-dataset-criteo/{_cm.yaml => meta.yaml} | 0 script/get-preprocessed-dataset-generic/{_cm.yaml => meta.yaml} | 0 script/get-preprocessed-dataset-imagenet/{_cm.yaml => meta.yaml} | 0 script/get-preprocessed-dataset-kits19/{_cm.yaml => meta.yaml} | 0 .../get-preprocessed-dataset-librispeech/{_cm.yaml => meta.yaml} | 0 .../get-preprocessed-dataset-openimages/{_cm.yaml => meta.yaml} | 0 script/get-preprocessed-dataset-openorca/{_cm.yaml => meta.yaml} | 0 script/get-preprocessed-dataset-squad/{_cm.yaml => meta.yaml} | 0 script/get-python3/{_cm.yaml => meta.yaml} | 0 script/get-qaic-apps-sdk/{_cm.yaml => meta.yaml} | 0 script/get-qaic-platform-sdk/{_cm.yaml => meta.yaml} | 0 script/get-qaic-software-kit/{_cm.yaml => meta.yaml} | 0 script/get-rclone-config/{_cm.yaml => meta.yaml} | 0 script/get-rclone/{_cm.yaml => meta.yaml} | 0 script/get-rocm-devices/{_cm.yaml => meta.yaml} | 0 script/get-rocm/{_cm.yaml => meta.yaml} | 0 script/get-spec-ptd/{_cm.yaml => meta.yaml} | 0 script/get-sys-utils-cm/{_cm.yaml => meta.yaml} | 0 script/get-sys-utils-min/{_cm.yaml => meta.yaml} | 0 script/get-tensorrt/{_cm.yaml => meta.yaml} | 0 script/get-terraform/{_cm.yaml => meta.yaml} | 0 script/get-tvm-model/{_cm.yaml => meta.yaml} | 0 script/get-tvm/{_cm.yaml => meta.yaml} | 0 script/get-xilinx-sdk/{_cm.yaml => meta.yaml} | 0 script/get-zendnn/{_cm.yaml => meta.yaml} | 0 script/get-zephyr-sdk/{_cm.yaml => meta.yaml} | 0 script/get-zephyr/{_cm.yaml => meta.yaml} | 0 script/install-apt-package/{_cm.yaml => meta.yaml} | 0 script/install-aws-cli/{_cm.yaml => meta.yaml} | 0 script/install-bazel/{_cm.yaml => meta.yaml} | 0 script/install-cmake-prebuilt/{_cm.yaml => meta.yaml} | 0 script/install-cuda-package-manager/{_cm.yaml => meta.yaml} | 0 script/install-cuda-prebuilt/{_cm.yaml => meta.yaml} | 0 script/install-diffusers-from-src/{_cm.yaml => meta.yaml} | 0 script/install-gcc-src/{_cm.yaml => meta.yaml} | 0 script/install-generic-conda-package/{_cm.yaml => meta.yaml} | 0 script/install-gflags-from-src/{_cm.yaml => meta.yaml} | 0 script/install-gflags/{_cm.yaml => meta.yaml} | 0 script/install-github-cli/{_cm.yaml => meta.yaml} | 0 .../install-intel-neural-speed-from-src/{_cm.yaml => meta.yaml} | 0 script/install-ipex-from-src/{_cm.yaml => meta.yaml} | 0 script/install-llvm-prebuilt/{_cm.yaml => meta.yaml} | 0 script/install-llvm-src/{_cm.yaml => meta.yaml} | 0 script/install-mlperf-logging-from-src/{_cm.yaml => meta.yaml} | 0 script/install-nccl-libs/{_cm.yaml => meta.yaml} | 0 script/install-numactl-from-src/{_cm.yaml => meta.yaml} | 0 script/install-onednn-from-src/{_cm.yaml => meta.yaml} | 0 script/install-onnxruntime-from-src/{_cm.yaml => meta.yaml} | 0 script/install-opencv-from-src/{_cm.yaml => meta.yaml} | 0 script/install-openssl/{_cm.yaml => meta.yaml} | 0 .../install-pip-package-for-cmind-python/{_cm.yaml => meta.yaml} | 0 script/install-python-src/{_cm.yaml => meta.yaml} | 0 script/install-python-venv/{_cm.yaml => meta.yaml} | 0 script/install-pytorch-from-src/{_cm.yaml => meta.yaml} | 0 script/install-pytorch-kineto-from-src/{_cm.yaml => meta.yaml} | 0 script/install-qaic-compute-sdk-from-src/{_cm.yaml => meta.yaml} | 0 script/install-rapidjson-from-src/{_cm.yaml => meta.yaml} | 0 script/install-rocm/{_cm.yaml => meta.yaml} | 0 script/install-tensorflow-for-c/{_cm.yaml => meta.yaml} | 0 script/install-tensorflow-from-src/{_cm.yaml => meta.yaml} | 0 script/install-terraform-from-src/{_cm.yaml => meta.yaml} | 0 script/install-tflite-from-src/{_cm.yaml => meta.yaml} | 0 script/install-torchvision-from-src/{_cm.yaml => meta.yaml} | 0 script/install-tpp-pytorch-extension/{_cm.yaml => meta.yaml} | 0 script/install-transformers-from-src/{_cm.yaml => meta.yaml} | 0 script/plug-prebuilt-cudnn-to-cuda/{_cm.yaml => meta.yaml} | 0 script/plug-prebuilt-cusparselt-to-cuda/{_cm.yaml => meta.yaml} | 0 script/prepare-training-data-bert/{_cm.yaml => meta.yaml} | 0 script/prepare-training-data-resnet/{_cm.yaml => meta.yaml} | 0 .../{_cm.yaml => meta.yaml} | 0 script/print-any-text/{_cm.yaml => meta.yaml} | 0 script/print-croissant-desc/{_cm.yaml => meta.yaml} | 0 script/print-hello-world-java/{_cm.yaml => meta.yaml} | 0 script/print-hello-world-javac/{_cm.yaml => meta.yaml} | 0 script/print-hello-world-py/{_cm.yaml => meta.yaml} | 0 script/print-hello-world/{_cm.yaml => meta.yaml} | 0 script/print-python-version/{_cm.yaml => meta.yaml} | 0 script/process-mlperf-accuracy/{_cm.yaml => meta.yaml} | 0 script/prune-bert-models/{_cm.yaml => meta.yaml} | 0 script/prune-docker/{_cm.yaml => meta.yaml} | 0 script/publish-results-to-dashboard/{_cm.yaml => meta.yaml} | 0 script/pull-git-repo/{_cm.yaml => meta.yaml} | 0 script/push-csv-to-spreadsheet/{_cm.yaml => meta.yaml} | 0 .../{_cm.yaml => meta.yaml} | 0 script/remote-run-commands/{_cm.yaml => meta.yaml} | 0 .../{_cm.yaml => meta.yaml} | 0 script/reproduce-mlperf-training-nvidia/{_cm.yaml => meta.yaml} | 0 script/run-all-mlperf-models/{_cm.yaml => meta.yaml} | 0 script/run-docker-container/{_cm.yaml => meta.yaml} | 0 script/run-mlperf-automotive-app/{_cm.yaml => meta.yaml} | 0 script/run-mlperf-inference-app/{_cm.yaml => meta.yaml} | 0 .../run-mlperf-inference-mobilenet-models/{_cm.yaml => meta.yaml} | 0 .../{_cm.yaml => meta.yaml} | 0 script/run-mlperf-power-client/{_cm.yaml => meta.yaml} | 0 script/run-mlperf-power-server/{_cm.yaml => meta.yaml} | 0 .../{_cm.yaml => meta.yaml} | 0 script/run-python/{_cm.yaml => meta.yaml} | 0 script/run-terraform/{_cm.yaml => meta.yaml} | 0 script/run-vllm-server/{_cm.yaml => meta.yaml} | 0 script/runtime-system-infos/{_cm.yaml => meta.yaml} | 0 .../{_cm.yaml => meta.yaml} | 0 script/set-device-settings-qaic/{_cm.yaml => meta.yaml} | 0 script/set-echo-off-win/{_cm.yaml => meta.yaml} | 0 script/set-performance-mode/{_cm.yaml => meta.yaml} | 0 script/set-sqlite-dir/{_cm.yaml => meta.yaml} | 0 script/set-user-limits/{_cm.yaml => meta.yaml} | 0 script/set-venv/{_cm.yaml => meta.yaml} | 0 script/submit-mlperf-results/{_cm.yaml => meta.yaml} | 0 script/tar-my-folder/{_cm.yaml => meta.yaml} | 0 script/test-cm-core/{_cm.yaml => meta.yaml} | 0 script/test-cm-script-pipeline/{_cm.yaml => meta.yaml} | 0 script/test-cm-scripts/{_cm.yaml => meta.yaml} | 0 script/test-debug/{_cm.yaml => meta.yaml} | 0 .../test-download-and-extract-artifacts/{_cm.yaml => meta.yaml} | 0 script/test-mlperf-inference-retinanet/{_cm.yaml => meta.yaml} | 0 .../{_cm.yaml => meta.yaml} | 0 script/upgrade-python-pip/{_cm.yaml => meta.yaml} | 0 .../{_cm.yaml => meta.yaml} | 0 284 files changed, 0 insertions(+), 0 deletions(-) rename script/activate-python-venv/{_cm.yaml => meta.yaml} (100%) rename script/add-custom-nvidia-system/{_cm.yaml => meta.yaml} (100%) rename script/app-image-classification-onnx-py/{_cm.yaml => meta.yaml} (100%) rename script/app-image-classification-tf-onnx-cpp/{_cm.yaml => meta.yaml} (100%) rename script/app-image-classification-torch-py/{_cm.yaml => meta.yaml} (100%) rename script/app-image-classification-tvm-onnx-py/{_cm.yaml => meta.yaml} (100%) rename script/app-image-corner-detection/{_cm.yaml => meta.yaml} (100%) rename script/app-loadgen-generic-python/{_cm.yaml => meta.yaml} (100%) rename script/app-mlperf-automotive-mlcommons-python/{_cm.yaml => meta.yaml} (100%) rename script/app-mlperf-automotive/{_cm.yaml => meta.yaml} (100%) rename script/app-mlperf-inference-amd/{_cm.yaml => meta.yaml} (100%) rename script/app-mlperf-inference-ctuning-cpp-tflite/{_cm.yaml => meta.yaml} (100%) rename script/app-mlperf-inference-dummy/{_cm.yaml => meta.yaml} (100%) rename script/app-mlperf-inference-intel/{_cm.yaml => meta.yaml} (100%) rename script/app-mlperf-inference-mlcommons-cpp/{_cm.yaml => meta.yaml} (100%) rename script/app-mlperf-inference-mlcommons-python/{_cm.yaml => meta.yaml} (100%) rename script/app-mlperf-inference-nvidia/{_cm.yaml => meta.yaml} (100%) rename script/app-mlperf-inference-qualcomm/{_cm.yaml => meta.yaml} (100%) rename script/app-mlperf-inference-redhat/{_cm.yaml => meta.yaml} (100%) rename script/app-mlperf-inference/{_cm.yaml => meta.yaml} (100%) rename script/app-mlperf-training-nvidia/{_cm.yaml => meta.yaml} (100%) rename script/app-mlperf-training-reference/{_cm.yaml => meta.yaml} (100%) rename script/app-stable-diffusion-onnx-py/{_cm.yaml => meta.yaml} (100%) rename script/authenticate-github-cli/{_cm.yaml => meta.yaml} (100%) rename script/benchmark-any-mlperf-inference-implementation/{_cm.yaml => meta.yaml} (100%) rename script/benchmark-program-mlperf/{_cm.yaml => meta.yaml} (100%) rename script/benchmark-program/{_cm.yaml => meta.yaml} (100%) rename script/build-docker-image/{_cm.yaml => meta.yaml} (100%) rename script/build-dockerfile/{_cm.yaml => meta.yaml} (100%) rename script/build-mlperf-inference-server-nvidia/{_cm.yaml => meta.yaml} (100%) rename script/calibrate-model-for.qaic/{_cm.yaml => meta.yaml} (100%) rename script/clean-nvidia-mlperf-inference-scratch-space/{_cm.yaml => meta.yaml} (100%) rename script/compile-model-for.qaic/{_cm.yaml => meta.yaml} (100%) rename script/compile-program/{_cm.yaml => meta.yaml} (100%) rename script/convert-csv-to-md/{_cm.yaml => meta.yaml} (100%) rename script/convert-ml-model-huggingface-to-onnx/{_cm.yaml => meta.yaml} (100%) rename script/copy-to-clipboard/{_cm.yaml => meta.yaml} (100%) rename script/create-conda-env/{_cm.yaml => meta.yaml} (100%) rename script/create-custom-cache-entry/{_cm.yaml => meta.yaml} (100%) rename script/create-fpgaconvnet-app-tinyml/{_cm.yaml => meta.yaml} (100%) rename script/create-fpgaconvnet-config-tinyml/{_cm.yaml => meta.yaml} (100%) rename script/create-patch/{_cm.yaml => meta.yaml} (100%) rename script/destroy-terraform/{_cm.yaml => meta.yaml} (100%) rename script/detect-cpu/{_cm.yaml => meta.yaml} (100%) rename script/detect-os/{_cm.yaml => meta.yaml} (100%) rename script/detect-sudo/{_cm.yaml => meta.yaml} (100%) rename script/download-and-extract/{_cm.yaml => meta.yaml} (100%) rename script/download-file/{_cm.yaml => meta.yaml} (100%) rename script/download-torrent/{_cm.yaml => meta.yaml} (100%) rename script/draw-graph-from-json-data/{_cm.yaml => meta.yaml} (100%) rename script/dump-pip-freeze/{_cm.yaml => meta.yaml} (100%) rename script/extract-file/{_cm.yaml => meta.yaml} (100%) rename script/fail/{_cm.yaml => meta.yaml} (100%) rename script/flash-tinyml-binary/{_cm.yaml => meta.yaml} (100%) rename script/generate-mlperf-inference-submission/{_cm.yaml => meta.yaml} (100%) rename script/generate-mlperf-inference-user-conf/{_cm.yaml => meta.yaml} (100%) rename script/generate-mlperf-tiny-report/{_cm.yaml => meta.yaml} (100%) rename script/generate-mlperf-tiny-submission/{_cm.yaml => meta.yaml} (100%) rename script/generate-nvidia-engine/{_cm.yaml => meta.yaml} (100%) rename script/get-android-sdk/{_cm.yaml => meta.yaml} (100%) rename script/get-aocl/{_cm.yaml => meta.yaml} (100%) rename script/get-aria2/{_cm.yaml => meta.yaml} (100%) rename script/get-aws-cli/{_cm.yaml => meta.yaml} (100%) rename script/get-bazel/{_cm.yaml => meta.yaml} (100%) rename script/get-blis/{_cm.yaml => meta.yaml} (100%) rename script/get-brew/{_cm.yaml => meta.yaml} (100%) rename script/get-cache-dir/{_cm.yaml => meta.yaml} (100%) rename script/get-ck/{_cm.yaml => meta.yaml} (100%) rename script/get-cl/{_cm.yaml => meta.yaml} (100%) rename script/get-cmake/{_cm.yaml => meta.yaml} (100%) rename script/get-cmsis_5/{_cm.yaml => meta.yaml} (100%) rename script/get-compiler-flags/{_cm.yaml => meta.yaml} (100%) rename script/get-compiler-rust/{_cm.yaml => meta.yaml} (100%) rename script/get-conda/{_cm.yaml => meta.yaml} (100%) rename script/get-croissant/{_cm.yaml => meta.yaml} (100%) rename script/get-cuda-devices/{_cm.yaml => meta.yaml} (100%) rename script/get-cuda/{_cm.yaml => meta.yaml} (100%) rename script/get-cudnn/{_cm.yaml => meta.yaml} (100%) rename script/get-dataset-cifar10/{_cm.yaml => meta.yaml} (100%) rename script/get-dataset-cnndm/{_cm.yaml => meta.yaml} (100%) rename script/get-dataset-coco/{_cm.yaml => meta.yaml} (100%) rename script/get-dataset-coco2014/{_cm.yaml => meta.yaml} (100%) rename script/get-dataset-cognata-mlcommons/{_cm.yaml => meta.yaml} (100%) rename script/get-dataset-criteo/{_cm.yaml => meta.yaml} (100%) rename script/get-dataset-igbh/{_cm.yaml => meta.yaml} (100%) rename script/get-dataset-imagenet-aux/{_cm.yaml => meta.yaml} (100%) rename script/get-dataset-imagenet-calibration/{_cm.yaml => meta.yaml} (100%) rename script/get-dataset-imagenet-helper/{_cm.yaml => meta.yaml} (100%) rename script/get-dataset-imagenet-train/{_cm.yaml => meta.yaml} (100%) rename script/get-dataset-imagenet-val/{_cm.yaml => meta.yaml} (100%) rename script/get-dataset-kits19/{_cm.yaml => meta.yaml} (100%) rename script/get-dataset-librispeech/{_cm.yaml => meta.yaml} (100%) rename script/get-dataset-mlperf-inference-llama3/{_cm.yaml => meta.yaml} (100%) rename script/get-dataset-mlperf-inference-mixtral/{_cm.yaml => meta.yaml} (100%) rename script/get-dataset-openimages-annotations/{_cm.yaml => meta.yaml} (100%) rename script/get-dataset-openimages-calibration/{_cm.yaml => meta.yaml} (100%) rename script/get-dataset-openimages/{_cm.yaml => meta.yaml} (100%) rename script/get-dataset-openorca/{_cm.yaml => meta.yaml} (100%) rename script/get-dataset-squad-vocab/{_cm.yaml => meta.yaml} (100%) rename script/get-dataset-squad/{_cm.yaml => meta.yaml} (100%) rename script/get-dlrm-data-mlperf-inference/{_cm.yaml => meta.yaml} (100%) rename script/get-dlrm/{_cm.yaml => meta.yaml} (100%) rename script/get-docker/{_cm.yaml => meta.yaml} (100%) rename script/get-gcc/{_cm.yaml => meta.yaml} (100%) rename script/get-generic-python-lib/{_cm.yaml => meta.yaml} (100%) rename script/get-generic-sys-util/{_cm.yaml => meta.yaml} (100%) rename script/get-gh-actions-runner/{_cm.yaml => meta.yaml} (100%) rename script/get-git-repo/{_cm.yaml => meta.yaml} (100%) rename script/get-github-cli/{_cm.yaml => meta.yaml} (100%) rename script/get-go/{_cm.yaml => meta.yaml} (100%) rename script/get-google-saxml/{_cm.yaml => meta.yaml} (100%) rename script/get-google-test/{_cm.yaml => meta.yaml} (100%) rename script/get-huggingface-cli/{_cm.yaml => meta.yaml} (100%) rename script/get-ipol-src/{_cm.yaml => meta.yaml} (100%) rename script/get-java/{_cm.yaml => meta.yaml} (100%) rename script/get-javac/{_cm.yaml => meta.yaml} (100%) rename script/get-lib-armnn/{_cm.yaml => meta.yaml} (100%) rename script/get-lib-dnnl/{_cm.yaml => meta.yaml} (100%) rename script/get-lib-protobuf/{_cm.yaml => meta.yaml} (100%) rename script/get-lib-qaic-api/{_cm.yaml => meta.yaml} (100%) rename script/get-llvm/{_cm.yaml => meta.yaml} (100%) rename script/get-microtvm/{_cm.yaml => meta.yaml} (100%) rename script/get-ml-model-3d-unet-kits19/{_cm.yaml => meta.yaml} (100%) rename script/get-ml-model-abtf-ssd-pytorch/{_cm.yaml => meta.yaml} (100%) rename script/get-ml-model-bert-base-squad/{_cm.yaml => meta.yaml} (100%) rename script/get-ml-model-bert-large-squad/{_cm.yaml => meta.yaml} (100%) rename script/get-ml-model-dlrm-terabyte/{_cm.yaml => meta.yaml} (100%) rename script/get-ml-model-efficientnet-lite/{_cm.yaml => meta.yaml} (100%) rename script/get-ml-model-gptj/{_cm.yaml => meta.yaml} (100%) rename script/get-ml-model-huggingface-zoo/{_cm.yaml => meta.yaml} (100%) rename script/get-ml-model-llama2/{_cm.yaml => meta.yaml} (100%) rename script/get-ml-model-llama3/{_cm.yaml => meta.yaml} (100%) rename script/get-ml-model-mixtral/{_cm.yaml => meta.yaml} (100%) rename script/get-ml-model-mobilenet/{_cm.yaml => meta.yaml} (100%) rename script/get-ml-model-neuralmagic-zoo/{_cm.yaml => meta.yaml} (100%) rename script/get-ml-model-resnet50/{_cm.yaml => meta.yaml} (100%) rename script/get-ml-model-retinanet-nvidia/{_cm.yaml => meta.yaml} (100%) rename script/get-ml-model-retinanet/{_cm.yaml => meta.yaml} (100%) rename script/get-ml-model-rgat/{_cm.yaml => meta.yaml} (100%) rename script/get-ml-model-rnnt/{_cm.yaml => meta.yaml} (100%) rename script/get-ml-model-stable-diffusion/{_cm.yaml => meta.yaml} (100%) rename script/get-ml-model-tiny-resnet/{_cm.yaml => meta.yaml} (100%) rename script/get-ml-model-using-imagenet-from-model-zoo/{_cm.yaml => meta.yaml} (100%) rename script/get-mlperf-automotive-scratch-space/{_cm.yaml => meta.yaml} (100%) rename script/get-mlperf-inference-intel-scratch-space/{_cm.yaml => meta.yaml} (100%) rename script/get-mlperf-inference-loadgen/{_cm.yaml => meta.yaml} (100%) rename script/get-mlperf-inference-nvidia-common-code/{_cm.yaml => meta.yaml} (100%) rename script/get-mlperf-inference-nvidia-scratch-space/{_cm.yaml => meta.yaml} (100%) rename script/get-mlperf-inference-results-dir/{_cm.yaml => meta.yaml} (100%) rename script/get-mlperf-inference-results/{_cm.yaml => meta.yaml} (100%) rename script/get-mlperf-inference-src/{_cm.yaml => meta.yaml} (100%) rename script/get-mlperf-inference-submission-dir/{_cm.yaml => meta.yaml} (100%) rename script/get-mlperf-inference-sut-configs/{_cm.yaml => meta.yaml} (100%) rename script/get-mlperf-inference-sut-description/{_cm.yaml => meta.yaml} (100%) rename script/get-mlperf-inference-utils/{_cm.yaml => meta.yaml} (100%) rename script/get-mlperf-logging/{_cm.yaml => meta.yaml} (100%) rename script/get-mlperf-power-dev/{_cm.yaml => meta.yaml} (100%) rename script/get-mlperf-tiny-eembc-energy-runner-src/{_cm.yaml => meta.yaml} (100%) rename script/get-mlperf-tiny-src/{_cm.yaml => meta.yaml} (100%) rename script/get-mlperf-training-nvidia-code/{_cm.yaml => meta.yaml} (100%) rename script/get-mlperf-training-src/{_cm.yaml => meta.yaml} (100%) rename script/get-nvidia-docker/{_cm.yaml => meta.yaml} (100%) rename script/get-nvidia-mitten/{_cm.yaml => meta.yaml} (100%) rename script/get-onnxruntime-prebuilt/{_cm.yaml => meta.yaml} (100%) rename script/get-openssl/{_cm.yaml => meta.yaml} (100%) rename script/get-platform-details/{_cm.yaml => meta.yaml} (100%) rename script/get-preprocessed-dataset-criteo/{_cm.yaml => meta.yaml} (100%) rename script/get-preprocessed-dataset-generic/{_cm.yaml => meta.yaml} (100%) rename script/get-preprocessed-dataset-imagenet/{_cm.yaml => meta.yaml} (100%) rename script/get-preprocessed-dataset-kits19/{_cm.yaml => meta.yaml} (100%) rename script/get-preprocessed-dataset-librispeech/{_cm.yaml => meta.yaml} (100%) rename script/get-preprocessed-dataset-openimages/{_cm.yaml => meta.yaml} (100%) rename script/get-preprocessed-dataset-openorca/{_cm.yaml => meta.yaml} (100%) rename script/get-preprocessed-dataset-squad/{_cm.yaml => meta.yaml} (100%) rename script/get-python3/{_cm.yaml => meta.yaml} (100%) rename script/get-qaic-apps-sdk/{_cm.yaml => meta.yaml} (100%) rename script/get-qaic-platform-sdk/{_cm.yaml => meta.yaml} (100%) rename script/get-qaic-software-kit/{_cm.yaml => meta.yaml} (100%) rename script/get-rclone-config/{_cm.yaml => meta.yaml} (100%) rename script/get-rclone/{_cm.yaml => meta.yaml} (100%) rename script/get-rocm-devices/{_cm.yaml => meta.yaml} (100%) rename script/get-rocm/{_cm.yaml => meta.yaml} (100%) rename script/get-spec-ptd/{_cm.yaml => meta.yaml} (100%) rename script/get-sys-utils-cm/{_cm.yaml => meta.yaml} (100%) rename script/get-sys-utils-min/{_cm.yaml => meta.yaml} (100%) rename script/get-tensorrt/{_cm.yaml => meta.yaml} (100%) rename script/get-terraform/{_cm.yaml => meta.yaml} (100%) rename script/get-tvm-model/{_cm.yaml => meta.yaml} (100%) rename script/get-tvm/{_cm.yaml => meta.yaml} (100%) rename script/get-xilinx-sdk/{_cm.yaml => meta.yaml} (100%) rename script/get-zendnn/{_cm.yaml => meta.yaml} (100%) rename script/get-zephyr-sdk/{_cm.yaml => meta.yaml} (100%) rename script/get-zephyr/{_cm.yaml => meta.yaml} (100%) rename script/install-apt-package/{_cm.yaml => meta.yaml} (100%) rename script/install-aws-cli/{_cm.yaml => meta.yaml} (100%) rename script/install-bazel/{_cm.yaml => meta.yaml} (100%) rename script/install-cmake-prebuilt/{_cm.yaml => meta.yaml} (100%) rename script/install-cuda-package-manager/{_cm.yaml => meta.yaml} (100%) rename script/install-cuda-prebuilt/{_cm.yaml => meta.yaml} (100%) rename script/install-diffusers-from-src/{_cm.yaml => meta.yaml} (100%) rename script/install-gcc-src/{_cm.yaml => meta.yaml} (100%) rename script/install-generic-conda-package/{_cm.yaml => meta.yaml} (100%) rename script/install-gflags-from-src/{_cm.yaml => meta.yaml} (100%) rename script/install-gflags/{_cm.yaml => meta.yaml} (100%) rename script/install-github-cli/{_cm.yaml => meta.yaml} (100%) rename script/install-intel-neural-speed-from-src/{_cm.yaml => meta.yaml} (100%) rename script/install-ipex-from-src/{_cm.yaml => meta.yaml} (100%) rename script/install-llvm-prebuilt/{_cm.yaml => meta.yaml} (100%) rename script/install-llvm-src/{_cm.yaml => meta.yaml} (100%) rename script/install-mlperf-logging-from-src/{_cm.yaml => meta.yaml} (100%) rename script/install-nccl-libs/{_cm.yaml => meta.yaml} (100%) rename script/install-numactl-from-src/{_cm.yaml => meta.yaml} (100%) rename script/install-onednn-from-src/{_cm.yaml => meta.yaml} (100%) rename script/install-onnxruntime-from-src/{_cm.yaml => meta.yaml} (100%) rename script/install-opencv-from-src/{_cm.yaml => meta.yaml} (100%) rename script/install-openssl/{_cm.yaml => meta.yaml} (100%) rename script/install-pip-package-for-cmind-python/{_cm.yaml => meta.yaml} (100%) rename script/install-python-src/{_cm.yaml => meta.yaml} (100%) rename script/install-python-venv/{_cm.yaml => meta.yaml} (100%) rename script/install-pytorch-from-src/{_cm.yaml => meta.yaml} (100%) rename script/install-pytorch-kineto-from-src/{_cm.yaml => meta.yaml} (100%) rename script/install-qaic-compute-sdk-from-src/{_cm.yaml => meta.yaml} (100%) rename script/install-rapidjson-from-src/{_cm.yaml => meta.yaml} (100%) rename script/install-rocm/{_cm.yaml => meta.yaml} (100%) rename script/install-tensorflow-for-c/{_cm.yaml => meta.yaml} (100%) rename script/install-tensorflow-from-src/{_cm.yaml => meta.yaml} (100%) rename script/install-terraform-from-src/{_cm.yaml => meta.yaml} (100%) rename script/install-tflite-from-src/{_cm.yaml => meta.yaml} (100%) rename script/install-torchvision-from-src/{_cm.yaml => meta.yaml} (100%) rename script/install-tpp-pytorch-extension/{_cm.yaml => meta.yaml} (100%) rename script/install-transformers-from-src/{_cm.yaml => meta.yaml} (100%) rename script/plug-prebuilt-cudnn-to-cuda/{_cm.yaml => meta.yaml} (100%) rename script/plug-prebuilt-cusparselt-to-cuda/{_cm.yaml => meta.yaml} (100%) rename script/prepare-training-data-bert/{_cm.yaml => meta.yaml} (100%) rename script/prepare-training-data-resnet/{_cm.yaml => meta.yaml} (100%) rename script/preprocess-mlperf-inference-submission/{_cm.yaml => meta.yaml} (100%) rename script/print-any-text/{_cm.yaml => meta.yaml} (100%) rename script/print-croissant-desc/{_cm.yaml => meta.yaml} (100%) rename script/print-hello-world-java/{_cm.yaml => meta.yaml} (100%) rename script/print-hello-world-javac/{_cm.yaml => meta.yaml} (100%) rename script/print-hello-world-py/{_cm.yaml => meta.yaml} (100%) rename script/print-hello-world/{_cm.yaml => meta.yaml} (100%) rename script/print-python-version/{_cm.yaml => meta.yaml} (100%) rename script/process-mlperf-accuracy/{_cm.yaml => meta.yaml} (100%) rename script/prune-bert-models/{_cm.yaml => meta.yaml} (100%) rename script/prune-docker/{_cm.yaml => meta.yaml} (100%) rename script/publish-results-to-dashboard/{_cm.yaml => meta.yaml} (100%) rename script/pull-git-repo/{_cm.yaml => meta.yaml} (100%) rename script/push-csv-to-spreadsheet/{_cm.yaml => meta.yaml} (100%) rename script/push-mlperf-inference-results-to-github/{_cm.yaml => meta.yaml} (100%) rename script/remote-run-commands/{_cm.yaml => meta.yaml} (100%) rename script/reproduce-mlperf-octoml-tinyml-results/{_cm.yaml => meta.yaml} (100%) rename script/reproduce-mlperf-training-nvidia/{_cm.yaml => meta.yaml} (100%) rename script/run-all-mlperf-models/{_cm.yaml => meta.yaml} (100%) rename script/run-docker-container/{_cm.yaml => meta.yaml} (100%) rename script/run-mlperf-automotive-app/{_cm.yaml => meta.yaml} (100%) rename script/run-mlperf-inference-app/{_cm.yaml => meta.yaml} (100%) rename script/run-mlperf-inference-mobilenet-models/{_cm.yaml => meta.yaml} (100%) rename script/run-mlperf-inference-submission-checker/{_cm.yaml => meta.yaml} (100%) rename script/run-mlperf-power-client/{_cm.yaml => meta.yaml} (100%) rename script/run-mlperf-power-server/{_cm.yaml => meta.yaml} (100%) rename script/run-mlperf-training-submission-checker/{_cm.yaml => meta.yaml} (100%) rename script/run-python/{_cm.yaml => meta.yaml} (100%) rename script/run-terraform/{_cm.yaml => meta.yaml} (100%) rename script/run-vllm-server/{_cm.yaml => meta.yaml} (100%) rename script/runtime-system-infos/{_cm.yaml => meta.yaml} (100%) rename script/save-mlperf-inference-implementation-state/{_cm.yaml => meta.yaml} (100%) rename script/set-device-settings-qaic/{_cm.yaml => meta.yaml} (100%) rename script/set-echo-off-win/{_cm.yaml => meta.yaml} (100%) rename script/set-performance-mode/{_cm.yaml => meta.yaml} (100%) rename script/set-sqlite-dir/{_cm.yaml => meta.yaml} (100%) rename script/set-user-limits/{_cm.yaml => meta.yaml} (100%) rename script/set-venv/{_cm.yaml => meta.yaml} (100%) rename script/submit-mlperf-results/{_cm.yaml => meta.yaml} (100%) rename script/tar-my-folder/{_cm.yaml => meta.yaml} (100%) rename script/test-cm-core/{_cm.yaml => meta.yaml} (100%) rename script/test-cm-script-pipeline/{_cm.yaml => meta.yaml} (100%) rename script/test-cm-scripts/{_cm.yaml => meta.yaml} (100%) rename script/test-debug/{_cm.yaml => meta.yaml} (100%) rename script/test-download-and-extract-artifacts/{_cm.yaml => meta.yaml} (100%) rename script/test-mlperf-inference-retinanet/{_cm.yaml => meta.yaml} (100%) rename script/truncate-mlperf-inference-accuracy-log/{_cm.yaml => meta.yaml} (100%) rename script/upgrade-python-pip/{_cm.yaml => meta.yaml} (100%) rename script/wrapper-reproduce-octoml-tinyml-submission/{_cm.yaml => meta.yaml} (100%) diff --git a/script/activate-python-venv/_cm.yaml b/script/activate-python-venv/meta.yaml similarity index 100% rename from script/activate-python-venv/_cm.yaml rename to script/activate-python-venv/meta.yaml diff --git a/script/add-custom-nvidia-system/_cm.yaml b/script/add-custom-nvidia-system/meta.yaml similarity index 100% rename from script/add-custom-nvidia-system/_cm.yaml rename to script/add-custom-nvidia-system/meta.yaml diff --git a/script/app-image-classification-onnx-py/_cm.yaml b/script/app-image-classification-onnx-py/meta.yaml similarity index 100% rename from script/app-image-classification-onnx-py/_cm.yaml rename to script/app-image-classification-onnx-py/meta.yaml diff --git a/script/app-image-classification-tf-onnx-cpp/_cm.yaml b/script/app-image-classification-tf-onnx-cpp/meta.yaml similarity index 100% rename from script/app-image-classification-tf-onnx-cpp/_cm.yaml rename to script/app-image-classification-tf-onnx-cpp/meta.yaml diff --git a/script/app-image-classification-torch-py/_cm.yaml b/script/app-image-classification-torch-py/meta.yaml similarity index 100% rename from script/app-image-classification-torch-py/_cm.yaml rename to script/app-image-classification-torch-py/meta.yaml diff --git a/script/app-image-classification-tvm-onnx-py/_cm.yaml b/script/app-image-classification-tvm-onnx-py/meta.yaml similarity index 100% rename from script/app-image-classification-tvm-onnx-py/_cm.yaml rename to script/app-image-classification-tvm-onnx-py/meta.yaml diff --git a/script/app-image-corner-detection/_cm.yaml b/script/app-image-corner-detection/meta.yaml similarity index 100% rename from script/app-image-corner-detection/_cm.yaml rename to script/app-image-corner-detection/meta.yaml diff --git a/script/app-loadgen-generic-python/_cm.yaml b/script/app-loadgen-generic-python/meta.yaml similarity index 100% rename from script/app-loadgen-generic-python/_cm.yaml rename to script/app-loadgen-generic-python/meta.yaml diff --git a/script/app-mlperf-automotive-mlcommons-python/_cm.yaml b/script/app-mlperf-automotive-mlcommons-python/meta.yaml similarity index 100% rename from script/app-mlperf-automotive-mlcommons-python/_cm.yaml rename to script/app-mlperf-automotive-mlcommons-python/meta.yaml diff --git a/script/app-mlperf-automotive/_cm.yaml b/script/app-mlperf-automotive/meta.yaml similarity index 100% rename from script/app-mlperf-automotive/_cm.yaml rename to script/app-mlperf-automotive/meta.yaml diff --git a/script/app-mlperf-inference-amd/_cm.yaml b/script/app-mlperf-inference-amd/meta.yaml similarity index 100% rename from script/app-mlperf-inference-amd/_cm.yaml rename to script/app-mlperf-inference-amd/meta.yaml diff --git a/script/app-mlperf-inference-ctuning-cpp-tflite/_cm.yaml b/script/app-mlperf-inference-ctuning-cpp-tflite/meta.yaml similarity index 100% rename from script/app-mlperf-inference-ctuning-cpp-tflite/_cm.yaml rename to script/app-mlperf-inference-ctuning-cpp-tflite/meta.yaml diff --git a/script/app-mlperf-inference-dummy/_cm.yaml b/script/app-mlperf-inference-dummy/meta.yaml similarity index 100% rename from script/app-mlperf-inference-dummy/_cm.yaml rename to script/app-mlperf-inference-dummy/meta.yaml diff --git a/script/app-mlperf-inference-intel/_cm.yaml b/script/app-mlperf-inference-intel/meta.yaml similarity index 100% rename from script/app-mlperf-inference-intel/_cm.yaml rename to script/app-mlperf-inference-intel/meta.yaml diff --git a/script/app-mlperf-inference-mlcommons-cpp/_cm.yaml b/script/app-mlperf-inference-mlcommons-cpp/meta.yaml similarity index 100% rename from script/app-mlperf-inference-mlcommons-cpp/_cm.yaml rename to script/app-mlperf-inference-mlcommons-cpp/meta.yaml diff --git a/script/app-mlperf-inference-mlcommons-python/_cm.yaml b/script/app-mlperf-inference-mlcommons-python/meta.yaml similarity index 100% rename from script/app-mlperf-inference-mlcommons-python/_cm.yaml rename to script/app-mlperf-inference-mlcommons-python/meta.yaml diff --git a/script/app-mlperf-inference-nvidia/_cm.yaml b/script/app-mlperf-inference-nvidia/meta.yaml similarity index 100% rename from script/app-mlperf-inference-nvidia/_cm.yaml rename to script/app-mlperf-inference-nvidia/meta.yaml diff --git a/script/app-mlperf-inference-qualcomm/_cm.yaml b/script/app-mlperf-inference-qualcomm/meta.yaml similarity index 100% rename from script/app-mlperf-inference-qualcomm/_cm.yaml rename to script/app-mlperf-inference-qualcomm/meta.yaml diff --git a/script/app-mlperf-inference-redhat/_cm.yaml b/script/app-mlperf-inference-redhat/meta.yaml similarity index 100% rename from script/app-mlperf-inference-redhat/_cm.yaml rename to script/app-mlperf-inference-redhat/meta.yaml diff --git a/script/app-mlperf-inference/_cm.yaml b/script/app-mlperf-inference/meta.yaml similarity index 100% rename from script/app-mlperf-inference/_cm.yaml rename to script/app-mlperf-inference/meta.yaml diff --git a/script/app-mlperf-training-nvidia/_cm.yaml b/script/app-mlperf-training-nvidia/meta.yaml similarity index 100% rename from script/app-mlperf-training-nvidia/_cm.yaml rename to script/app-mlperf-training-nvidia/meta.yaml diff --git a/script/app-mlperf-training-reference/_cm.yaml b/script/app-mlperf-training-reference/meta.yaml similarity index 100% rename from script/app-mlperf-training-reference/_cm.yaml rename to script/app-mlperf-training-reference/meta.yaml diff --git a/script/app-stable-diffusion-onnx-py/_cm.yaml b/script/app-stable-diffusion-onnx-py/meta.yaml similarity index 100% rename from script/app-stable-diffusion-onnx-py/_cm.yaml rename to script/app-stable-diffusion-onnx-py/meta.yaml diff --git a/script/authenticate-github-cli/_cm.yaml b/script/authenticate-github-cli/meta.yaml similarity index 100% rename from script/authenticate-github-cli/_cm.yaml rename to script/authenticate-github-cli/meta.yaml diff --git a/script/benchmark-any-mlperf-inference-implementation/_cm.yaml b/script/benchmark-any-mlperf-inference-implementation/meta.yaml similarity index 100% rename from script/benchmark-any-mlperf-inference-implementation/_cm.yaml rename to script/benchmark-any-mlperf-inference-implementation/meta.yaml diff --git a/script/benchmark-program-mlperf/_cm.yaml b/script/benchmark-program-mlperf/meta.yaml similarity index 100% rename from script/benchmark-program-mlperf/_cm.yaml rename to script/benchmark-program-mlperf/meta.yaml diff --git a/script/benchmark-program/_cm.yaml b/script/benchmark-program/meta.yaml similarity index 100% rename from script/benchmark-program/_cm.yaml rename to script/benchmark-program/meta.yaml diff --git a/script/build-docker-image/_cm.yaml b/script/build-docker-image/meta.yaml similarity index 100% rename from script/build-docker-image/_cm.yaml rename to script/build-docker-image/meta.yaml diff --git a/script/build-dockerfile/_cm.yaml b/script/build-dockerfile/meta.yaml similarity index 100% rename from script/build-dockerfile/_cm.yaml rename to script/build-dockerfile/meta.yaml diff --git a/script/build-mlperf-inference-server-nvidia/_cm.yaml b/script/build-mlperf-inference-server-nvidia/meta.yaml similarity index 100% rename from script/build-mlperf-inference-server-nvidia/_cm.yaml rename to script/build-mlperf-inference-server-nvidia/meta.yaml diff --git a/script/calibrate-model-for.qaic/_cm.yaml b/script/calibrate-model-for.qaic/meta.yaml similarity index 100% rename from script/calibrate-model-for.qaic/_cm.yaml rename to script/calibrate-model-for.qaic/meta.yaml diff --git a/script/clean-nvidia-mlperf-inference-scratch-space/_cm.yaml b/script/clean-nvidia-mlperf-inference-scratch-space/meta.yaml similarity index 100% rename from script/clean-nvidia-mlperf-inference-scratch-space/_cm.yaml rename to script/clean-nvidia-mlperf-inference-scratch-space/meta.yaml diff --git a/script/compile-model-for.qaic/_cm.yaml b/script/compile-model-for.qaic/meta.yaml similarity index 100% rename from script/compile-model-for.qaic/_cm.yaml rename to script/compile-model-for.qaic/meta.yaml diff --git a/script/compile-program/_cm.yaml b/script/compile-program/meta.yaml similarity index 100% rename from script/compile-program/_cm.yaml rename to script/compile-program/meta.yaml diff --git a/script/convert-csv-to-md/_cm.yaml b/script/convert-csv-to-md/meta.yaml similarity index 100% rename from script/convert-csv-to-md/_cm.yaml rename to script/convert-csv-to-md/meta.yaml diff --git a/script/convert-ml-model-huggingface-to-onnx/_cm.yaml b/script/convert-ml-model-huggingface-to-onnx/meta.yaml similarity index 100% rename from script/convert-ml-model-huggingface-to-onnx/_cm.yaml rename to script/convert-ml-model-huggingface-to-onnx/meta.yaml diff --git a/script/copy-to-clipboard/_cm.yaml b/script/copy-to-clipboard/meta.yaml similarity index 100% rename from script/copy-to-clipboard/_cm.yaml rename to script/copy-to-clipboard/meta.yaml diff --git a/script/create-conda-env/_cm.yaml b/script/create-conda-env/meta.yaml similarity index 100% rename from script/create-conda-env/_cm.yaml rename to script/create-conda-env/meta.yaml diff --git a/script/create-custom-cache-entry/_cm.yaml b/script/create-custom-cache-entry/meta.yaml similarity index 100% rename from script/create-custom-cache-entry/_cm.yaml rename to script/create-custom-cache-entry/meta.yaml diff --git a/script/create-fpgaconvnet-app-tinyml/_cm.yaml b/script/create-fpgaconvnet-app-tinyml/meta.yaml similarity index 100% rename from script/create-fpgaconvnet-app-tinyml/_cm.yaml rename to script/create-fpgaconvnet-app-tinyml/meta.yaml diff --git a/script/create-fpgaconvnet-config-tinyml/_cm.yaml b/script/create-fpgaconvnet-config-tinyml/meta.yaml similarity index 100% rename from script/create-fpgaconvnet-config-tinyml/_cm.yaml rename to script/create-fpgaconvnet-config-tinyml/meta.yaml diff --git a/script/create-patch/_cm.yaml b/script/create-patch/meta.yaml similarity index 100% rename from script/create-patch/_cm.yaml rename to script/create-patch/meta.yaml diff --git a/script/destroy-terraform/_cm.yaml b/script/destroy-terraform/meta.yaml similarity index 100% rename from script/destroy-terraform/_cm.yaml rename to script/destroy-terraform/meta.yaml diff --git a/script/detect-cpu/_cm.yaml b/script/detect-cpu/meta.yaml similarity index 100% rename from script/detect-cpu/_cm.yaml rename to script/detect-cpu/meta.yaml diff --git a/script/detect-os/_cm.yaml b/script/detect-os/meta.yaml similarity index 100% rename from script/detect-os/_cm.yaml rename to script/detect-os/meta.yaml diff --git a/script/detect-sudo/_cm.yaml b/script/detect-sudo/meta.yaml similarity index 100% rename from script/detect-sudo/_cm.yaml rename to script/detect-sudo/meta.yaml diff --git a/script/download-and-extract/_cm.yaml b/script/download-and-extract/meta.yaml similarity index 100% rename from script/download-and-extract/_cm.yaml rename to script/download-and-extract/meta.yaml diff --git a/script/download-file/_cm.yaml b/script/download-file/meta.yaml similarity index 100% rename from script/download-file/_cm.yaml rename to script/download-file/meta.yaml diff --git a/script/download-torrent/_cm.yaml b/script/download-torrent/meta.yaml similarity index 100% rename from script/download-torrent/_cm.yaml rename to script/download-torrent/meta.yaml diff --git a/script/draw-graph-from-json-data/_cm.yaml b/script/draw-graph-from-json-data/meta.yaml similarity index 100% rename from script/draw-graph-from-json-data/_cm.yaml rename to script/draw-graph-from-json-data/meta.yaml diff --git a/script/dump-pip-freeze/_cm.yaml b/script/dump-pip-freeze/meta.yaml similarity index 100% rename from script/dump-pip-freeze/_cm.yaml rename to script/dump-pip-freeze/meta.yaml diff --git a/script/extract-file/_cm.yaml b/script/extract-file/meta.yaml similarity index 100% rename from script/extract-file/_cm.yaml rename to script/extract-file/meta.yaml diff --git a/script/fail/_cm.yaml b/script/fail/meta.yaml similarity index 100% rename from script/fail/_cm.yaml rename to script/fail/meta.yaml diff --git a/script/flash-tinyml-binary/_cm.yaml b/script/flash-tinyml-binary/meta.yaml similarity index 100% rename from script/flash-tinyml-binary/_cm.yaml rename to script/flash-tinyml-binary/meta.yaml diff --git a/script/generate-mlperf-inference-submission/_cm.yaml b/script/generate-mlperf-inference-submission/meta.yaml similarity index 100% rename from script/generate-mlperf-inference-submission/_cm.yaml rename to script/generate-mlperf-inference-submission/meta.yaml diff --git a/script/generate-mlperf-inference-user-conf/_cm.yaml b/script/generate-mlperf-inference-user-conf/meta.yaml similarity index 100% rename from script/generate-mlperf-inference-user-conf/_cm.yaml rename to script/generate-mlperf-inference-user-conf/meta.yaml diff --git a/script/generate-mlperf-tiny-report/_cm.yaml b/script/generate-mlperf-tiny-report/meta.yaml similarity index 100% rename from script/generate-mlperf-tiny-report/_cm.yaml rename to script/generate-mlperf-tiny-report/meta.yaml diff --git a/script/generate-mlperf-tiny-submission/_cm.yaml b/script/generate-mlperf-tiny-submission/meta.yaml similarity index 100% rename from script/generate-mlperf-tiny-submission/_cm.yaml rename to script/generate-mlperf-tiny-submission/meta.yaml diff --git a/script/generate-nvidia-engine/_cm.yaml b/script/generate-nvidia-engine/meta.yaml similarity index 100% rename from script/generate-nvidia-engine/_cm.yaml rename to script/generate-nvidia-engine/meta.yaml diff --git a/script/get-android-sdk/_cm.yaml b/script/get-android-sdk/meta.yaml similarity index 100% rename from script/get-android-sdk/_cm.yaml rename to script/get-android-sdk/meta.yaml diff --git a/script/get-aocl/_cm.yaml b/script/get-aocl/meta.yaml similarity index 100% rename from script/get-aocl/_cm.yaml rename to script/get-aocl/meta.yaml diff --git a/script/get-aria2/_cm.yaml b/script/get-aria2/meta.yaml similarity index 100% rename from script/get-aria2/_cm.yaml rename to script/get-aria2/meta.yaml diff --git a/script/get-aws-cli/_cm.yaml b/script/get-aws-cli/meta.yaml similarity index 100% rename from script/get-aws-cli/_cm.yaml rename to script/get-aws-cli/meta.yaml diff --git a/script/get-bazel/_cm.yaml b/script/get-bazel/meta.yaml similarity index 100% rename from script/get-bazel/_cm.yaml rename to script/get-bazel/meta.yaml diff --git a/script/get-blis/_cm.yaml b/script/get-blis/meta.yaml similarity index 100% rename from script/get-blis/_cm.yaml rename to script/get-blis/meta.yaml diff --git a/script/get-brew/_cm.yaml b/script/get-brew/meta.yaml similarity index 100% rename from script/get-brew/_cm.yaml rename to script/get-brew/meta.yaml diff --git a/script/get-cache-dir/_cm.yaml b/script/get-cache-dir/meta.yaml similarity index 100% rename from script/get-cache-dir/_cm.yaml rename to script/get-cache-dir/meta.yaml diff --git a/script/get-ck/_cm.yaml b/script/get-ck/meta.yaml similarity index 100% rename from script/get-ck/_cm.yaml rename to script/get-ck/meta.yaml diff --git a/script/get-cl/_cm.yaml b/script/get-cl/meta.yaml similarity index 100% rename from script/get-cl/_cm.yaml rename to script/get-cl/meta.yaml diff --git a/script/get-cmake/_cm.yaml b/script/get-cmake/meta.yaml similarity index 100% rename from script/get-cmake/_cm.yaml rename to script/get-cmake/meta.yaml diff --git a/script/get-cmsis_5/_cm.yaml b/script/get-cmsis_5/meta.yaml similarity index 100% rename from script/get-cmsis_5/_cm.yaml rename to script/get-cmsis_5/meta.yaml diff --git a/script/get-compiler-flags/_cm.yaml b/script/get-compiler-flags/meta.yaml similarity index 100% rename from script/get-compiler-flags/_cm.yaml rename to script/get-compiler-flags/meta.yaml diff --git a/script/get-compiler-rust/_cm.yaml b/script/get-compiler-rust/meta.yaml similarity index 100% rename from script/get-compiler-rust/_cm.yaml rename to script/get-compiler-rust/meta.yaml diff --git a/script/get-conda/_cm.yaml b/script/get-conda/meta.yaml similarity index 100% rename from script/get-conda/_cm.yaml rename to script/get-conda/meta.yaml diff --git a/script/get-croissant/_cm.yaml b/script/get-croissant/meta.yaml similarity index 100% rename from script/get-croissant/_cm.yaml rename to script/get-croissant/meta.yaml diff --git a/script/get-cuda-devices/_cm.yaml b/script/get-cuda-devices/meta.yaml similarity index 100% rename from script/get-cuda-devices/_cm.yaml rename to script/get-cuda-devices/meta.yaml diff --git a/script/get-cuda/_cm.yaml b/script/get-cuda/meta.yaml similarity index 100% rename from script/get-cuda/_cm.yaml rename to script/get-cuda/meta.yaml diff --git a/script/get-cudnn/_cm.yaml b/script/get-cudnn/meta.yaml similarity index 100% rename from script/get-cudnn/_cm.yaml rename to script/get-cudnn/meta.yaml diff --git a/script/get-dataset-cifar10/_cm.yaml b/script/get-dataset-cifar10/meta.yaml similarity index 100% rename from script/get-dataset-cifar10/_cm.yaml rename to script/get-dataset-cifar10/meta.yaml diff --git a/script/get-dataset-cnndm/_cm.yaml b/script/get-dataset-cnndm/meta.yaml similarity index 100% rename from script/get-dataset-cnndm/_cm.yaml rename to script/get-dataset-cnndm/meta.yaml diff --git a/script/get-dataset-coco/_cm.yaml b/script/get-dataset-coco/meta.yaml similarity index 100% rename from script/get-dataset-coco/_cm.yaml rename to script/get-dataset-coco/meta.yaml diff --git a/script/get-dataset-coco2014/_cm.yaml b/script/get-dataset-coco2014/meta.yaml similarity index 100% rename from script/get-dataset-coco2014/_cm.yaml rename to script/get-dataset-coco2014/meta.yaml diff --git a/script/get-dataset-cognata-mlcommons/_cm.yaml b/script/get-dataset-cognata-mlcommons/meta.yaml similarity index 100% rename from script/get-dataset-cognata-mlcommons/_cm.yaml rename to script/get-dataset-cognata-mlcommons/meta.yaml diff --git a/script/get-dataset-criteo/_cm.yaml b/script/get-dataset-criteo/meta.yaml similarity index 100% rename from script/get-dataset-criteo/_cm.yaml rename to script/get-dataset-criteo/meta.yaml diff --git a/script/get-dataset-igbh/_cm.yaml b/script/get-dataset-igbh/meta.yaml similarity index 100% rename from script/get-dataset-igbh/_cm.yaml rename to script/get-dataset-igbh/meta.yaml diff --git a/script/get-dataset-imagenet-aux/_cm.yaml b/script/get-dataset-imagenet-aux/meta.yaml similarity index 100% rename from script/get-dataset-imagenet-aux/_cm.yaml rename to script/get-dataset-imagenet-aux/meta.yaml diff --git a/script/get-dataset-imagenet-calibration/_cm.yaml b/script/get-dataset-imagenet-calibration/meta.yaml similarity index 100% rename from script/get-dataset-imagenet-calibration/_cm.yaml rename to script/get-dataset-imagenet-calibration/meta.yaml diff --git a/script/get-dataset-imagenet-helper/_cm.yaml b/script/get-dataset-imagenet-helper/meta.yaml similarity index 100% rename from script/get-dataset-imagenet-helper/_cm.yaml rename to script/get-dataset-imagenet-helper/meta.yaml diff --git a/script/get-dataset-imagenet-train/_cm.yaml b/script/get-dataset-imagenet-train/meta.yaml similarity index 100% rename from script/get-dataset-imagenet-train/_cm.yaml rename to script/get-dataset-imagenet-train/meta.yaml diff --git a/script/get-dataset-imagenet-val/_cm.yaml b/script/get-dataset-imagenet-val/meta.yaml similarity index 100% rename from script/get-dataset-imagenet-val/_cm.yaml rename to script/get-dataset-imagenet-val/meta.yaml diff --git a/script/get-dataset-kits19/_cm.yaml b/script/get-dataset-kits19/meta.yaml similarity index 100% rename from script/get-dataset-kits19/_cm.yaml rename to script/get-dataset-kits19/meta.yaml diff --git a/script/get-dataset-librispeech/_cm.yaml b/script/get-dataset-librispeech/meta.yaml similarity index 100% rename from script/get-dataset-librispeech/_cm.yaml rename to script/get-dataset-librispeech/meta.yaml diff --git a/script/get-dataset-mlperf-inference-llama3/_cm.yaml b/script/get-dataset-mlperf-inference-llama3/meta.yaml similarity index 100% rename from script/get-dataset-mlperf-inference-llama3/_cm.yaml rename to script/get-dataset-mlperf-inference-llama3/meta.yaml diff --git a/script/get-dataset-mlperf-inference-mixtral/_cm.yaml b/script/get-dataset-mlperf-inference-mixtral/meta.yaml similarity index 100% rename from script/get-dataset-mlperf-inference-mixtral/_cm.yaml rename to script/get-dataset-mlperf-inference-mixtral/meta.yaml diff --git a/script/get-dataset-openimages-annotations/_cm.yaml b/script/get-dataset-openimages-annotations/meta.yaml similarity index 100% rename from script/get-dataset-openimages-annotations/_cm.yaml rename to script/get-dataset-openimages-annotations/meta.yaml diff --git a/script/get-dataset-openimages-calibration/_cm.yaml b/script/get-dataset-openimages-calibration/meta.yaml similarity index 100% rename from script/get-dataset-openimages-calibration/_cm.yaml rename to script/get-dataset-openimages-calibration/meta.yaml diff --git a/script/get-dataset-openimages/_cm.yaml b/script/get-dataset-openimages/meta.yaml similarity index 100% rename from script/get-dataset-openimages/_cm.yaml rename to script/get-dataset-openimages/meta.yaml diff --git a/script/get-dataset-openorca/_cm.yaml b/script/get-dataset-openorca/meta.yaml similarity index 100% rename from script/get-dataset-openorca/_cm.yaml rename to script/get-dataset-openorca/meta.yaml diff --git a/script/get-dataset-squad-vocab/_cm.yaml b/script/get-dataset-squad-vocab/meta.yaml similarity index 100% rename from script/get-dataset-squad-vocab/_cm.yaml rename to script/get-dataset-squad-vocab/meta.yaml diff --git a/script/get-dataset-squad/_cm.yaml b/script/get-dataset-squad/meta.yaml similarity index 100% rename from script/get-dataset-squad/_cm.yaml rename to script/get-dataset-squad/meta.yaml diff --git a/script/get-dlrm-data-mlperf-inference/_cm.yaml b/script/get-dlrm-data-mlperf-inference/meta.yaml similarity index 100% rename from script/get-dlrm-data-mlperf-inference/_cm.yaml rename to script/get-dlrm-data-mlperf-inference/meta.yaml diff --git a/script/get-dlrm/_cm.yaml b/script/get-dlrm/meta.yaml similarity index 100% rename from script/get-dlrm/_cm.yaml rename to script/get-dlrm/meta.yaml diff --git a/script/get-docker/_cm.yaml b/script/get-docker/meta.yaml similarity index 100% rename from script/get-docker/_cm.yaml rename to script/get-docker/meta.yaml diff --git a/script/get-gcc/_cm.yaml b/script/get-gcc/meta.yaml similarity index 100% rename from script/get-gcc/_cm.yaml rename to script/get-gcc/meta.yaml diff --git a/script/get-generic-python-lib/_cm.yaml b/script/get-generic-python-lib/meta.yaml similarity index 100% rename from script/get-generic-python-lib/_cm.yaml rename to script/get-generic-python-lib/meta.yaml diff --git a/script/get-generic-sys-util/_cm.yaml b/script/get-generic-sys-util/meta.yaml similarity index 100% rename from script/get-generic-sys-util/_cm.yaml rename to script/get-generic-sys-util/meta.yaml diff --git a/script/get-gh-actions-runner/_cm.yaml b/script/get-gh-actions-runner/meta.yaml similarity index 100% rename from script/get-gh-actions-runner/_cm.yaml rename to script/get-gh-actions-runner/meta.yaml diff --git a/script/get-git-repo/_cm.yaml b/script/get-git-repo/meta.yaml similarity index 100% rename from script/get-git-repo/_cm.yaml rename to script/get-git-repo/meta.yaml diff --git a/script/get-github-cli/_cm.yaml b/script/get-github-cli/meta.yaml similarity index 100% rename from script/get-github-cli/_cm.yaml rename to script/get-github-cli/meta.yaml diff --git a/script/get-go/_cm.yaml b/script/get-go/meta.yaml similarity index 100% rename from script/get-go/_cm.yaml rename to script/get-go/meta.yaml diff --git a/script/get-google-saxml/_cm.yaml b/script/get-google-saxml/meta.yaml similarity index 100% rename from script/get-google-saxml/_cm.yaml rename to script/get-google-saxml/meta.yaml diff --git a/script/get-google-test/_cm.yaml b/script/get-google-test/meta.yaml similarity index 100% rename from script/get-google-test/_cm.yaml rename to script/get-google-test/meta.yaml diff --git a/script/get-huggingface-cli/_cm.yaml b/script/get-huggingface-cli/meta.yaml similarity index 100% rename from script/get-huggingface-cli/_cm.yaml rename to script/get-huggingface-cli/meta.yaml diff --git a/script/get-ipol-src/_cm.yaml b/script/get-ipol-src/meta.yaml similarity index 100% rename from script/get-ipol-src/_cm.yaml rename to script/get-ipol-src/meta.yaml diff --git a/script/get-java/_cm.yaml b/script/get-java/meta.yaml similarity index 100% rename from script/get-java/_cm.yaml rename to script/get-java/meta.yaml diff --git a/script/get-javac/_cm.yaml b/script/get-javac/meta.yaml similarity index 100% rename from script/get-javac/_cm.yaml rename to script/get-javac/meta.yaml diff --git a/script/get-lib-armnn/_cm.yaml b/script/get-lib-armnn/meta.yaml similarity index 100% rename from script/get-lib-armnn/_cm.yaml rename to script/get-lib-armnn/meta.yaml diff --git a/script/get-lib-dnnl/_cm.yaml b/script/get-lib-dnnl/meta.yaml similarity index 100% rename from script/get-lib-dnnl/_cm.yaml rename to script/get-lib-dnnl/meta.yaml diff --git a/script/get-lib-protobuf/_cm.yaml b/script/get-lib-protobuf/meta.yaml similarity index 100% rename from script/get-lib-protobuf/_cm.yaml rename to script/get-lib-protobuf/meta.yaml diff --git a/script/get-lib-qaic-api/_cm.yaml b/script/get-lib-qaic-api/meta.yaml similarity index 100% rename from script/get-lib-qaic-api/_cm.yaml rename to script/get-lib-qaic-api/meta.yaml diff --git a/script/get-llvm/_cm.yaml b/script/get-llvm/meta.yaml similarity index 100% rename from script/get-llvm/_cm.yaml rename to script/get-llvm/meta.yaml diff --git a/script/get-microtvm/_cm.yaml b/script/get-microtvm/meta.yaml similarity index 100% rename from script/get-microtvm/_cm.yaml rename to script/get-microtvm/meta.yaml diff --git a/script/get-ml-model-3d-unet-kits19/_cm.yaml b/script/get-ml-model-3d-unet-kits19/meta.yaml similarity index 100% rename from script/get-ml-model-3d-unet-kits19/_cm.yaml rename to script/get-ml-model-3d-unet-kits19/meta.yaml diff --git a/script/get-ml-model-abtf-ssd-pytorch/_cm.yaml b/script/get-ml-model-abtf-ssd-pytorch/meta.yaml similarity index 100% rename from script/get-ml-model-abtf-ssd-pytorch/_cm.yaml rename to script/get-ml-model-abtf-ssd-pytorch/meta.yaml diff --git a/script/get-ml-model-bert-base-squad/_cm.yaml b/script/get-ml-model-bert-base-squad/meta.yaml similarity index 100% rename from script/get-ml-model-bert-base-squad/_cm.yaml rename to script/get-ml-model-bert-base-squad/meta.yaml diff --git a/script/get-ml-model-bert-large-squad/_cm.yaml b/script/get-ml-model-bert-large-squad/meta.yaml similarity index 100% rename from script/get-ml-model-bert-large-squad/_cm.yaml rename to script/get-ml-model-bert-large-squad/meta.yaml diff --git a/script/get-ml-model-dlrm-terabyte/_cm.yaml b/script/get-ml-model-dlrm-terabyte/meta.yaml similarity index 100% rename from script/get-ml-model-dlrm-terabyte/_cm.yaml rename to script/get-ml-model-dlrm-terabyte/meta.yaml diff --git a/script/get-ml-model-efficientnet-lite/_cm.yaml b/script/get-ml-model-efficientnet-lite/meta.yaml similarity index 100% rename from script/get-ml-model-efficientnet-lite/_cm.yaml rename to script/get-ml-model-efficientnet-lite/meta.yaml diff --git a/script/get-ml-model-gptj/_cm.yaml b/script/get-ml-model-gptj/meta.yaml similarity index 100% rename from script/get-ml-model-gptj/_cm.yaml rename to script/get-ml-model-gptj/meta.yaml diff --git a/script/get-ml-model-huggingface-zoo/_cm.yaml b/script/get-ml-model-huggingface-zoo/meta.yaml similarity index 100% rename from script/get-ml-model-huggingface-zoo/_cm.yaml rename to script/get-ml-model-huggingface-zoo/meta.yaml diff --git a/script/get-ml-model-llama2/_cm.yaml b/script/get-ml-model-llama2/meta.yaml similarity index 100% rename from script/get-ml-model-llama2/_cm.yaml rename to script/get-ml-model-llama2/meta.yaml diff --git a/script/get-ml-model-llama3/_cm.yaml b/script/get-ml-model-llama3/meta.yaml similarity index 100% rename from script/get-ml-model-llama3/_cm.yaml rename to script/get-ml-model-llama3/meta.yaml diff --git a/script/get-ml-model-mixtral/_cm.yaml b/script/get-ml-model-mixtral/meta.yaml similarity index 100% rename from script/get-ml-model-mixtral/_cm.yaml rename to script/get-ml-model-mixtral/meta.yaml diff --git a/script/get-ml-model-mobilenet/_cm.yaml b/script/get-ml-model-mobilenet/meta.yaml similarity index 100% rename from script/get-ml-model-mobilenet/_cm.yaml rename to script/get-ml-model-mobilenet/meta.yaml diff --git a/script/get-ml-model-neuralmagic-zoo/_cm.yaml b/script/get-ml-model-neuralmagic-zoo/meta.yaml similarity index 100% rename from script/get-ml-model-neuralmagic-zoo/_cm.yaml rename to script/get-ml-model-neuralmagic-zoo/meta.yaml diff --git a/script/get-ml-model-resnet50/_cm.yaml b/script/get-ml-model-resnet50/meta.yaml similarity index 100% rename from script/get-ml-model-resnet50/_cm.yaml rename to script/get-ml-model-resnet50/meta.yaml diff --git a/script/get-ml-model-retinanet-nvidia/_cm.yaml b/script/get-ml-model-retinanet-nvidia/meta.yaml similarity index 100% rename from script/get-ml-model-retinanet-nvidia/_cm.yaml rename to script/get-ml-model-retinanet-nvidia/meta.yaml diff --git a/script/get-ml-model-retinanet/_cm.yaml b/script/get-ml-model-retinanet/meta.yaml similarity index 100% rename from script/get-ml-model-retinanet/_cm.yaml rename to script/get-ml-model-retinanet/meta.yaml diff --git a/script/get-ml-model-rgat/_cm.yaml b/script/get-ml-model-rgat/meta.yaml similarity index 100% rename from script/get-ml-model-rgat/_cm.yaml rename to script/get-ml-model-rgat/meta.yaml diff --git a/script/get-ml-model-rnnt/_cm.yaml b/script/get-ml-model-rnnt/meta.yaml similarity index 100% rename from script/get-ml-model-rnnt/_cm.yaml rename to script/get-ml-model-rnnt/meta.yaml diff --git a/script/get-ml-model-stable-diffusion/_cm.yaml b/script/get-ml-model-stable-diffusion/meta.yaml similarity index 100% rename from script/get-ml-model-stable-diffusion/_cm.yaml rename to script/get-ml-model-stable-diffusion/meta.yaml diff --git a/script/get-ml-model-tiny-resnet/_cm.yaml b/script/get-ml-model-tiny-resnet/meta.yaml similarity index 100% rename from script/get-ml-model-tiny-resnet/_cm.yaml rename to script/get-ml-model-tiny-resnet/meta.yaml diff --git a/script/get-ml-model-using-imagenet-from-model-zoo/_cm.yaml b/script/get-ml-model-using-imagenet-from-model-zoo/meta.yaml similarity index 100% rename from script/get-ml-model-using-imagenet-from-model-zoo/_cm.yaml rename to script/get-ml-model-using-imagenet-from-model-zoo/meta.yaml diff --git a/script/get-mlperf-automotive-scratch-space/_cm.yaml b/script/get-mlperf-automotive-scratch-space/meta.yaml similarity index 100% rename from script/get-mlperf-automotive-scratch-space/_cm.yaml rename to script/get-mlperf-automotive-scratch-space/meta.yaml diff --git a/script/get-mlperf-inference-intel-scratch-space/_cm.yaml b/script/get-mlperf-inference-intel-scratch-space/meta.yaml similarity index 100% rename from script/get-mlperf-inference-intel-scratch-space/_cm.yaml rename to script/get-mlperf-inference-intel-scratch-space/meta.yaml diff --git a/script/get-mlperf-inference-loadgen/_cm.yaml b/script/get-mlperf-inference-loadgen/meta.yaml similarity index 100% rename from script/get-mlperf-inference-loadgen/_cm.yaml rename to script/get-mlperf-inference-loadgen/meta.yaml diff --git a/script/get-mlperf-inference-nvidia-common-code/_cm.yaml b/script/get-mlperf-inference-nvidia-common-code/meta.yaml similarity index 100% rename from script/get-mlperf-inference-nvidia-common-code/_cm.yaml rename to script/get-mlperf-inference-nvidia-common-code/meta.yaml diff --git a/script/get-mlperf-inference-nvidia-scratch-space/_cm.yaml b/script/get-mlperf-inference-nvidia-scratch-space/meta.yaml similarity index 100% rename from script/get-mlperf-inference-nvidia-scratch-space/_cm.yaml rename to script/get-mlperf-inference-nvidia-scratch-space/meta.yaml diff --git a/script/get-mlperf-inference-results-dir/_cm.yaml b/script/get-mlperf-inference-results-dir/meta.yaml similarity index 100% rename from script/get-mlperf-inference-results-dir/_cm.yaml rename to script/get-mlperf-inference-results-dir/meta.yaml diff --git a/script/get-mlperf-inference-results/_cm.yaml b/script/get-mlperf-inference-results/meta.yaml similarity index 100% rename from script/get-mlperf-inference-results/_cm.yaml rename to script/get-mlperf-inference-results/meta.yaml diff --git a/script/get-mlperf-inference-src/_cm.yaml b/script/get-mlperf-inference-src/meta.yaml similarity index 100% rename from script/get-mlperf-inference-src/_cm.yaml rename to script/get-mlperf-inference-src/meta.yaml diff --git a/script/get-mlperf-inference-submission-dir/_cm.yaml b/script/get-mlperf-inference-submission-dir/meta.yaml similarity index 100% rename from script/get-mlperf-inference-submission-dir/_cm.yaml rename to script/get-mlperf-inference-submission-dir/meta.yaml diff --git a/script/get-mlperf-inference-sut-configs/_cm.yaml b/script/get-mlperf-inference-sut-configs/meta.yaml similarity index 100% rename from script/get-mlperf-inference-sut-configs/_cm.yaml rename to script/get-mlperf-inference-sut-configs/meta.yaml diff --git a/script/get-mlperf-inference-sut-description/_cm.yaml b/script/get-mlperf-inference-sut-description/meta.yaml similarity index 100% rename from script/get-mlperf-inference-sut-description/_cm.yaml rename to script/get-mlperf-inference-sut-description/meta.yaml diff --git a/script/get-mlperf-inference-utils/_cm.yaml b/script/get-mlperf-inference-utils/meta.yaml similarity index 100% rename from script/get-mlperf-inference-utils/_cm.yaml rename to script/get-mlperf-inference-utils/meta.yaml diff --git a/script/get-mlperf-logging/_cm.yaml b/script/get-mlperf-logging/meta.yaml similarity index 100% rename from script/get-mlperf-logging/_cm.yaml rename to script/get-mlperf-logging/meta.yaml diff --git a/script/get-mlperf-power-dev/_cm.yaml b/script/get-mlperf-power-dev/meta.yaml similarity index 100% rename from script/get-mlperf-power-dev/_cm.yaml rename to script/get-mlperf-power-dev/meta.yaml diff --git a/script/get-mlperf-tiny-eembc-energy-runner-src/_cm.yaml b/script/get-mlperf-tiny-eembc-energy-runner-src/meta.yaml similarity index 100% rename from script/get-mlperf-tiny-eembc-energy-runner-src/_cm.yaml rename to script/get-mlperf-tiny-eembc-energy-runner-src/meta.yaml diff --git a/script/get-mlperf-tiny-src/_cm.yaml b/script/get-mlperf-tiny-src/meta.yaml similarity index 100% rename from script/get-mlperf-tiny-src/_cm.yaml rename to script/get-mlperf-tiny-src/meta.yaml diff --git a/script/get-mlperf-training-nvidia-code/_cm.yaml b/script/get-mlperf-training-nvidia-code/meta.yaml similarity index 100% rename from script/get-mlperf-training-nvidia-code/_cm.yaml rename to script/get-mlperf-training-nvidia-code/meta.yaml diff --git a/script/get-mlperf-training-src/_cm.yaml b/script/get-mlperf-training-src/meta.yaml similarity index 100% rename from script/get-mlperf-training-src/_cm.yaml rename to script/get-mlperf-training-src/meta.yaml diff --git a/script/get-nvidia-docker/_cm.yaml b/script/get-nvidia-docker/meta.yaml similarity index 100% rename from script/get-nvidia-docker/_cm.yaml rename to script/get-nvidia-docker/meta.yaml diff --git a/script/get-nvidia-mitten/_cm.yaml b/script/get-nvidia-mitten/meta.yaml similarity index 100% rename from script/get-nvidia-mitten/_cm.yaml rename to script/get-nvidia-mitten/meta.yaml diff --git a/script/get-onnxruntime-prebuilt/_cm.yaml b/script/get-onnxruntime-prebuilt/meta.yaml similarity index 100% rename from script/get-onnxruntime-prebuilt/_cm.yaml rename to script/get-onnxruntime-prebuilt/meta.yaml diff --git a/script/get-openssl/_cm.yaml b/script/get-openssl/meta.yaml similarity index 100% rename from script/get-openssl/_cm.yaml rename to script/get-openssl/meta.yaml diff --git a/script/get-platform-details/_cm.yaml b/script/get-platform-details/meta.yaml similarity index 100% rename from script/get-platform-details/_cm.yaml rename to script/get-platform-details/meta.yaml diff --git a/script/get-preprocessed-dataset-criteo/_cm.yaml b/script/get-preprocessed-dataset-criteo/meta.yaml similarity index 100% rename from script/get-preprocessed-dataset-criteo/_cm.yaml rename to script/get-preprocessed-dataset-criteo/meta.yaml diff --git a/script/get-preprocessed-dataset-generic/_cm.yaml b/script/get-preprocessed-dataset-generic/meta.yaml similarity index 100% rename from script/get-preprocessed-dataset-generic/_cm.yaml rename to script/get-preprocessed-dataset-generic/meta.yaml diff --git a/script/get-preprocessed-dataset-imagenet/_cm.yaml b/script/get-preprocessed-dataset-imagenet/meta.yaml similarity index 100% rename from script/get-preprocessed-dataset-imagenet/_cm.yaml rename to script/get-preprocessed-dataset-imagenet/meta.yaml diff --git a/script/get-preprocessed-dataset-kits19/_cm.yaml b/script/get-preprocessed-dataset-kits19/meta.yaml similarity index 100% rename from script/get-preprocessed-dataset-kits19/_cm.yaml rename to script/get-preprocessed-dataset-kits19/meta.yaml diff --git a/script/get-preprocessed-dataset-librispeech/_cm.yaml b/script/get-preprocessed-dataset-librispeech/meta.yaml similarity index 100% rename from script/get-preprocessed-dataset-librispeech/_cm.yaml rename to script/get-preprocessed-dataset-librispeech/meta.yaml diff --git a/script/get-preprocessed-dataset-openimages/_cm.yaml b/script/get-preprocessed-dataset-openimages/meta.yaml similarity index 100% rename from script/get-preprocessed-dataset-openimages/_cm.yaml rename to script/get-preprocessed-dataset-openimages/meta.yaml diff --git a/script/get-preprocessed-dataset-openorca/_cm.yaml b/script/get-preprocessed-dataset-openorca/meta.yaml similarity index 100% rename from script/get-preprocessed-dataset-openorca/_cm.yaml rename to script/get-preprocessed-dataset-openorca/meta.yaml diff --git a/script/get-preprocessed-dataset-squad/_cm.yaml b/script/get-preprocessed-dataset-squad/meta.yaml similarity index 100% rename from script/get-preprocessed-dataset-squad/_cm.yaml rename to script/get-preprocessed-dataset-squad/meta.yaml diff --git a/script/get-python3/_cm.yaml b/script/get-python3/meta.yaml similarity index 100% rename from script/get-python3/_cm.yaml rename to script/get-python3/meta.yaml diff --git a/script/get-qaic-apps-sdk/_cm.yaml b/script/get-qaic-apps-sdk/meta.yaml similarity index 100% rename from script/get-qaic-apps-sdk/_cm.yaml rename to script/get-qaic-apps-sdk/meta.yaml diff --git a/script/get-qaic-platform-sdk/_cm.yaml b/script/get-qaic-platform-sdk/meta.yaml similarity index 100% rename from script/get-qaic-platform-sdk/_cm.yaml rename to script/get-qaic-platform-sdk/meta.yaml diff --git a/script/get-qaic-software-kit/_cm.yaml b/script/get-qaic-software-kit/meta.yaml similarity index 100% rename from script/get-qaic-software-kit/_cm.yaml rename to script/get-qaic-software-kit/meta.yaml diff --git a/script/get-rclone-config/_cm.yaml b/script/get-rclone-config/meta.yaml similarity index 100% rename from script/get-rclone-config/_cm.yaml rename to script/get-rclone-config/meta.yaml diff --git a/script/get-rclone/_cm.yaml b/script/get-rclone/meta.yaml similarity index 100% rename from script/get-rclone/_cm.yaml rename to script/get-rclone/meta.yaml diff --git a/script/get-rocm-devices/_cm.yaml b/script/get-rocm-devices/meta.yaml similarity index 100% rename from script/get-rocm-devices/_cm.yaml rename to script/get-rocm-devices/meta.yaml diff --git a/script/get-rocm/_cm.yaml b/script/get-rocm/meta.yaml similarity index 100% rename from script/get-rocm/_cm.yaml rename to script/get-rocm/meta.yaml diff --git a/script/get-spec-ptd/_cm.yaml b/script/get-spec-ptd/meta.yaml similarity index 100% rename from script/get-spec-ptd/_cm.yaml rename to script/get-spec-ptd/meta.yaml diff --git a/script/get-sys-utils-cm/_cm.yaml b/script/get-sys-utils-cm/meta.yaml similarity index 100% rename from script/get-sys-utils-cm/_cm.yaml rename to script/get-sys-utils-cm/meta.yaml diff --git a/script/get-sys-utils-min/_cm.yaml b/script/get-sys-utils-min/meta.yaml similarity index 100% rename from script/get-sys-utils-min/_cm.yaml rename to script/get-sys-utils-min/meta.yaml diff --git a/script/get-tensorrt/_cm.yaml b/script/get-tensorrt/meta.yaml similarity index 100% rename from script/get-tensorrt/_cm.yaml rename to script/get-tensorrt/meta.yaml diff --git a/script/get-terraform/_cm.yaml b/script/get-terraform/meta.yaml similarity index 100% rename from script/get-terraform/_cm.yaml rename to script/get-terraform/meta.yaml diff --git a/script/get-tvm-model/_cm.yaml b/script/get-tvm-model/meta.yaml similarity index 100% rename from script/get-tvm-model/_cm.yaml rename to script/get-tvm-model/meta.yaml diff --git a/script/get-tvm/_cm.yaml b/script/get-tvm/meta.yaml similarity index 100% rename from script/get-tvm/_cm.yaml rename to script/get-tvm/meta.yaml diff --git a/script/get-xilinx-sdk/_cm.yaml b/script/get-xilinx-sdk/meta.yaml similarity index 100% rename from script/get-xilinx-sdk/_cm.yaml rename to script/get-xilinx-sdk/meta.yaml diff --git a/script/get-zendnn/_cm.yaml b/script/get-zendnn/meta.yaml similarity index 100% rename from script/get-zendnn/_cm.yaml rename to script/get-zendnn/meta.yaml diff --git a/script/get-zephyr-sdk/_cm.yaml b/script/get-zephyr-sdk/meta.yaml similarity index 100% rename from script/get-zephyr-sdk/_cm.yaml rename to script/get-zephyr-sdk/meta.yaml diff --git a/script/get-zephyr/_cm.yaml b/script/get-zephyr/meta.yaml similarity index 100% rename from script/get-zephyr/_cm.yaml rename to script/get-zephyr/meta.yaml diff --git a/script/install-apt-package/_cm.yaml b/script/install-apt-package/meta.yaml similarity index 100% rename from script/install-apt-package/_cm.yaml rename to script/install-apt-package/meta.yaml diff --git a/script/install-aws-cli/_cm.yaml b/script/install-aws-cli/meta.yaml similarity index 100% rename from script/install-aws-cli/_cm.yaml rename to script/install-aws-cli/meta.yaml diff --git a/script/install-bazel/_cm.yaml b/script/install-bazel/meta.yaml similarity index 100% rename from script/install-bazel/_cm.yaml rename to script/install-bazel/meta.yaml diff --git a/script/install-cmake-prebuilt/_cm.yaml b/script/install-cmake-prebuilt/meta.yaml similarity index 100% rename from script/install-cmake-prebuilt/_cm.yaml rename to script/install-cmake-prebuilt/meta.yaml diff --git a/script/install-cuda-package-manager/_cm.yaml b/script/install-cuda-package-manager/meta.yaml similarity index 100% rename from script/install-cuda-package-manager/_cm.yaml rename to script/install-cuda-package-manager/meta.yaml diff --git a/script/install-cuda-prebuilt/_cm.yaml b/script/install-cuda-prebuilt/meta.yaml similarity index 100% rename from script/install-cuda-prebuilt/_cm.yaml rename to script/install-cuda-prebuilt/meta.yaml diff --git a/script/install-diffusers-from-src/_cm.yaml b/script/install-diffusers-from-src/meta.yaml similarity index 100% rename from script/install-diffusers-from-src/_cm.yaml rename to script/install-diffusers-from-src/meta.yaml diff --git a/script/install-gcc-src/_cm.yaml b/script/install-gcc-src/meta.yaml similarity index 100% rename from script/install-gcc-src/_cm.yaml rename to script/install-gcc-src/meta.yaml diff --git a/script/install-generic-conda-package/_cm.yaml b/script/install-generic-conda-package/meta.yaml similarity index 100% rename from script/install-generic-conda-package/_cm.yaml rename to script/install-generic-conda-package/meta.yaml diff --git a/script/install-gflags-from-src/_cm.yaml b/script/install-gflags-from-src/meta.yaml similarity index 100% rename from script/install-gflags-from-src/_cm.yaml rename to script/install-gflags-from-src/meta.yaml diff --git a/script/install-gflags/_cm.yaml b/script/install-gflags/meta.yaml similarity index 100% rename from script/install-gflags/_cm.yaml rename to script/install-gflags/meta.yaml diff --git a/script/install-github-cli/_cm.yaml b/script/install-github-cli/meta.yaml similarity index 100% rename from script/install-github-cli/_cm.yaml rename to script/install-github-cli/meta.yaml diff --git a/script/install-intel-neural-speed-from-src/_cm.yaml b/script/install-intel-neural-speed-from-src/meta.yaml similarity index 100% rename from script/install-intel-neural-speed-from-src/_cm.yaml rename to script/install-intel-neural-speed-from-src/meta.yaml diff --git a/script/install-ipex-from-src/_cm.yaml b/script/install-ipex-from-src/meta.yaml similarity index 100% rename from script/install-ipex-from-src/_cm.yaml rename to script/install-ipex-from-src/meta.yaml diff --git a/script/install-llvm-prebuilt/_cm.yaml b/script/install-llvm-prebuilt/meta.yaml similarity index 100% rename from script/install-llvm-prebuilt/_cm.yaml rename to script/install-llvm-prebuilt/meta.yaml diff --git a/script/install-llvm-src/_cm.yaml b/script/install-llvm-src/meta.yaml similarity index 100% rename from script/install-llvm-src/_cm.yaml rename to script/install-llvm-src/meta.yaml diff --git a/script/install-mlperf-logging-from-src/_cm.yaml b/script/install-mlperf-logging-from-src/meta.yaml similarity index 100% rename from script/install-mlperf-logging-from-src/_cm.yaml rename to script/install-mlperf-logging-from-src/meta.yaml diff --git a/script/install-nccl-libs/_cm.yaml b/script/install-nccl-libs/meta.yaml similarity index 100% rename from script/install-nccl-libs/_cm.yaml rename to script/install-nccl-libs/meta.yaml diff --git a/script/install-numactl-from-src/_cm.yaml b/script/install-numactl-from-src/meta.yaml similarity index 100% rename from script/install-numactl-from-src/_cm.yaml rename to script/install-numactl-from-src/meta.yaml diff --git a/script/install-onednn-from-src/_cm.yaml b/script/install-onednn-from-src/meta.yaml similarity index 100% rename from script/install-onednn-from-src/_cm.yaml rename to script/install-onednn-from-src/meta.yaml diff --git a/script/install-onnxruntime-from-src/_cm.yaml b/script/install-onnxruntime-from-src/meta.yaml similarity index 100% rename from script/install-onnxruntime-from-src/_cm.yaml rename to script/install-onnxruntime-from-src/meta.yaml diff --git a/script/install-opencv-from-src/_cm.yaml b/script/install-opencv-from-src/meta.yaml similarity index 100% rename from script/install-opencv-from-src/_cm.yaml rename to script/install-opencv-from-src/meta.yaml diff --git a/script/install-openssl/_cm.yaml b/script/install-openssl/meta.yaml similarity index 100% rename from script/install-openssl/_cm.yaml rename to script/install-openssl/meta.yaml diff --git a/script/install-pip-package-for-cmind-python/_cm.yaml b/script/install-pip-package-for-cmind-python/meta.yaml similarity index 100% rename from script/install-pip-package-for-cmind-python/_cm.yaml rename to script/install-pip-package-for-cmind-python/meta.yaml diff --git a/script/install-python-src/_cm.yaml b/script/install-python-src/meta.yaml similarity index 100% rename from script/install-python-src/_cm.yaml rename to script/install-python-src/meta.yaml diff --git a/script/install-python-venv/_cm.yaml b/script/install-python-venv/meta.yaml similarity index 100% rename from script/install-python-venv/_cm.yaml rename to script/install-python-venv/meta.yaml diff --git a/script/install-pytorch-from-src/_cm.yaml b/script/install-pytorch-from-src/meta.yaml similarity index 100% rename from script/install-pytorch-from-src/_cm.yaml rename to script/install-pytorch-from-src/meta.yaml diff --git a/script/install-pytorch-kineto-from-src/_cm.yaml b/script/install-pytorch-kineto-from-src/meta.yaml similarity index 100% rename from script/install-pytorch-kineto-from-src/_cm.yaml rename to script/install-pytorch-kineto-from-src/meta.yaml diff --git a/script/install-qaic-compute-sdk-from-src/_cm.yaml b/script/install-qaic-compute-sdk-from-src/meta.yaml similarity index 100% rename from script/install-qaic-compute-sdk-from-src/_cm.yaml rename to script/install-qaic-compute-sdk-from-src/meta.yaml diff --git a/script/install-rapidjson-from-src/_cm.yaml b/script/install-rapidjson-from-src/meta.yaml similarity index 100% rename from script/install-rapidjson-from-src/_cm.yaml rename to script/install-rapidjson-from-src/meta.yaml diff --git a/script/install-rocm/_cm.yaml b/script/install-rocm/meta.yaml similarity index 100% rename from script/install-rocm/_cm.yaml rename to script/install-rocm/meta.yaml diff --git a/script/install-tensorflow-for-c/_cm.yaml b/script/install-tensorflow-for-c/meta.yaml similarity index 100% rename from script/install-tensorflow-for-c/_cm.yaml rename to script/install-tensorflow-for-c/meta.yaml diff --git a/script/install-tensorflow-from-src/_cm.yaml b/script/install-tensorflow-from-src/meta.yaml similarity index 100% rename from script/install-tensorflow-from-src/_cm.yaml rename to script/install-tensorflow-from-src/meta.yaml diff --git a/script/install-terraform-from-src/_cm.yaml b/script/install-terraform-from-src/meta.yaml similarity index 100% rename from script/install-terraform-from-src/_cm.yaml rename to script/install-terraform-from-src/meta.yaml diff --git a/script/install-tflite-from-src/_cm.yaml b/script/install-tflite-from-src/meta.yaml similarity index 100% rename from script/install-tflite-from-src/_cm.yaml rename to script/install-tflite-from-src/meta.yaml diff --git a/script/install-torchvision-from-src/_cm.yaml b/script/install-torchvision-from-src/meta.yaml similarity index 100% rename from script/install-torchvision-from-src/_cm.yaml rename to script/install-torchvision-from-src/meta.yaml diff --git a/script/install-tpp-pytorch-extension/_cm.yaml b/script/install-tpp-pytorch-extension/meta.yaml similarity index 100% rename from script/install-tpp-pytorch-extension/_cm.yaml rename to script/install-tpp-pytorch-extension/meta.yaml diff --git a/script/install-transformers-from-src/_cm.yaml b/script/install-transformers-from-src/meta.yaml similarity index 100% rename from script/install-transformers-from-src/_cm.yaml rename to script/install-transformers-from-src/meta.yaml diff --git a/script/plug-prebuilt-cudnn-to-cuda/_cm.yaml b/script/plug-prebuilt-cudnn-to-cuda/meta.yaml similarity index 100% rename from script/plug-prebuilt-cudnn-to-cuda/_cm.yaml rename to script/plug-prebuilt-cudnn-to-cuda/meta.yaml diff --git a/script/plug-prebuilt-cusparselt-to-cuda/_cm.yaml b/script/plug-prebuilt-cusparselt-to-cuda/meta.yaml similarity index 100% rename from script/plug-prebuilt-cusparselt-to-cuda/_cm.yaml rename to script/plug-prebuilt-cusparselt-to-cuda/meta.yaml diff --git a/script/prepare-training-data-bert/_cm.yaml b/script/prepare-training-data-bert/meta.yaml similarity index 100% rename from script/prepare-training-data-bert/_cm.yaml rename to script/prepare-training-data-bert/meta.yaml diff --git a/script/prepare-training-data-resnet/_cm.yaml b/script/prepare-training-data-resnet/meta.yaml similarity index 100% rename from script/prepare-training-data-resnet/_cm.yaml rename to script/prepare-training-data-resnet/meta.yaml diff --git a/script/preprocess-mlperf-inference-submission/_cm.yaml b/script/preprocess-mlperf-inference-submission/meta.yaml similarity index 100% rename from script/preprocess-mlperf-inference-submission/_cm.yaml rename to script/preprocess-mlperf-inference-submission/meta.yaml diff --git a/script/print-any-text/_cm.yaml b/script/print-any-text/meta.yaml similarity index 100% rename from script/print-any-text/_cm.yaml rename to script/print-any-text/meta.yaml diff --git a/script/print-croissant-desc/_cm.yaml b/script/print-croissant-desc/meta.yaml similarity index 100% rename from script/print-croissant-desc/_cm.yaml rename to script/print-croissant-desc/meta.yaml diff --git a/script/print-hello-world-java/_cm.yaml b/script/print-hello-world-java/meta.yaml similarity index 100% rename from script/print-hello-world-java/_cm.yaml rename to script/print-hello-world-java/meta.yaml diff --git a/script/print-hello-world-javac/_cm.yaml b/script/print-hello-world-javac/meta.yaml similarity index 100% rename from script/print-hello-world-javac/_cm.yaml rename to script/print-hello-world-javac/meta.yaml diff --git a/script/print-hello-world-py/_cm.yaml b/script/print-hello-world-py/meta.yaml similarity index 100% rename from script/print-hello-world-py/_cm.yaml rename to script/print-hello-world-py/meta.yaml diff --git a/script/print-hello-world/_cm.yaml b/script/print-hello-world/meta.yaml similarity index 100% rename from script/print-hello-world/_cm.yaml rename to script/print-hello-world/meta.yaml diff --git a/script/print-python-version/_cm.yaml b/script/print-python-version/meta.yaml similarity index 100% rename from script/print-python-version/_cm.yaml rename to script/print-python-version/meta.yaml diff --git a/script/process-mlperf-accuracy/_cm.yaml b/script/process-mlperf-accuracy/meta.yaml similarity index 100% rename from script/process-mlperf-accuracy/_cm.yaml rename to script/process-mlperf-accuracy/meta.yaml diff --git a/script/prune-bert-models/_cm.yaml b/script/prune-bert-models/meta.yaml similarity index 100% rename from script/prune-bert-models/_cm.yaml rename to script/prune-bert-models/meta.yaml diff --git a/script/prune-docker/_cm.yaml b/script/prune-docker/meta.yaml similarity index 100% rename from script/prune-docker/_cm.yaml rename to script/prune-docker/meta.yaml diff --git a/script/publish-results-to-dashboard/_cm.yaml b/script/publish-results-to-dashboard/meta.yaml similarity index 100% rename from script/publish-results-to-dashboard/_cm.yaml rename to script/publish-results-to-dashboard/meta.yaml diff --git a/script/pull-git-repo/_cm.yaml b/script/pull-git-repo/meta.yaml similarity index 100% rename from script/pull-git-repo/_cm.yaml rename to script/pull-git-repo/meta.yaml diff --git a/script/push-csv-to-spreadsheet/_cm.yaml b/script/push-csv-to-spreadsheet/meta.yaml similarity index 100% rename from script/push-csv-to-spreadsheet/_cm.yaml rename to script/push-csv-to-spreadsheet/meta.yaml diff --git a/script/push-mlperf-inference-results-to-github/_cm.yaml b/script/push-mlperf-inference-results-to-github/meta.yaml similarity index 100% rename from script/push-mlperf-inference-results-to-github/_cm.yaml rename to script/push-mlperf-inference-results-to-github/meta.yaml diff --git a/script/remote-run-commands/_cm.yaml b/script/remote-run-commands/meta.yaml similarity index 100% rename from script/remote-run-commands/_cm.yaml rename to script/remote-run-commands/meta.yaml diff --git a/script/reproduce-mlperf-octoml-tinyml-results/_cm.yaml b/script/reproduce-mlperf-octoml-tinyml-results/meta.yaml similarity index 100% rename from script/reproduce-mlperf-octoml-tinyml-results/_cm.yaml rename to script/reproduce-mlperf-octoml-tinyml-results/meta.yaml diff --git a/script/reproduce-mlperf-training-nvidia/_cm.yaml b/script/reproduce-mlperf-training-nvidia/meta.yaml similarity index 100% rename from script/reproduce-mlperf-training-nvidia/_cm.yaml rename to script/reproduce-mlperf-training-nvidia/meta.yaml diff --git a/script/run-all-mlperf-models/_cm.yaml b/script/run-all-mlperf-models/meta.yaml similarity index 100% rename from script/run-all-mlperf-models/_cm.yaml rename to script/run-all-mlperf-models/meta.yaml diff --git a/script/run-docker-container/_cm.yaml b/script/run-docker-container/meta.yaml similarity index 100% rename from script/run-docker-container/_cm.yaml rename to script/run-docker-container/meta.yaml diff --git a/script/run-mlperf-automotive-app/_cm.yaml b/script/run-mlperf-automotive-app/meta.yaml similarity index 100% rename from script/run-mlperf-automotive-app/_cm.yaml rename to script/run-mlperf-automotive-app/meta.yaml diff --git a/script/run-mlperf-inference-app/_cm.yaml b/script/run-mlperf-inference-app/meta.yaml similarity index 100% rename from script/run-mlperf-inference-app/_cm.yaml rename to script/run-mlperf-inference-app/meta.yaml diff --git a/script/run-mlperf-inference-mobilenet-models/_cm.yaml b/script/run-mlperf-inference-mobilenet-models/meta.yaml similarity index 100% rename from script/run-mlperf-inference-mobilenet-models/_cm.yaml rename to script/run-mlperf-inference-mobilenet-models/meta.yaml diff --git a/script/run-mlperf-inference-submission-checker/_cm.yaml b/script/run-mlperf-inference-submission-checker/meta.yaml similarity index 100% rename from script/run-mlperf-inference-submission-checker/_cm.yaml rename to script/run-mlperf-inference-submission-checker/meta.yaml diff --git a/script/run-mlperf-power-client/_cm.yaml b/script/run-mlperf-power-client/meta.yaml similarity index 100% rename from script/run-mlperf-power-client/_cm.yaml rename to script/run-mlperf-power-client/meta.yaml diff --git a/script/run-mlperf-power-server/_cm.yaml b/script/run-mlperf-power-server/meta.yaml similarity index 100% rename from script/run-mlperf-power-server/_cm.yaml rename to script/run-mlperf-power-server/meta.yaml diff --git a/script/run-mlperf-training-submission-checker/_cm.yaml b/script/run-mlperf-training-submission-checker/meta.yaml similarity index 100% rename from script/run-mlperf-training-submission-checker/_cm.yaml rename to script/run-mlperf-training-submission-checker/meta.yaml diff --git a/script/run-python/_cm.yaml b/script/run-python/meta.yaml similarity index 100% rename from script/run-python/_cm.yaml rename to script/run-python/meta.yaml diff --git a/script/run-terraform/_cm.yaml b/script/run-terraform/meta.yaml similarity index 100% rename from script/run-terraform/_cm.yaml rename to script/run-terraform/meta.yaml diff --git a/script/run-vllm-server/_cm.yaml b/script/run-vllm-server/meta.yaml similarity index 100% rename from script/run-vllm-server/_cm.yaml rename to script/run-vllm-server/meta.yaml diff --git a/script/runtime-system-infos/_cm.yaml b/script/runtime-system-infos/meta.yaml similarity index 100% rename from script/runtime-system-infos/_cm.yaml rename to script/runtime-system-infos/meta.yaml diff --git a/script/save-mlperf-inference-implementation-state/_cm.yaml b/script/save-mlperf-inference-implementation-state/meta.yaml similarity index 100% rename from script/save-mlperf-inference-implementation-state/_cm.yaml rename to script/save-mlperf-inference-implementation-state/meta.yaml diff --git a/script/set-device-settings-qaic/_cm.yaml b/script/set-device-settings-qaic/meta.yaml similarity index 100% rename from script/set-device-settings-qaic/_cm.yaml rename to script/set-device-settings-qaic/meta.yaml diff --git a/script/set-echo-off-win/_cm.yaml b/script/set-echo-off-win/meta.yaml similarity index 100% rename from script/set-echo-off-win/_cm.yaml rename to script/set-echo-off-win/meta.yaml diff --git a/script/set-performance-mode/_cm.yaml b/script/set-performance-mode/meta.yaml similarity index 100% rename from script/set-performance-mode/_cm.yaml rename to script/set-performance-mode/meta.yaml diff --git a/script/set-sqlite-dir/_cm.yaml b/script/set-sqlite-dir/meta.yaml similarity index 100% rename from script/set-sqlite-dir/_cm.yaml rename to script/set-sqlite-dir/meta.yaml diff --git a/script/set-user-limits/_cm.yaml b/script/set-user-limits/meta.yaml similarity index 100% rename from script/set-user-limits/_cm.yaml rename to script/set-user-limits/meta.yaml diff --git a/script/set-venv/_cm.yaml b/script/set-venv/meta.yaml similarity index 100% rename from script/set-venv/_cm.yaml rename to script/set-venv/meta.yaml diff --git a/script/submit-mlperf-results/_cm.yaml b/script/submit-mlperf-results/meta.yaml similarity index 100% rename from script/submit-mlperf-results/_cm.yaml rename to script/submit-mlperf-results/meta.yaml diff --git a/script/tar-my-folder/_cm.yaml b/script/tar-my-folder/meta.yaml similarity index 100% rename from script/tar-my-folder/_cm.yaml rename to script/tar-my-folder/meta.yaml diff --git a/script/test-cm-core/_cm.yaml b/script/test-cm-core/meta.yaml similarity index 100% rename from script/test-cm-core/_cm.yaml rename to script/test-cm-core/meta.yaml diff --git a/script/test-cm-script-pipeline/_cm.yaml b/script/test-cm-script-pipeline/meta.yaml similarity index 100% rename from script/test-cm-script-pipeline/_cm.yaml rename to script/test-cm-script-pipeline/meta.yaml diff --git a/script/test-cm-scripts/_cm.yaml b/script/test-cm-scripts/meta.yaml similarity index 100% rename from script/test-cm-scripts/_cm.yaml rename to script/test-cm-scripts/meta.yaml diff --git a/script/test-debug/_cm.yaml b/script/test-debug/meta.yaml similarity index 100% rename from script/test-debug/_cm.yaml rename to script/test-debug/meta.yaml diff --git a/script/test-download-and-extract-artifacts/_cm.yaml b/script/test-download-and-extract-artifacts/meta.yaml similarity index 100% rename from script/test-download-and-extract-artifacts/_cm.yaml rename to script/test-download-and-extract-artifacts/meta.yaml diff --git a/script/test-mlperf-inference-retinanet/_cm.yaml b/script/test-mlperf-inference-retinanet/meta.yaml similarity index 100% rename from script/test-mlperf-inference-retinanet/_cm.yaml rename to script/test-mlperf-inference-retinanet/meta.yaml diff --git a/script/truncate-mlperf-inference-accuracy-log/_cm.yaml b/script/truncate-mlperf-inference-accuracy-log/meta.yaml similarity index 100% rename from script/truncate-mlperf-inference-accuracy-log/_cm.yaml rename to script/truncate-mlperf-inference-accuracy-log/meta.yaml diff --git a/script/upgrade-python-pip/_cm.yaml b/script/upgrade-python-pip/meta.yaml similarity index 100% rename from script/upgrade-python-pip/_cm.yaml rename to script/upgrade-python-pip/meta.yaml diff --git a/script/wrapper-reproduce-octoml-tinyml-submission/_cm.yaml b/script/wrapper-reproduce-octoml-tinyml-submission/meta.yaml similarity index 100% rename from script/wrapper-reproduce-octoml-tinyml-submission/_cm.yaml rename to script/wrapper-reproduce-octoml-tinyml-submission/meta.yaml From de8bc053ae43e64a2828a5c17f2d7632e33575dc Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Wed, 22 Jan 2025 04:52:45 +0530 Subject: [PATCH 43/84] Support meta.json in automations --- automation/cache/{_cm.json => meta.json} | 0 automation/script/{_cm.json => meta.json} | 0 automation/script/module.py | 2 +- 3 files changed, 1 insertion(+), 1 deletion(-) rename automation/cache/{_cm.json => meta.json} (100%) rename automation/script/{_cm.json => meta.json} (100%) diff --git a/automation/cache/_cm.json b/automation/cache/meta.json similarity index 100% rename from automation/cache/_cm.json rename to automation/cache/meta.json diff --git a/automation/script/_cm.json b/automation/script/meta.json similarity index 100% rename from automation/script/_cm.json rename to automation/script/meta.json diff --git a/automation/script/module.py b/automation/script/module.py index 559fffb3a..cee4d0df2 100644 --- a/automation/script/module.py +++ b/automation/script/module.py @@ -599,7 +599,7 @@ def _run(self, i): # and will start searching in the cache ... # We are detecing such cases here: if len(list_of_found_scripts) > 1 and script_tags_string == '' and parsed_script_alias != '' and '?' not in parsed_script_alias and '*' not in parsed_script_alias: - x = 'Ambiguity in the following scripts have the same UID - please change that in _cm.json or _cm.yaml:\n' + x = 'Ambiguity in the following scripts have the same UID - please change that in meta.json or meta.yaml:\n' for y in list_of_found_scripts: x += ' * ' + y.path + '\n' From 44fd1aac29814f2b561bb057b407185c3e6037a1 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Wed, 22 Jan 2025 11:33:09 +0000 Subject: [PATCH 44/84] Update and rename test-cm-script-features.yml to test-mlc-script-features.yml --- .github/workflows/test-cm-script-features.yml | 53 --------------- .../workflows/test-mlc-script-features.yml | 67 +++++++++++++++++++ 2 files changed, 67 insertions(+), 53 deletions(-) delete mode 100644 .github/workflows/test-cm-script-features.yml create mode 100644 .github/workflows/test-mlc-script-features.yml diff --git a/.github/workflows/test-cm-script-features.yml b/.github/workflows/test-cm-script-features.yml deleted file mode 100644 index 728223df1..000000000 --- a/.github/workflows/test-cm-script-features.yml +++ /dev/null @@ -1,53 +0,0 @@ -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions - -name: CM script automation features test - -on: - pull_request: - branches: [ "main", "dev", "mlperf-inference" ] - paths: - - '.github/workflows/test-cm-script-features.yml' - - '**' - - '!**.md' - -jobs: - test_cm_script_features: - - 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: Install cm4mlops on Windows - if: matrix.os == 'windows-latest' - run: | - $env:CM_PULL_DEFAULT_MLOPS_REPO = "no"; pip install cm4mlops - - name: Install dependencies on Unix Platforms - if: matrix.os != 'windows-latest' - run: | - CM_PULL_DEFAULT_MLOPS_REPO=no pip install cm4mlops - - name: Pull MLOps repository - run: | - cm pull repo --url=${{ github.event.pull_request.head.repo.html_url }} --checkout=${{ github.event.pull_request.head.ref }} - cm run script --quiet --tags=get,sys-utils-cm - - name: Run test_docker on linux - if: runner.os == 'linux' - run: | - python script/test-cm-core/src/script/test_docker.py - - name: Test CM Script Features - run: | - python script/test-cm-core/src/script/test_deps.py - python script/test-cm-core/src/script/test_install.py - python script/test-cm-core/src/script/test_features.py diff --git a/.github/workflows/test-mlc-script-features.yml b/.github/workflows/test-mlc-script-features.yml new file mode 100644 index 000000000..92668e50d --- /dev/null +++ b/.github/workflows/test-mlc-script-features.yml @@ -0,0 +1,67 @@ +name: MLC script automation features test + +on: + pull_request: + branches: [ "main", "dev", "mlperf-inference" ] + paths: + - '.github/workflows/test-mlc-script-features.yml' + - '**' + - '!**.md' + +jobs: + test_mlc_script_features: + + 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 --url=${{ github.event.pull_request.head.repo.html_url }} --checkout=${{ github.event.pull_request.head.ref }} + + - name: Test Python venv + run: | + mlc run script --tags=install,python-venv --name=test --quiet + mlc search cache --tags=get,python,virtual,name-test --quiet + + - name: Test variations + run: | + mlc run script --tags=get,dataset,preprocessed,imagenet,_NHWC --quiet + mlc search cache --tags=get,dataset,preprocessed,imagenet,-_NCHW + mlc search cache --tags=get,dataset,preprocessed,imagenet,-_NHWC + + - name: Test versions + run: | + mlc run script --tags=get,generic-python-lib,_package.scipy --version=1.9.3 --quiet + mlc run script --tags=get,generic-python-lib,_package.scipy --version=1.9.2 --quiet + mlc run script --tags=get,generic-python-lib,_package.scipy --version=1.9.3 --quiet --only_execute_from_cache=True + + - name: Test python install from src + run: | + mlc run script --tags=python,src,install,_shared --version=3.9.10 --quiet + mlc search cache --tags=python,src,install,_shared,version-3.9.10 + + - 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_cm_repo=mlcommons@mlperf-automations --image_name=cm-script-app-image-classification-onnx-py --env.CM_DOCKER_RUN_SCRIPT_TAGS=app,image-classification,onnx,python --env.CM_DOCKER_IMAGE_BASE=ubuntu:22.04 --env.CM_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_cm_repo=mlcommons@mlperf-automations --image_name=mlc-script-app-image-classification-onnx-py --env.CM_DOCKER_RUN_SCRIPT_TAGS=app,image-classification,onnx,python --env.CM_DOCKER_IMAGE_BASE=ubuntu:22.04 --env.CM_DOCKER_IMAGE_REPO=local --quiet + From dcfb469f27e9d9975dfd71e2171b1c55b7167c4a Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Wed, 22 Jan 2025 19:49:32 +0530 Subject: [PATCH 45/84] New setup.py for mlperf --- pyproject.toml | 41 +++++++- setup.py | 251 ++++++++++++++----------------------------------- 2 files changed, 110 insertions(+), 182 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index decce5cf7..2bf59dd06 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,2 +1,41 @@ [build-system] -requires = ["setuptools>=60", "wheel", "cmind @ git+https://git@github.com/gateoverflow/cm.git@mlperf-inference#egg=cmind&subdirectory=cm"] +requires = ["setuptools>=61.0", "wheel", "toml", "mlcflow"] +build-backend = "setuptools.build_meta" + +[project] +name = "mlperf" +version = "0.1.3" +description = "Automation scripts for running ML applications using MLC interface" +authors = [ + { name = "MLCommons", email = "systems@mlcommons.org" } +] +license = { file = "LICENSE.md" } +readme = "README.md" +requires-python = ">=3.7" +keywords = ["mlc", "mlcflow", "pypi", "package", "automation", "mlperf", "mlcr"] +classifiers = [ + "Programming Language :: Python :: 3", + "License :: OSI Approved :: Apache Software License", + "Operating System :: OS Independent", +] + +dependencies = [ + "requests", + "pyyaml", + "mlcflow", + "giturlparse" +] + +[project.urls] +Homepage = "https://github.com/mlcommons/mlperf-automations" +Documentation = "https://docs.mlcommons.org/mlperf-automations" +Repository = "https://github.com/mlcommons/mlperf-automations" +Issues = "https://github.com/mlcommons/mlperf-automations/issues" + +[tool.setuptools] +packages = [] +include-package-data = true + +[tool.setuptools.package-data] +"mlcr" = ["README.md", "VERSION"] + diff --git a/setup.py b/setup.py index f7c28fb1e..3c64d974c 100644 --- a/setup.py +++ b/setup.py @@ -1,208 +1,97 @@ -# Build a whl file for mlperf-automations - -from setuptools import setup -from setuptools._distutils.dist import Distribution +from setuptools import setup, find_packages from setuptools.command.install import install import subprocess import sys -import importlib.util -import platform import os -import shutil -# Try to use importlib.metadata for Python 3.8+ try: - if sys.version_info >= (3, 8): - from importlib.metadata import version, PackageNotFoundError - else: - # Fallback to pkg_resources for Python < 3.8 - import pkg_resources - PackageNotFoundError = pkg_resources.DistributionNotFound + import tomllib # For Python 3.11+ except ImportError: - # If importlib.metadata is unavailable, fall back to pkg_resources - import pkg_resources - PackageNotFoundError = pkg_resources.DistributionNotFound + import toml # For older Python versions (requires `pip install toml`) +def get_project_meta(file_path="pyproject.toml"): + """ + Extracts project metadata from the given pyproject.toml file. -class CustomInstallCommand(install): - def run(self): - self.get_sys_platform() - self.install_system_packages() + Args: + file_path (str): Path to the pyproject.toml file. - # Call the standard run method - install.run(self) + Returns: + dict: Dictionary containing the project metadata. + """ + try: + with open(file_path, "rb") as f: + if 'tomllib' in globals(): + project_data = tomllib.load(f) # Use tomllib for Python 3.11+ + else: + project_data = toml.load(f) # Use toml for older versions - # Call the custom function - return self.custom_function() + # Extract metadata under [project] + project_meta = project_data.get("project", {}) + return project_meta - def is_package_installed(self, package_name): - try: - if sys.version_info >= (3, 8): - spec = importlib.util.find_spec(package_name) - module = importlib.util.module_from_spec(spec) - sys.modules[package_name] = module - spec.loader.exec_module(module) - else: - pkg_resources.get_distribution( - package_name) # Fallback for < 3.8 - return True - except PackageNotFoundError: - return False - - def install_system_packages(self): - # List of packages to install via system package manager - packages = [] - - git_status = self.command_exists('git') - if not git_status: - packages.append("git") - wget_status = self.command_exists('wget') - if not wget_status: - packages.append("wget") - curl_status = self.command_exists('curl') - if not curl_status: - packages.append("curl") - - name = 'venv' - - if name in sys.modules: - pass # nothing needed - elif self.is_package_installed(name): - pass - else: - packages.append("python3-venv") - - if packages: - if self.system == 'Linux' or self.system == 'Darwin': - manager, details = self.get_package_manager_details() - if manager: - if manager == "apt-get": - # Check if 'sudo' is available - if shutil.which('sudo'): - subprocess.check_call( - ['sudo', 'apt-get', 'update']) - subprocess.check_call( - ['sudo', 'apt-get', 'install', '-y'] + packages) - else: - print("sudo not found, trying without sudo.") - try: - subprocess.check_call(['apt-get', 'update']) - subprocess.check_call( - ['apt-get', 'install', '-y'] + packages) - except subprocess.CalledProcessError: - print( - f"Installation of {packages} without sudo failed. Please install these packages manually to continue!") - elif self.system == 'Windows': - print( - f"Please install the following packages manually: {packages}") - - def detect_package_manager(self): - package_managers = { - 'apt-get': '/usr/bin/apt-get', - 'yum': '/usr/bin/yum', - 'dnf': '/usr/bin/dnf', - 'pacman': '/usr/bin/pacman', - 'zypper': '/usr/bin/zypper', - 'brew': '/usr/local/bin/brew' - } - - for name, path in package_managers.items(): - if os.path.exists(path): - return name - - return None - - def get_package_manager_details(self): - manager = self.detect_package_manager() - if manager: - try: - version_output = subprocess.check_output( - [manager, '--version'], stderr=subprocess.STDOUT).decode('utf-8') - return manager, version_output.split('\n')[0] - except subprocess.CalledProcessError: - return manager, 'Version information not available' - else: - return None, 'No supported package manager found' - - # Checks if command exists(for installing required packages). - # If the command exists, which returns 0, making the function return True. - # If the command does not exist, which returns a non-zero value, making the function return False. - # NOTE: The standard output and standard error streams are redirected to - # PIPES so that it could be captured in future if needed. - def command_exists(self, command): - if self.system == "Linux" or self.system == 'Darwin': - return subprocess.call( - ['which', command], stdout=subprocess.PIPE, stderr=subprocess.PIPE) == 0 - elif self.system == "Windows": - return subprocess.call( - [command, '--version'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) == 0 - - def custom_function(self): - commit_hash = get_commit_hash() - import cmind - clean_mlops_repo = os.environ.get('CM_MLOPS_CLEAN_REPO', 'false') - if str(clean_mlops_repo).lower() not in ["no", "0", "false", "off"]: - r = cmind.access({'action': 'rm', - 'automation': 'repo', - 'artifact': 'mlcommons@cm4mlops', - 'force': True, - 'all': True}) + except FileNotFoundError: + print(f"Error: {file_path} not found.") + except Exception as e: + print(f"Error reading {file_path}: {e}") + return {} - branch = os.environ.get('CM_MLOPS_REPO_BRANCH', 'dev') - pull_default_mlops_repo = os.environ.get( - 'CM_PULL_DEFAULT_MLOPS_REPO', 'true') - if str(pull_default_mlops_repo).lower() not in [ - "no", "0", "false", "off"]: - r = cmind.access({'action': 'pull', - 'automation': 'repo', - 'artifact': 'mlcommons@mlperf-automations', - 'checkout': commit_hash, - 'branch': branch}) - print(r) - if r['return'] > 0: - return r['return'] - def get_sys_platform(self): - self.system = platform.system() +def check_prerequisites(): + """Check if Git and python-venv are installed on the system.""" + try: + # Check for Git + subprocess.run(["git", "--version"], check=True, stdout=subprocess.DEVNULL) + except FileNotFoundError: + sys.exit("Error: Git is not installed on the system. Please install Git and try again.") + + try: + # Check for python-venv + subprocess.run([sys.executable, "-m", "venv", "--help"], check=True, stdout=subprocess.DEVNULL) + except subprocess.CalledProcessError: + sys.exit("Error: python-venv module is not available. Please install it and try again.") -# Read long description and version +class CustomInstallCommand(install): + """Custom install command to run a custom command after installation.""" + def run(self): + # Run the standard install process + install.run(self) + # Run custom post-install command + try: + print("Running custom post-install command...") + import mlc + branch = os.environ.get('MLC_REPO_BRANCH', 'mlc') -def read_file(file_name, default=""): - if os.path.isfile(file_name): - with open(file_name, "r") as f: - return f.read().strip() - return default + res = mlc.access({'action': 'pull', + 'automation': 'repo', + 'url': 'mlcommons@mlperf-automations', + 'branch': branch}) + print(res) + if res['return'] > 0: + return res['return'] + #subprocess.run(["echo", "Custom command executed!"], check=True) + except Exception as e: + sys.exit(f"Error running post-install command: {e}") -def get_commit_hash(): - try: - with open(os.path.join(os.path.dirname(__file__), 'git_commit_hash.txt'), 'r') as f: - return f.read().strip() - except FileNotFoundError: - return "unknown" +# Check prerequisites before setup +check_prerequisites() -long_description = read_file("README.md", "No description available.") -version_ = read_file("VERSION", "0.3.1") +# Get project metadata from pyproject.toml +project_meta = get_project_meta() setup( - name='cm4mlops', - version=version_, - long_description=long_description, - long_description_content_type='text/markdown', - url="https://github.com/mlcommons/mlperf-automations", - packages=[], - install_requires=[ - "setuptools>=60", - "wheel", - "cmind", - "giturlparse", - "requests", - "tabulate", - "pyyaml" - ], + name=project_meta.get("name", "mlperf"), + version=project_meta.get("version", "0.0.1"), + description=project_meta.get("description", "MLPerf Automations."), + author=", ".join(a.get("name", "") for a in project_meta.get("authors", [])), + author_email=", ".join(a.get("email", "") for a in project_meta.get("authors", [])), + packages=find_packages(), + install_requires=project_meta.get("dependencies", []), + python_requires=project_meta.get("python-requires", ">=3.8"), cmdclass={ 'install': CustomInstallCommand, }, From c73280dd27ded175b7b733572c0852752a69f030 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Thu, 23 Jan 2025 00:01:59 +0530 Subject: [PATCH 46/84] Changes for mlperf pypi package --- pyproject.toml | 5 ++--- setup.py | 12 +++++++++++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 2bf59dd06..133c8d361 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "mlperf" -version = "0.1.3" +version = "0.0.1" description = "Automation scripts for running ML applications using MLC interface" authors = [ { name = "MLCommons", email = "systems@mlcommons.org" } @@ -37,5 +37,4 @@ packages = [] include-package-data = true [tool.setuptools.package-data] -"mlcr" = ["README.md", "VERSION"] - +"mlcr" = ["README.md", "VERSION", "git_commit_hash.txt"] diff --git a/setup.py b/setup.py index 3c64d974c..bb7d0d1b0 100644 --- a/setup.py +++ b/setup.py @@ -61,13 +61,16 @@ def run(self): # Run custom post-install command try: print("Running custom post-install command...") + commit_hash = get_commit_hash() import mlc branch = os.environ.get('MLC_REPO_BRANCH', 'mlc') res = mlc.access({'action': 'pull', 'automation': 'repo', 'url': 'mlcommons@mlperf-automations', - 'branch': branch}) + 'branch': branch, + 'checkout': commit_hash + }) print(res) if res['return'] > 0: return res['return'] @@ -76,6 +79,13 @@ def run(self): except Exception as e: sys.exit(f"Error running post-install command: {e}") +def get_commit_hash(): + try: + with open(os.path.join(os.path.dirname(__file__), 'git_commit_hash.txt'), 'r') as f: + return f.read().strip() + except FileNotFoundError: + return "unknown" + # Check prerequisites before setup check_prerequisites() From 83b0613cde19316271fdd6dcd5011933b1aad479 Mon Sep 17 00:00:00 2001 From: arjunsuresh Date: Wed, 22 Jan 2025 18:32:24 +0000 Subject: [PATCH 47/84] [Automated Commit] Format Codebase --- setup.py | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/setup.py b/setup.py index bb7d0d1b0..bbe7568b1 100644 --- a/setup.py +++ b/setup.py @@ -9,6 +9,7 @@ except ImportError: import toml # For older Python versions (requires `pip install toml`) + def get_project_meta(file_path="pyproject.toml"): """ Extracts project metadata from the given pyproject.toml file. @@ -37,23 +38,28 @@ def get_project_meta(file_path="pyproject.toml"): return {} - def check_prerequisites(): """Check if Git and python-venv are installed on the system.""" try: # Check for Git - subprocess.run(["git", "--version"], check=True, stdout=subprocess.DEVNULL) + subprocess.run(["git", "--version"], check=True, + stdout=subprocess.DEVNULL) except FileNotFoundError: - sys.exit("Error: Git is not installed on the system. Please install Git and try again.") + sys.exit( + "Error: Git is not installed on the system. Please install Git and try again.") try: # Check for python-venv - subprocess.run([sys.executable, "-m", "venv", "--help"], check=True, stdout=subprocess.DEVNULL) + subprocess.run([sys.executable, "-m", "venv", "--help"], + check=True, stdout=subprocess.DEVNULL) except subprocess.CalledProcessError: - sys.exit("Error: python-venv module is not available. Please install it and try again.") + sys.exit( + "Error: python-venv module is not available. Please install it and try again.") + class CustomInstallCommand(install): """Custom install command to run a custom command after installation.""" + def run(self): # Run the standard install process install.run(self) @@ -75,10 +81,11 @@ def run(self): if res['return'] > 0: return res['return'] - #subprocess.run(["echo", "Custom command executed!"], check=True) + # subprocess.run(["echo", "Custom command executed!"], check=True) except Exception as e: sys.exit(f"Error running post-install command: {e}") + def get_commit_hash(): try: with open(os.path.join(os.path.dirname(__file__), 'git_commit_hash.txt'), 'r') as f: @@ -86,6 +93,7 @@ def get_commit_hash(): except FileNotFoundError: return "unknown" + # Check prerequisites before setup check_prerequisites() @@ -97,8 +105,10 @@ def get_commit_hash(): name=project_meta.get("name", "mlperf"), version=project_meta.get("version", "0.0.1"), description=project_meta.get("description", "MLPerf Automations."), - author=", ".join(a.get("name", "") for a in project_meta.get("authors", [])), - author_email=", ".join(a.get("email", "") for a in project_meta.get("authors", [])), + author=", ".join(a.get("name", "") + for a in project_meta.get("authors", [])), + author_email=", ".join(a.get("email", "") + for a in project_meta.get("authors", [])), packages=find_packages(), install_requires=project_meta.get("dependencies", []), python_requires=project_meta.get("python-requires", ">=3.8"), From fea55f9e1e3b5fb680e68beba167e5888ce49716 Mon Sep 17 00:00:00 2001 From: arjunsuresh Date: Wed, 22 Jan 2025 19:02:02 +0000 Subject: [PATCH 48/84] [Automated Commit] Format Codebase --- setup.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 08dec5685..16ff5cc7a 100644 --- a/setup.py +++ b/setup.py @@ -60,7 +60,6 @@ def check_prerequisites(): class CustomInstallCommand(install): """Custom install command to run a custom command after installation.""" - def run(self): # Run the standard install process install.run(self) @@ -86,6 +85,7 @@ def run(self): except Exception as e: sys.exit(f"Error running post-install command: {e}") + def read_file(file_name, default=""): if os.path.isfile(file_name): with open(file_name, "r", encoding="utf-8") as f: @@ -93,7 +93,6 @@ def read_file(file_name, default=""): return default - def get_commit_hash(): try: with open(os.path.join(os.path.dirname(__file__), 'git_commit_hash.txt'), 'r') as f: From 66e78740fb014abbde3d0da34be84a1a9f548d28 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Wed, 22 Jan 2025 19:03:20 +0000 Subject: [PATCH 49/84] Update VERSION --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index ead87ff1c..8acdd82b7 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.6.26 +0.0.1 From 542e58c9c89408b23d6f3e5c3b2654a574e54052 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Wed, 22 Jan 2025 19:13:14 +0000 Subject: [PATCH 50/84] Update test-mlc-script-features.yml --- .github/workflows/test-mlc-script-features.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-mlc-script-features.yml b/.github/workflows/test-mlc-script-features.yml index 92668e50d..33eb70a73 100644 --- a/.github/workflows/test-mlc-script-features.yml +++ b/.github/workflows/test-mlc-script-features.yml @@ -2,7 +2,7 @@ name: MLC script automation features test on: pull_request: - branches: [ "main", "dev", "mlperf-inference" ] + branches: [ "main", "dev" ] paths: - '.github/workflows/test-mlc-script-features.yml' - '**' @@ -31,7 +31,7 @@ jobs: - name: Pull MLOps repository run: | pip install mlcflow - mlc pull repo --url=${{ github.event.pull_request.head.repo.html_url }} --checkout=${{ github.event.pull_request.head.ref }} + mlc pull repo --url=${{ github.event.pull_request.head.repo.html_url }} --branch=${{ github.event.pull_request.head.ref }} - name: Test Python venv run: | From e15eb8217eafcd2f0ba5efe290ef4dd5af7ce7c7 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Wed, 22 Jan 2025 19:15:38 +0000 Subject: [PATCH 51/84] Update test-mlc-script-features.yml --- .github/workflows/test-mlc-script-features.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-mlc-script-features.yml b/.github/workflows/test-mlc-script-features.yml index 33eb70a73..0a939a4f3 100644 --- a/.github/workflows/test-mlc-script-features.yml +++ b/.github/workflows/test-mlc-script-features.yml @@ -31,7 +31,7 @@ jobs: - name: Pull MLOps repository run: | pip install mlcflow - mlc pull repo --url=${{ github.event.pull_request.head.repo.html_url }} --branch=${{ github.event.pull_request.head.ref }} + mlc pull repo ${{ github.event.pull_request.head.repo.html_url }} --branch=${{ github.event.pull_request.head.ref }} - name: Test Python venv run: | From 901267419964bee451f61fd67cd35eeb61b9bae2 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Wed, 22 Jan 2025 20:56:55 +0000 Subject: [PATCH 52/84] Create flow.md --- flow.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 flow.md diff --git a/flow.md b/flow.md new file mode 100644 index 000000000..052d8dc13 --- /dev/null +++ b/flow.md @@ -0,0 +1,9 @@ +# MLC script automation workflow + +```mermaid +flowchart TD + A[MLC interface] --> B{Script Automation} + A[MLC interface] --> C{Cache Automation} + B[Script Automation] --> C{Cache Automation} + B[Script Automation] --> D{MLPerf Scripts} +``` From 223ebcc9dda4d3b06df43df4351cf8b05bbe8a74 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Wed, 22 Jan 2025 20:59:31 +0000 Subject: [PATCH 53/84] Update test-mlperf-inference-resnet50.yml --- .../workflows/test-mlperf-inference-resnet50.yml | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/.github/workflows/test-mlperf-inference-resnet50.yml b/.github/workflows/test-mlperf-inference-resnet50.yml index bdf573899..72d3e3d7e 100644 --- a/.github/workflows/test-mlperf-inference-resnet50.yml +++ b/.github/workflows/test-mlperf-inference-resnet50.yml @@ -40,26 +40,21 @@ jobs: git config --system core.longpaths true - name: Install cm4mlops on Windows - if: matrix.os == 'windows-latest' - run: | - $env:CM_PULL_DEFAULT_MLOPS_REPO = "no"; pip install cm4mlops - - name: Install dependencies on Unix Platforms - if: matrix.os != 'windows-latest' run: | - CM_PULL_DEFAULT_MLOPS_REPO=no pip install cm4mlops + pip install mlcflow - name: Pull MLOps repo run: | - cm pull repo --url=${{ github.event.pull_request.head.repo.html_url }} --checkout=${{ github.event.pull_request.head.ref }} + mlc pull repo ${{ github.event.pull_request.head.repo.html_url }} --branch=${{ github.event.pull_request.head.ref }} - name: Test MLPerf Inference ResNet50 (Windows) if: matrix.os == 'windows-latest' run: | - cm run script --tags=run-mlperf,inference,_submission,_short --submitter="MLCommons" --pull_changes=yes --pull_inference_changes=yes --hw_name=gh_${{ matrix.os }}_x86 --model=resnet50 --adr.loadgen.tags=_from-pip --pip_loadgen=yes --implementation=${{ matrix.implementation }} --backend=${{ matrix.backend }} --device=cpu --scenario=Offline --test_query_count=500 --target_qps=1 -v --quiet + mlcr --tags=run-mlperf,inference,_submission,_short --submitter="MLCommons" --pull_changes=yes --pull_inference_changes=yes --hw_name=gh_${{ matrix.os }}_x86 --model=resnet50 --adr.loadgen.tags=_from-pip --pip_loadgen=yes --implementation=${{ matrix.implementation }} --backend=${{ matrix.backend }} --device=cpu --scenario=Offline --test_query_count=500 --target_qps=1 -v --quiet - name: Test MLPerf Inference ResNet50 (Linux/macOS) if: matrix.os != 'windows-latest' run: | - cm run script --tags=run-mlperf,inference,_submission,_short --submitter="MLCommons" --pull_changes=yes --pull_inference_changes=yes --hw_name=gh_${{ matrix.os }}_x86 --model=resnet50 --implementation=${{ matrix.implementation }} --backend=${{ matrix.backend }} --device=cpu --scenario=Offline --test_query_count=500 --target_qps=1 -v --quiet + mlcr --tags=run-mlperf,inference,_submission,_short --submitter="MLCommons" --pull_changes=yes --pull_inference_changes=yes --hw_name=gh_${{ matrix.os }}_x86 --model=resnet50 --implementation=${{ matrix.implementation }} --backend=${{ matrix.backend }} --device=cpu --scenario=Offline --test_query_count=500 --target_qps=1 -v --quiet - name: Retrieve secrets from Keeper id: ksecrets uses: Keeper-Security/ksm-action@master @@ -74,4 +69,4 @@ jobs: run: | git config --global user.name mlcommons-bot git config --global user.email "mlcommons-bot@users.noreply.github.com" - cm run script --tags=push,github,mlperf,inference,submission --env.CM_GITHUB_PAT=$PAT --repo_url=https://github.com/mlcommons/mlperf_inference_test_submissions_v5.0 --repo_branch=auto-update --commit_message="Results from R50 GH action on ${{ matrix.os }}" --quiet + mlcr --tags=push,github,mlperf,inference,submission --env.CM_GITHUB_PAT=$PAT --repo_url=https://github.com/mlcommons/mlperf_inference_test_submissions_v5.0 --repo_branch=auto-update --commit_message="Results from R50 GH action on ${{ matrix.os }}" --quiet From 4e4da6077aff321460ddcc2516d1520cc0623d19 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Wed, 22 Jan 2025 21:01:16 +0000 Subject: [PATCH 54/84] Update test-mlperf-inference-abtf-poc.yml --- .../workflows/test-mlperf-inference-abtf-poc.yml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test-mlperf-inference-abtf-poc.yml b/.github/workflows/test-mlperf-inference-abtf-poc.yml index 598869814..e2028d8ce 100644 --- a/.github/workflows/test-mlperf-inference-abtf-poc.yml +++ b/.github/workflows/test-mlperf-inference-abtf-poc.yml @@ -51,17 +51,12 @@ jobs: if: matrix.os == 'windows-latest' run: | git config --system core.longpaths true - - name: Install cm4mlops on Windows - if: matrix.os == 'windows-latest' - run: | - $env:CM_PULL_DEFAULT_MLOPS_REPO = "no"; $env:PYTHONUTF8 = "1"; pip install cm4mlops - - name: Install dependencies on Unix Platforms - if: matrix.os != 'windows-latest' + - name: Install mlcflow run: | - CM_PULL_DEFAULT_MLOPS_REPO=no pip install cm4mlops + pip install mlcflow - name: Pull MLOps repository run: | - cm pull repo --url=${{ github.event.pull_request.head.repo.html_url }} --checkout=${{ github.event.pull_request.head.ref }} + mlc pull repo ${{ github.event.pull_request.head.repo.html_url }} --branch=${{ github.event.pull_request.head.ref }} #cm pull repo mlcommons@cm4abtf --branch=poc - name: Install Docker on macos @@ -119,4 +114,4 @@ jobs: - name: Test MLPerf Inference ABTF POC using ${{ matrix.backend }} on ${{ matrix.os }} run: | - cm run script --tags=run-abtf,inference,_poc-demo --test_query_count=2 --adr.cocoeval.version_max=1.5.7 --adr.cocoeval.version_max_usable=1.5.7 --quiet ${{ matrix.extra-args }} ${{ matrix.docker }} -v + mlcr --tags=run-abtf,inference,_poc-demo --test_query_count=2 --adr.cocoeval.version_max=1.5.7 --adr.cocoeval.version_max_usable=1.5.7 --quiet ${{ matrix.extra-args }} ${{ matrix.docker }} -v From 38e681fa5fe1ff9c2e4708d2eebaa16794e5ad4b Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Wed, 22 Jan 2025 21:04:26 +0000 Subject: [PATCH 55/84] Update test-mlperf-inference-abtf-poc.yml --- .github/workflows/test-mlperf-inference-abtf-poc.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test-mlperf-inference-abtf-poc.yml b/.github/workflows/test-mlperf-inference-abtf-poc.yml index e2028d8ce..d9da5830d 100644 --- a/.github/workflows/test-mlperf-inference-abtf-poc.yml +++ b/.github/workflows/test-mlperf-inference-abtf-poc.yml @@ -54,6 +54,7 @@ jobs: - name: Install mlcflow run: | pip install mlcflow + pip install tabulate - name: Pull MLOps repository run: | mlc pull repo ${{ github.event.pull_request.head.repo.html_url }} --branch=${{ github.event.pull_request.head.ref }} From 6aeb5ccec7db372ea1a0564bfe53347ecedba9dd Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Wed, 22 Jan 2025 21:16:53 +0000 Subject: [PATCH 56/84] Update test-mlperf-inference-mlcommons-cpp-resnet50.yml --- ...lperf-inference-mlcommons-cpp-resnet50.yml | 21 +++++++------------ 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/.github/workflows/test-mlperf-inference-mlcommons-cpp-resnet50.yml b/.github/workflows/test-mlperf-inference-mlcommons-cpp-resnet50.yml index 7a700f574..ea18b7dea 100644 --- a/.github/workflows/test-mlperf-inference-mlcommons-cpp-resnet50.yml +++ b/.github/workflows/test-mlperf-inference-mlcommons-cpp-resnet50.yml @@ -32,27 +32,22 @@ jobs: uses: actions/setup-python@v3 with: python-version: ${{ matrix.python-version }} - - name: Install cm4mlops on Windows - if: matrix.os == 'windows-latest' - run: | - $env:CM_PULL_DEFAULT_MLOPS_REPO = "no"; pip install cm4mlops - - name: Install dependencies on Unix Platforms - if: matrix.os != 'windows-latest' + - name: Install mlcflow run: | - CM_PULL_DEFAULT_MLOPS_REPO=no pip install cm4mlops + pip install mlcflow - name: Pull MLOps repository run: | - cm pull repo --url=${{ github.event.pull_request.head.repo.html_url }} --checkout=${{ github.event.pull_request.head.ref }} - cm run script --quiet --tags=get,sys-utils-cm - cm run script --quiet --tags=install,prebuilt,llvm --version=${{ matrix.llvm-version }} + mlc pull repo ${{ github.event.pull_request.head.repo.html_url }} --branch=${{ github.event.pull_request.head.ref }} + mlcr --quiet --tags=get,sys-utils-cm + mlcr --quiet --tags=install,prebuilt,llvm --version=${{ matrix.llvm-version }} - name: Test MLPerf Inference MLCommons C++ ResNet50 on ${{ matrix.os }} if: matrix.os == 'windows-latest' run: | - cm run script --tags=app,mlperf,inference,mlcommons,cpp --submitter="MLCommons" --hw_name=gh_${{ matrix.os }} --adr.loadgen.tags=_from-pip --pip_loadgen=yes -v --quiet + mlcr --tags=app,mlperf,inference,mlcommons,cpp --submitter="MLCommons" --hw_name=gh_${{ matrix.os }} --adr.loadgen.tags=_from-pip --pip_loadgen=yes -v --quiet - name: Test MLPerf Inference MLCommons C++ ResNet50 on ${{ matrix.os }} if: matrix.os != 'windows-latest' run: | - cmr "app mlperf inference mlcommons cpp" --submitter="MLCommons" --hw_name=gh_${{ matrix.os }} -v --quiet + mlcr --tags=app,mlperf,inference,mlcommons,cpp --submitter="MLCommons" --hw_name=gh_${{ matrix.os }} -v --quiet - name: Push Results if: github.repository_owner == 'gateoverflow' env: @@ -66,4 +61,4 @@ jobs: git config --global credential.https://github.com.helper "!gh auth git-credential" git config --global credential.https://gist.github.com.helper "" git config --global credential.https://gist.github.com.helper "!gh auth git-credential" - cm run script --tags=push,github,mlperf,inference,submission --repo_url=https://github.com/mlcommons/mlperf_inference_test_submissions_v5.0 --repo_branch=dev --commit_message="Results from MLCommons C++ ResNet50 GH action on ${{ matrix.os }}" --quiet + mlcr --tags=push,github,mlperf,inference,submission --repo_url=https://github.com/mlcommons/mlperf_inference_test_submissions_v5.0 --repo_branch=dev --commit_message="Results from MLCommons C++ ResNet50 GH action on ${{ matrix.os }}" --quiet From fbc8ba79fb628d909e241861821fca130ed6f1db Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Wed, 22 Jan 2025 21:19:13 +0000 Subject: [PATCH 57/84] Update test-mlperf-inference-bert-deepsparse-tf-onnxruntime-pytorch.yml --- ...bert-deepsparse-tf-onnxruntime-pytorch.yml | 21 +++++++------------ 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/.github/workflows/test-mlperf-inference-bert-deepsparse-tf-onnxruntime-pytorch.yml b/.github/workflows/test-mlperf-inference-bert-deepsparse-tf-onnxruntime-pytorch.yml index 0e6ebe596..5aa3ded17 100644 --- a/.github/workflows/test-mlperf-inference-bert-deepsparse-tf-onnxruntime-pytorch.yml +++ b/.github/workflows/test-mlperf-inference-bert-deepsparse-tf-onnxruntime-pytorch.yml @@ -1,6 +1,3 @@ -# This workflow will install Python dependencies, run tests and lint with a variety of Python versions -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions - name: MLPerf inference bert (deepsparse, tf, onnxruntime, pytorch) on: @@ -35,25 +32,21 @@ jobs: uses: actions/setup-python@v3 with: python-version: ${{ matrix.python-version }} - - name: Install cm4mlops on Windows - if: matrix.os == 'windows-latest' - run: | - $env:CM_PULL_DEFAULT_MLOPS_REPO = "no"; pip install cm4mlops - - name: Install dependencies on Unix Platforms - if: matrix.os != 'windows-latest' + - name: Install mlcflow run: | - CM_PULL_DEFAULT_MLOPS_REPO=no pip install cm4mlops + pip install mlcflow + pip install tabulate - name: Pull MLOps repository run: | - cm pull repo --url=${{ github.event.pull_request.head.repo.html_url }} --checkout=${{ github.event.pull_request.head.ref }} + mlcr ${{ github.event.pull_request.head.repo.html_url }} --branch=${{ github.event.pull_request.head.ref }} - name: Test MLPerf Inference Bert ${{ matrix.backend }} on ${{ matrix.os }} if: matrix.os == 'windows-latest' run: | - cm run script --tags=run,mlperf,inference,generate-run-cmds,_submission,_short --submitter="MLCommons" --hw_name=gh_${{ matrix.os }} --model=bert-99 --backend=${{ matrix.backend }} --device=cpu --scenario=Offline --test_query_count=5 --adr.loadgen.tags=_from-pip --pip_loadgen=yes --precision=${{ matrix.precision }} --target_qps=1 -v --quiet + mlcr --tags=run,mlperf,inference,generate-run-cmds,_submission,_short --submitter="MLCommons" --hw_name=gh_${{ matrix.os }} --model=bert-99 --backend=${{ matrix.backend }} --device=cpu --scenario=Offline --test_query_count=5 --adr.loadgen.tags=_from-pip --pip_loadgen=yes --precision=${{ matrix.precision }} --target_qps=1 -v --quiet - name: Test MLPerf Inference Bert ${{ matrix.backend }} on ${{ matrix.os }} if: matrix.os != 'windows-latest' run: | - cm run script --tags=run,mlperf,inference,generate-run-cmds,_submission,_short --submitter="MLCommons" --hw_name=gh_${{ matrix.os }}_x86 --model=bert-99 --backend=${{ matrix.backend }} --device=cpu --scenario=Offline --test_query_count=5 --precision=${{ matrix.precision }} --target_qps=1 -v --quiet + mlcr --tags=run,mlperf,inference,generate-run-cmds,_submission,_short --submitter="MLCommons" --hw_name=gh_${{ matrix.os }}_x86 --model=bert-99 --backend=${{ matrix.backend }} --device=cpu --scenario=Offline --test_query_count=5 --precision=${{ matrix.precision }} --target_qps=1 -v --quiet - name: Push Results if: github.repository_owner == 'gateoverflow' env: @@ -67,4 +60,4 @@ jobs: git config --global credential.https://github.com.helper "!gh auth git-credential" git config --global credential.https://gist.github.com.helper "" git config --global credential.https://gist.github.com.helper "!gh auth git-credential" - cm run script --tags=push,github,mlperf,inference,submission --repo_url=https://github.com/mlcommons/mlperf_inference_test_submissions_v5.0 --repo_branch=dev --commit_message="Results from Bert GH action on ${{ matrix.os }}" --quiet + mlcr --tags=push,github,mlperf,inference,submission --repo_url=https://github.com/mlcommons/mlperf_inference_test_submissions_v5.0 --repo_branch=dev --commit_message="Results from Bert GH action on ${{ matrix.os }}" --quiet From 9d1736e414c5b85e5f839600a8ac76a9728956fc Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Wed, 22 Jan 2025 21:25:48 +0000 Subject: [PATCH 58/84] Update test-mlperf-inference-retinanet.yml --- .../test-mlperf-inference-retinanet.yml | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test-mlperf-inference-retinanet.yml b/.github/workflows/test-mlperf-inference-retinanet.yml index 182f04321..c4b64d3f3 100644 --- a/.github/workflows/test-mlperf-inference-retinanet.yml +++ b/.github/workflows/test-mlperf-inference-retinanet.yml @@ -3,7 +3,7 @@ name: MLPerf inference retinanet on: - pull_request_target: + pull_request: branches: [ "main", "dev" ] paths: - '.github/workflows/test-mlperf-inference-retinanet.yml' @@ -38,26 +38,22 @@ jobs: if: matrix.os == 'windows-latest' run: | git config --system core.longpaths true - - name: Install cm4mlops on Windows - if: matrix.os == 'windows-latest' - run: | - $env:CM_PULL_DEFAULT_MLOPS_REPO = "no"; pip install cm4mlops - - name: Install dependencies on Unix Platforms - if: matrix.os != 'windows-latest' + - name: Install mlcflow run: | - CM_PULL_DEFAULT_MLOPS_REPO=no pip install cm4mlops + pip install mlcflow + pip install tabulate - name: Pull MLOps repo run: | - cm pull repo --url=${{ github.event.pull_request.head.repo.html_url }} --checkout=${{ github.event.pull_request.head.ref }} + mlc pull repo ${{ github.event.pull_request.head.repo.html_url }} --branch=${{ github.event.pull_request.head.ref }} - name: Test MLPerf Inference Retinanet using ${{ matrix.backend }} on ${{ matrix.os }} if: matrix.os == 'windows-latest' run: | - cm run script --tags=run,mlperf,inference,generate-run-cmds,_submission,_short --submitter="MLCommons" --pull_changes=yes --pull_inference_changes=yes --hw_name=gh_${{ matrix.os }} --model=retinanet --adr.loadgen.tags=_from-pip --pip_loadgen=yes --implementation=${{ matrix.implementation }} --backend=${{ matrix.backend }} --device=cpu --scenario=Offline --test_query_count=5 --quiet -v --target_qps=1 + mlcr --tags=run,mlperf,inference,generate-run-cmds,_submission,_short --submitter="MLCommons" --pull_changes=yes --pull_inference_changes=yes --hw_name=gh_${{ matrix.os }} --model=retinanet --adr.loadgen.tags=_from-pip --pip_loadgen=yes --implementation=${{ matrix.implementation }} --backend=${{ matrix.backend }} --device=cpu --scenario=Offline --test_query_count=5 --quiet -v --target_qps=1 - name: Test MLPerf Inference Retinanet using ${{ matrix.backend }} on ${{ matrix.os }} if: matrix.os != 'windows-latest' run: | - cm run script --tags=run,mlperf,inference,generate-run-cmds,_submission,_short --submitter="MLCommons" --pull_changes=yes --pull_inference_changes=yes --hw_name=gh_${{ matrix.os }}_x86 --model=retinanet --implementation=${{ matrix.implementation }} --backend=${{ matrix.backend }} --device=cpu --scenario=Offline --test_query_count=5 --adr.compiler.tags=gcc --quiet -v --target_qps=1 + mlcr --tags=run,mlperf,inference,generate-run-cmds,_submission,_short --submitter="MLCommons" --pull_changes=yes --pull_inference_changes=yes --hw_name=gh_${{ matrix.os }}_x86 --model=retinanet --implementation=${{ matrix.implementation }} --backend=${{ matrix.backend }} --device=cpu --scenario=Offline --test_query_count=5 --adr.compiler.tags=gcc --quiet -v --target_qps=1 - name: Push Results if: github.repository_owner == 'gateoverflow' env: From 2e83c6a7278c32fb3732b3018507ac6a5d31d724 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Wed, 22 Jan 2025 21:29:14 +0000 Subject: [PATCH 59/84] Update test-image-classification-onnx.yml --- .../test-image-classification-onnx.yml | 23 +++++++------------ 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/.github/workflows/test-image-classification-onnx.yml b/.github/workflows/test-image-classification-onnx.yml index 075de9c76..d0cc00ee4 100644 --- a/.github/workflows/test-image-classification-onnx.yml +++ b/.github/workflows/test-image-classification-onnx.yml @@ -1,11 +1,8 @@ -# This workflow will install Python dependencies, run tests and lint with a variety of Python versions -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions - -name: image classification with ONNX +name: Image classification with ONNX on: pull_request: - branches: [ "main", "dev", "mlperf-inference" ] + branches: [ "main", "dev" ] paths: - '.github/workflows/test-image-classification-onnx.yml' - '**' @@ -30,18 +27,14 @@ jobs: if: matrix.os == 'windows-latest' run: | git config --system core.longpaths true - - name: Install cm4mlops on Windows - if: matrix.os == 'windows-latest' + - name: Install mlcflow run: | - $env:CM_PULL_DEFAULT_MLOPS_REPO = "no"; pip install cm4mlops - - name: Install dependencies on Unix Platforms - if: matrix.os != 'windows-latest' - run: | - CM_PULL_DEFAULT_MLOPS_REPO=no pip install cm4mlops + pip install mlcflow + pip install tabulate + - name: Pull MLOps repository run: | - cm pull repo --url=${{ github.event.pull_request.head.repo.html_url }} --checkout=${{ github.event.pull_request.head.ref }} - cm run script --quiet --tags=get,sys-utils-cm + mlc pull repo ${{ github.event.pull_request.head.repo.html_url }} --branch=${{ github.event.pull_request.head.ref }} - name: Test image classification with ONNX run: | - cm run script --tags=python,app,image-classification,onnx --quiet + mlcr --tags=python,app,image-classification,onnx --quiet From de86105ffff69b9c32547ff34dd76391b57df1ee Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Wed, 22 Jan 2025 21:37:01 +0000 Subject: [PATCH 60/84] Update test-mlperf-inference-retinanet.yml --- .github/workflows/test-mlperf-inference-retinanet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-mlperf-inference-retinanet.yml b/.github/workflows/test-mlperf-inference-retinanet.yml index c4b64d3f3..d101ea14e 100644 --- a/.github/workflows/test-mlperf-inference-retinanet.yml +++ b/.github/workflows/test-mlperf-inference-retinanet.yml @@ -53,7 +53,7 @@ jobs: - name: Test MLPerf Inference Retinanet using ${{ matrix.backend }} on ${{ matrix.os }} if: matrix.os != 'windows-latest' run: | - mlcr --tags=run,mlperf,inference,generate-run-cmds,_submission,_short --submitter="MLCommons" --pull_changes=yes --pull_inference_changes=yes --hw_name=gh_${{ matrix.os }}_x86 --model=retinanet --implementation=${{ matrix.implementation }} --backend=${{ matrix.backend }} --device=cpu --scenario=Offline --test_query_count=5 --adr.compiler.tags=gcc --quiet -v --target_qps=1 + mlcr --tags=run,mlperf,inference,generate-run-cmds,_submission,_short --submitter="MLCommons" --pull_changes=yes --pull_inference_changes=yes --hw_name=gh_${{ matrix.os }}_x86 --model=retinanet --implementation=${{ matrix.implementation }} --backend=${{ matrix.backend }} --device=cpu --scenario=Offline --test_query_count=5 --quiet -v --target_qps=1 - name: Push Results if: github.repository_owner == 'gateoverflow' env: From 0cb7984731028d196f940f82d638d93bd87fa1c1 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Wed, 22 Jan 2025 21:54:23 +0000 Subject: [PATCH 61/84] Update test-mlc-script-features.yml --- .github/workflows/test-mlc-script-features.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/test-mlc-script-features.yml b/.github/workflows/test-mlc-script-features.yml index 0a939a4f3..8ee512bca 100644 --- a/.github/workflows/test-mlc-script-features.yml +++ b/.github/workflows/test-mlc-script-features.yml @@ -45,10 +45,15 @@ jobs: mlc search cache --tags=get,dataset,preprocessed,imagenet,-_NHWC - name: Test versions + continue-on-error: true + if: runner.os == 'linux' run: | mlc run script --tags=get,generic-python-lib,_package.scipy --version=1.9.3 --quiet + test $? -eq 0 || exit $? mlc run script --tags=get,generic-python-lib,_package.scipy --version=1.9.2 --quiet + test $? -eq 0 || exit $? mlc run script --tags=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: | From b35ae5b070aed1f061ac20dc230b1b1491f1ab3b Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Wed, 22 Jan 2025 22:00:25 +0000 Subject: [PATCH 62/84] Update test-mlperf-inference-mlcommons-cpp-resnet50.yml --- .../workflows/test-mlperf-inference-mlcommons-cpp-resnet50.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-mlperf-inference-mlcommons-cpp-resnet50.yml b/.github/workflows/test-mlperf-inference-mlcommons-cpp-resnet50.yml index ea18b7dea..57be88642 100644 --- a/.github/workflows/test-mlperf-inference-mlcommons-cpp-resnet50.yml +++ b/.github/workflows/test-mlperf-inference-mlcommons-cpp-resnet50.yml @@ -4,7 +4,7 @@ name: MLPerf inference MLCommons C++ ResNet50 on: - pull_request_target: + pull_request: branches: [ "main", "dev", "mlperf-inference" ] paths: - '.github/workflows/test-mlperf-inference-mlcommons-cpp-resnet50.yml' From 89a792e6ff5fe5cfdbb60ef32ddffffa7cb180ee Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Wed, 22 Jan 2025 22:00:47 +0000 Subject: [PATCH 63/84] Update test-mlperf-inference-bert-deepsparse-tf-onnxruntime-pytorch.yml --- ...-mlperf-inference-bert-deepsparse-tf-onnxruntime-pytorch.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-mlperf-inference-bert-deepsparse-tf-onnxruntime-pytorch.yml b/.github/workflows/test-mlperf-inference-bert-deepsparse-tf-onnxruntime-pytorch.yml index 5aa3ded17..8f47a4e61 100644 --- a/.github/workflows/test-mlperf-inference-bert-deepsparse-tf-onnxruntime-pytorch.yml +++ b/.github/workflows/test-mlperf-inference-bert-deepsparse-tf-onnxruntime-pytorch.yml @@ -1,7 +1,7 @@ name: MLPerf inference bert (deepsparse, tf, onnxruntime, pytorch) on: - pull_request_target: + pull_request: branches: [ "main", "dev", "mlperf-inference" ] paths: - '.github/workflows/test-mlperf-inference-bert-deepsparse-tf-onnxruntime-pytorch.yml' From 2291f4232dd2bb010bd878a6cb85cf2832629e3e Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Wed, 22 Jan 2025 22:02:32 +0000 Subject: [PATCH 64/84] Update test-mlperf-inference-rgat.yml --- .../workflows/test-mlperf-inference-rgat.yml | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test-mlperf-inference-rgat.yml b/.github/workflows/test-mlperf-inference-rgat.yml index 5511151eb..dc2a7eb5c 100644 --- a/.github/workflows/test-mlperf-inference-rgat.yml +++ b/.github/workflows/test-mlperf-inference-rgat.yml @@ -1,4 +1,4 @@ -name: MLPerf inference rgat +name: MLPerf inference R-GAT on: pull_request: @@ -25,20 +25,16 @@ jobs: uses: actions/setup-python@v3 with: python-version: ${{ matrix.python-version }} - - name: Install cm4mlops on Windows - if: matrix.os == 'windows-latest' + - name: Install mlcflow run: | - $env:CM_PULL_DEFAULT_MLOPS_REPO = "no"; pip install cm4mlops - - name: Install dependencies on Unix Platforms - if: matrix.os != 'windows-latest' - run: | - CM_PULL_DEFAULT_MLOPS_REPO=no pip install cm4mlops + pip install mlcflow + pip install tabulate - name: Pull MLOps repository run: | - cm pull repo --url=${{ github.event.pull_request.head.repo.html_url }} --checkout=${{ github.event.pull_request.head.ref }} + mlc pull repo ${{ github.event.pull_request.head.repo.html_url }} --branch=${{ github.event.pull_request.head.ref }} - name: Test MLPerf Inference R-GAT using ${{ matrix.backend }} on ${{ matrix.os }} run: | - cm run script --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 + 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: @@ -52,4 +48,4 @@ jobs: git config --global credential.https://github.com.helper "!gh auth git-credential" git config --global credential.https://gist.github.com.helper "" git config --global credential.https://gist.github.com.helper "!gh auth git-credential" - cm run script --tags=push,github,mlperf,inference,submission --repo_url=https://github.com/mlcommons/mlperf_inference_test_submissions_v5.0 --repo_branch=auto-update --commit_message="Results from R-GAT GH action on ${{ matrix.os }}" --quiet + mlcr --tags=push,github,mlperf,inference,submission --repo_url=https://github.com/mlcommons/mlperf_inference_test_submissions_v5.0 --repo_branch=auto-update --commit_message="Results from R-GAT GH action on ${{ matrix.os }}" --quiet From e469aa36f7450f565d1e4efab5a9fe158562c8f3 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Wed, 22 Jan 2025 22:03:14 +0000 Subject: [PATCH 65/84] Update test-mlperf-inference-resnet50.yml --- .github/workflows/test-mlperf-inference-resnet50.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-mlperf-inference-resnet50.yml b/.github/workflows/test-mlperf-inference-resnet50.yml index 72d3e3d7e..3e8863f66 100644 --- a/.github/workflows/test-mlperf-inference-resnet50.yml +++ b/.github/workflows/test-mlperf-inference-resnet50.yml @@ -3,7 +3,7 @@ name: MLPerf inference ResNet50 on: - pull_request_target: + pull_request: branches: [ "main", "dev" ] paths: - '.github/workflows/test-mlperf-inference-resnet50.yml' @@ -39,9 +39,10 @@ jobs: run: | git config --system core.longpaths true - - name: Install cm4mlops on Windows + - name: Install mlcflow run: | pip install mlcflow + pip install tabulate - name: Pull MLOps repo run: | From 29b83143853a2d09735015d9d91658792c39b5ee Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Wed, 22 Jan 2025 22:07:34 +0000 Subject: [PATCH 66/84] Update test-mlperf-loadgen-onnx-huggingface-bert-fp32-squad.yml --- ...rf-loadgen-onnx-huggingface-bert-fp32-squad.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test-mlperf-loadgen-onnx-huggingface-bert-fp32-squad.yml b/.github/workflows/test-mlperf-loadgen-onnx-huggingface-bert-fp32-squad.yml index 0055a1c31..2db924000 100644 --- a/.github/workflows/test-mlperf-loadgen-onnx-huggingface-bert-fp32-squad.yml +++ b/.github/workflows/test-mlperf-loadgen-onnx-huggingface-bert-fp32-squad.yml @@ -1,11 +1,8 @@ -# This workflow will install Python dependencies, run tests and lint with a variety of Python versions -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions - name: MLPerf loadgen with HuggingFace bert onnx fp32 squad model on: pull_request: - branches: [ "main", "dev", "mlperf-inference" ] + branches: [ "main", "dev" ] paths: - '.github/workflows/test-mlperf-loadgen-onnx-huggingface-bert-fp32-squad.yml' - '**' @@ -26,12 +23,13 @@ jobs: uses: actions/setup-python@v3 with: python-version: ${{ matrix.python-version }} - - name: Install dependencies on Unix Platforms + - name: Install dependencies run: | - CM_PULL_DEFAULT_MLOPS_REPO=no pip install cm4mlops + pip install mlcflow + pip install tabulate - name: Pull MLOps repository run: | - cm pull repo --url=${{ github.event.pull_request.head.repo.html_url }} --checkout=${{ github.event.pull_request.head.ref }} + mlcr ${{ github.event.pull_request.head.repo.html_url }} --branch=${{ github.event.pull_request.head.ref }} - name: Test MLPerf loadgen with HuggingFace bert onnx fp32 squad model run: | - cm run script --tags=python,app,loadgen-generic,_onnxruntime,_custom,_huggingface,_model-stub.ctuning/mlperf-inference-bert-onnx-fp32-squad-v1.1 --quiet + mlcr --tags=python,app,loadgen-generic,_onnxruntime,_custom,_huggingface,_model-stub.ctuning/mlperf-inference-bert-onnx-fp32-squad-v1.1 --quiet From bc4359c91b8931c6778bc77362607ae37ff3f5ff Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Wed, 22 Jan 2025 22:08:57 +0000 Subject: [PATCH 67/84] Update test-mlperf-loadgen-onnx-huggingface-bert-fp32-squad.yml --- .../test-mlperf-loadgen-onnx-huggingface-bert-fp32-squad.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-mlperf-loadgen-onnx-huggingface-bert-fp32-squad.yml b/.github/workflows/test-mlperf-loadgen-onnx-huggingface-bert-fp32-squad.yml index 2db924000..ce579c8bd 100644 --- a/.github/workflows/test-mlperf-loadgen-onnx-huggingface-bert-fp32-squad.yml +++ b/.github/workflows/test-mlperf-loadgen-onnx-huggingface-bert-fp32-squad.yml @@ -29,7 +29,7 @@ jobs: pip install tabulate - name: Pull MLOps repository run: | - mlcr ${{ github.event.pull_request.head.repo.html_url }} --branch=${{ github.event.pull_request.head.ref }} + mlc pull repo ${{ github.event.pull_request.head.repo.html_url }} --branch=${{ github.event.pull_request.head.ref }} - name: Test MLPerf loadgen with HuggingFace bert onnx fp32 squad model run: | mlcr --tags=python,app,loadgen-generic,_onnxruntime,_custom,_huggingface,_model-stub.ctuning/mlperf-inference-bert-onnx-fp32-squad-v1.1 --quiet From fdeeb6eba34a8fdb5a02496b5e6bef8c4b2214aa Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Thu, 23 Jan 2025 03:53:50 +0530 Subject: [PATCH 68/84] Fix get-cognata for mlc --- script/get-dataset-cognata-mlcommons/customize.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/script/get-dataset-cognata-mlcommons/customize.py b/script/get-dataset-cognata-mlcommons/customize.py index 94caa3ac2..56856d75f 100644 --- a/script/get-dataset-cognata-mlcommons/customize.py +++ b/script/get-dataset-cognata-mlcommons/customize.py @@ -2,14 +2,13 @@ import os import json - def preprocess(i): env = i['env'] cm_cache_dataset_path = env.get( 'CM_CUSTOM_CACHE_ENTRY_DATASET_MLCOMMONS_COGNATA_PATH', '').strip() - cfg = utils.safe_load_json(cm_cache_dataset_path, 'cfg.json')['meta'] + cfg = utils.load_json(os.path.join(cm_cache_dataset_path, 'cfg.json'))['meta'] if cfg.get('imported', False): env['CM_DATASET_MLCOMMONS_COGNATA_IMPORTED'] = 'yes' @@ -56,7 +55,7 @@ def postprocess(i): env = i['env'] automation = i['automation'] - cm = automation.action_object + mlc = automation.action_object cur_dir = os.getcwd() @@ -78,7 +77,7 @@ def postprocess(i): cm_cache_dataset_cfg_file = os.path.join(cm_cache_dataset_path, 'cfg.json') env['CM_DATASET_MLCOMMONS_COGNATA_CFG_FILE'] = cm_cache_dataset_cfg_file - cfg = utils.safe_load_json('', cm_cache_dataset_cfg_file)['meta'] + cfg = utils.load_json(cm_cache_dataset_cfg_file)['meta'] dataset_path = cfg.get('real_path', '') dataset_path_requested = env.get('CM_DATASET_MLCOMMONS_COGNATA_PATH', '') @@ -172,7 +171,7 @@ def postprocess(i): return { 'return': 1, 'error': 'can\'t parse URL for export: {}'.format(first_url)} - r = cm.access({'action': 'run', + r = mlc.access({'action': 'run', 'automation': 'script', 'tags': 'download,file,_wget', 'verify': 'no', @@ -248,7 +247,7 @@ def postprocess(i): print('') print('Downloading {} ...'.format(url_export)) - r = cm.access({'action': 'run', + r = mlc.access({'action': 'run', 'automation': 'script', 'tags': 'download,file,_wget', 'verify': 'no', From 8adf7592b85860b877025055951c544135ef52fc Mon Sep 17 00:00:00 2001 From: arjunsuresh Date: Wed, 22 Jan 2025 22:24:17 +0000 Subject: [PATCH 69/84] [Automated Commit] Format Codebase --- .../customize.py | 26 +++++++++++-------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/script/get-dataset-cognata-mlcommons/customize.py b/script/get-dataset-cognata-mlcommons/customize.py index 56856d75f..2edded28d 100644 --- a/script/get-dataset-cognata-mlcommons/customize.py +++ b/script/get-dataset-cognata-mlcommons/customize.py @@ -2,13 +2,17 @@ import os import json + def preprocess(i): env = i['env'] cm_cache_dataset_path = env.get( 'CM_CUSTOM_CACHE_ENTRY_DATASET_MLCOMMONS_COGNATA_PATH', '').strip() - cfg = utils.load_json(os.path.join(cm_cache_dataset_path, 'cfg.json'))['meta'] + cfg = utils.load_json( + os.path.join( + cm_cache_dataset_path, + 'cfg.json'))['meta'] if cfg.get('imported', False): env['CM_DATASET_MLCOMMONS_COGNATA_IMPORTED'] = 'yes' @@ -173,11 +177,11 @@ def postprocess(i): r = mlc.access({'action': 'run', 'automation': 'script', - 'tags': 'download,file,_wget', - 'verify': 'no', - 'url': first_url_export, - 'output_file': file_first_xlsx, - 'store': dataset_path1}) + 'tags': 'download,file,_wget', + 'verify': 'no', + 'url': first_url_export, + 'output_file': file_first_xlsx, + 'store': dataset_path1}) if r['return'] > 0: return r @@ -249,11 +253,11 @@ def postprocess(i): r = mlc.access({'action': 'run', 'automation': 'script', - 'tags': 'download,file,_wget', - 'verify': 'no', - 'url': url_export, - 'output_file': serial_file, - 'store': dataset_path1}) + 'tags': 'download,file,_wget', + 'verify': 'no', + 'url': url_export, + 'output_file': serial_file, + 'store': dataset_path1}) if r['return'] > 0: return r From 1df5a319cb94dc684fac3ebf63fecc970b498612 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Thu, 23 Jan 2025 04:07:01 +0530 Subject: [PATCH 70/84] Fixes for github actions --- ... test-mlc-based-submission-generation.yml} | 21 +++++++------------ .../workflows/test-mlperf-inference-tvm.yml | 3 --- 2 files changed, 7 insertions(+), 17 deletions(-) rename .github/workflows/{test-cm-based-submission-generation.yml => test-mlc-based-submission-generation.yml} (80%) diff --git a/.github/workflows/test-cm-based-submission-generation.yml b/.github/workflows/test-mlc-based-submission-generation.yml similarity index 80% rename from .github/workflows/test-cm-based-submission-generation.yml rename to .github/workflows/test-mlc-based-submission-generation.yml index 8ac9d3814..c409e955f 100644 --- a/.github/workflows/test-cm-based-submission-generation.yml +++ b/.github/workflows/test-mlc-based-submission-generation.yml @@ -1,12 +1,10 @@ -# This workflow will test the submission generation capability of CM f - -name: CM based Submission Generation +name: MLC based Submission Generation on: pull_request: - branches: [ "main", "dev", "mlperf-inference" ] + branches: [ "main", "dev" ] paths: - - '.github/workflows/test-cm-based-submission-generation.yml' + - '.github/workflows/test-mlc-based-submission-generation.yml' - '**' - '!**.md' jobs: @@ -48,17 +46,12 @@ jobs: uses: actions/setup-python@v3 with: python-version: ${{ matrix.python-version }} - - name: Install cm4mlops on Windows - if: matrix.os == 'windows-latest' - run: | - $env:CM_PULL_DEFAULT_MLOPS_REPO = "no"; pip install cm4mlops - - name: Install dependencies on Unix Platforms - if: matrix.os != 'windows-latest' + - name: Install mlcflow run: | - CM_PULL_DEFAULT_MLOPS_REPO=no pip install cm4mlops + pip install mlcflow - name: Pull MLOps repository run: | - cm pull repo --url=${{ github.event.pull_request.head.repo.html_url }} --checkout=${{ github.event.pull_request.head.ref }} + mlc pull repo ${{ github.event.pull_request.head.repo.html_url }} --branch=${{ github.event.pull_request.head.ref }} - name: Pull repo where test cases are uploaded run: | git clone -b submission-generation-tests https://github.com/mlcommons/inference.git submission_generation_tests @@ -88,7 +81,7 @@ jobs: fi # Dynamically set the log group to simulate a dynamic step name echo "::group::$description" - cm ${{ matrix.action }} script --tags=generate,inference,submission --version=v4.1 --clean --preprocess_submission=yes --results_dir=$PWD/submission_generation_tests/${{ matrix.case }}/ --run-checker --submitter=MLCommons --tar=yes --env.CM_TAR_OUTFILE=submission.tar.gz --division=${{ matrix.division }} --env.CM_DETERMINE_MEMORY_CONFIGURATION=yes --quiet $extra_run_args + mlc ${{ matrix.action }} script --tags=generate,inference,submission --version=v4.1 --clean --preprocess_submission=yes --results_dir=$PWD/submission_generation_tests/${{ matrix.case }}/ --run-checker --submitter=MLCommons --tar=yes --env.CM_TAR_OUTFILE=submission.tar.gz --division=${{ matrix.division }} --env.CM_DETERMINE_MEMORY_CONFIGURATION=yes --quiet $extra_run_args exit_status=$? echo "Exit status for the job ${description} ${exit_status}" if [[ "${{ matrix.case }}" == "case-5" || "${{ matrix.case }}" == "case-6" ]]; then diff --git a/.github/workflows/test-mlperf-inference-tvm.yml b/.github/workflows/test-mlperf-inference-tvm.yml index 359b5be72..fa363d65c 100644 --- a/.github/workflows/test-mlperf-inference-tvm.yml +++ b/.github/workflows/test-mlperf-inference-tvm.yml @@ -1,6 +1,3 @@ -# This workflow will install Python dependencies, run tests and lint with a variety of Python versions -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions - # We are doing similar test on our tvm tutorial test. So, this test is not necessary name: MLPerf inference resnet50 using TVM. From b563973e5032b14d10f84184cf5e6ae677e1c2a7 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Thu, 23 Jan 2025 04:16:20 +0530 Subject: [PATCH 71/84] Fixes to get-cognata for mlc --- ...-inference-bert-deepsparse-tf-onnxruntime-pytorch.yml | 4 ++-- script/get-dataset-cognata-mlcommons/customize.py | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test-mlperf-inference-bert-deepsparse-tf-onnxruntime-pytorch.yml b/.github/workflows/test-mlperf-inference-bert-deepsparse-tf-onnxruntime-pytorch.yml index 8f47a4e61..120b17a7a 100644 --- a/.github/workflows/test-mlperf-inference-bert-deepsparse-tf-onnxruntime-pytorch.yml +++ b/.github/workflows/test-mlperf-inference-bert-deepsparse-tf-onnxruntime-pytorch.yml @@ -2,7 +2,7 @@ name: MLPerf inference bert (deepsparse, tf, onnxruntime, pytorch) on: pull_request: - branches: [ "main", "dev", "mlperf-inference" ] + branches: [ "main", "dev" ] paths: - '.github/workflows/test-mlperf-inference-bert-deepsparse-tf-onnxruntime-pytorch.yml' - '**' @@ -38,7 +38,7 @@ jobs: pip install tabulate - name: Pull MLOps repository run: | - mlcr ${{ github.event.pull_request.head.repo.html_url }} --branch=${{ github.event.pull_request.head.ref }} + mlc pull repo ${{ github.event.pull_request.head.repo.html_url }} --branch=${{ github.event.pull_request.head.ref }} - name: Test MLPerf Inference Bert ${{ matrix.backend }} on ${{ matrix.os }} if: matrix.os == 'windows-latest' run: | diff --git a/script/get-dataset-cognata-mlcommons/customize.py b/script/get-dataset-cognata-mlcommons/customize.py index 2edded28d..8c2338fb4 100644 --- a/script/get-dataset-cognata-mlcommons/customize.py +++ b/script/get-dataset-cognata-mlcommons/customize.py @@ -9,10 +9,12 @@ def preprocess(i): cm_cache_dataset_path = env.get( 'CM_CUSTOM_CACHE_ENTRY_DATASET_MLCOMMONS_COGNATA_PATH', '').strip() - cfg = utils.load_json( + + res = utils.load_json( os.path.join( cm_cache_dataset_path, - 'cfg.json'))['meta'] + 'cfg.json')) + cfg = res.get('meta', {}) if cfg.get('imported', False): env['CM_DATASET_MLCOMMONS_COGNATA_IMPORTED'] = 'yes' @@ -81,7 +83,8 @@ def postprocess(i): cm_cache_dataset_cfg_file = os.path.join(cm_cache_dataset_path, 'cfg.json') env['CM_DATASET_MLCOMMONS_COGNATA_CFG_FILE'] = cm_cache_dataset_cfg_file - cfg = utils.load_json(cm_cache_dataset_cfg_file)['meta'] + res = utils.load_json(cm_cache_dataset_cfg_file) + cfg = res.get('meta', {}) dataset_path = cfg.get('real_path', '') dataset_path_requested = env.get('CM_DATASET_MLCOMMONS_COGNATA_PATH', '') From 58f6fff7d7047bd67621bdcc84da8f5f180344d7 Mon Sep 17 00:00:00 2001 From: arjunsuresh Date: Wed, 22 Jan 2025 22:46:47 +0000 Subject: [PATCH 72/84] [Automated Commit] Format Codebase --- script/get-dataset-cognata-mlcommons/customize.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/get-dataset-cognata-mlcommons/customize.py b/script/get-dataset-cognata-mlcommons/customize.py index 8c2338fb4..471a44cbc 100644 --- a/script/get-dataset-cognata-mlcommons/customize.py +++ b/script/get-dataset-cognata-mlcommons/customize.py @@ -9,7 +9,7 @@ def preprocess(i): cm_cache_dataset_path = env.get( 'CM_CUSTOM_CACHE_ENTRY_DATASET_MLCOMMONS_COGNATA_PATH', '').strip() - + res = utils.load_json( os.path.join( cm_cache_dataset_path, From 1ca44531820b41b2187d8b9e804979268e698d68 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Thu, 23 Jan 2025 04:20:12 +0530 Subject: [PATCH 73/84] Fix scc24 github action --- .github/workflows/test-scc24-sdxl.yaml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test-scc24-sdxl.yaml b/.github/workflows/test-scc24-sdxl.yaml index 65e2e7510..50849e7b1 100644 --- a/.github/workflows/test-scc24-sdxl.yaml +++ b/.github/workflows/test-scc24-sdxl.yaml @@ -25,13 +25,13 @@ jobs: python3 -m venv gh_action source gh_action/bin/activate export CM_REPOS=$HOME/GH_CM - pip install --upgrade cm4mlops + pip install --upgrade mlcflow pip install tabulate - cm pull repo - cm run script --tags=run-mlperf,inference,_find-performance,_r4.1-dev,_short,_scc24-base --pull_changes=yes --pull_inference_changes=yes --model=sdxl --implementation=reference --backend=${{ matrix.backend }} --category=datacenter --scenario=Offline --execution_mode=test --device=${{ matrix.device }} --precision=${{ matrix.precision }} --docker --docker_it=no --docker_cm_repo=$CM_DOCKER_REPO --docker_cm_repo_branch=$CM_DOCKER_REPO_BRANCH --docker_dt=yes --quiet --results_dir=$HOME/scc_gh_action_results --submission_dir=$HOME/scc_gh_action_submissions --env.CM_MLPERF_MODEL_SDXL_DOWNLOAD_TO_HOST=yes --clean - cm run script --tags=run-mlperf,inference,_r4.1-dev,_short,_scc24-base --model=sdxl --implementation=reference --backend=${{ matrix.backend }} --category=datacenter --scenario=Offline --execution_mode=test --device=${{ matrix.device }} --precision=${{ matrix.precision }} --docker --docker_it=no --docker_cm_repo=$CM_DOCKER_REPO --docker_cm_repo_branch=$CM_DOCKER_REPO_BRANCH --docker_dt=yes --quiet --results_dir=$HOME/scc_gh_action_results --submission_dir=$HOME/scc_gh_action_submissions --env.CM_MLPERF_MODEL_SDXL_DOWNLOAD_TO_HOST=yes --clean - cm run script --tags=generate,inference,submission --clean --run-checker --tar=yes --env.CM_TAR_OUTFILE=submission.tar.gz --division=open --category=datacenter --run_style=test --adr.submission-checker.tags=_short-run --quiet --submitter=MLCommons --submission_dir=$HOME/scc_gh_action_submissions --results_dir=$HOME/scc_gh_action_results/test_results - cm run script --tags=push,github,mlperf,inference,submission --repo_url=https://github.com/gateoverflow/cm4mlperf-inference --repo_branch=mlperf-inference-results-scc24 --commit_message="Results from self hosted Github actions - NVIDIARTX4090" --quiet --submission_dir=$HOME/scc_gh_action_submissions + mlc pull repo + mlcr --tags=run-mlperf,inference,_find-performance,_r4.1-dev,_short,_scc24-base --pull_changes=yes --pull_inference_changes=yes --model=sdxl --implementation=reference --backend=${{ matrix.backend }} --category=datacenter --scenario=Offline --execution_mode=test --device=${{ matrix.device }} --precision=${{ matrix.precision }} --docker --docker_it=no --docker_cm_repo=$CM_DOCKER_REPO --docker_cm_repo_branch=$CM_DOCKER_REPO_BRANCH --docker_dt=yes --quiet --results_dir=$HOME/scc_gh_action_results --submission_dir=$HOME/scc_gh_action_submissions --env.CM_MLPERF_MODEL_SDXL_DOWNLOAD_TO_HOST=yes --clean + mlcr --tags=run-mlperf,inference,_r4.1-dev,_short,_scc24-base --model=sdxl --implementation=reference --backend=${{ matrix.backend }} --category=datacenter --scenario=Offline --execution_mode=test --device=${{ matrix.device }} --precision=${{ matrix.precision }} --docker --docker_it=no --docker_cm_repo=$CM_DOCKER_REPO --docker_cm_repo_branch=$CM_DOCKER_REPO_BRANCH --docker_dt=yes --quiet --results_dir=$HOME/scc_gh_action_results --submission_dir=$HOME/scc_gh_action_submissions --env.CM_MLPERF_MODEL_SDXL_DOWNLOAD_TO_HOST=yes --clean + mlcr --tags=generate,inference,submission --clean --run-checker --tar=yes --env.CM_TAR_OUTFILE=submission.tar.gz --division=open --category=datacenter --run_style=test --adr.submission-checker.tags=_short-run --quiet --submitter=MLCommons --submission_dir=$HOME/scc_gh_action_submissions --results_dir=$HOME/scc_gh_action_results/test_results + mlcr --tags=push,github,mlperf,inference,submission --repo_url=https://github.com/gateoverflow/cm4mlperf-inference --repo_branch=mlperf-inference-results-scc24 --commit_message="Results from self hosted Github actions - NVIDIARTX4090" --quiet --submission_dir=$HOME/scc_gh_action_submissions build_nvidia: if: github.repository_owner == 'gateoverflow' @@ -53,10 +53,10 @@ jobs: python3 -m venv gh_action source gh_action/bin/activate export CM_REPOS=$HOME/GH_CM - pip install --upgrade cm4mlops + pip install --upgrade mlcflow pip install tabulate - cm pull repo - cm run script --tags=run-mlperf,inference,_find-performance,_r4.1-dev,_short,_scc24-base --pull_changes=yes --model=sdxl --implementation=nvidia --backend=${{ matrix.backend }} --category=datacenter --scenario=Offline --execution_mode=test --device=${{ matrix.device }} --precision=${{ matrix.precision }} --docker --docker_it=no --docker_cm_repo=$CM_DOCKER_REPO --docker_cm_repo_branch=$CM_DOCKER_REPO_BRANCH --docker_dt=yes --pull_changes --quiet --results_dir=$HOME/scc_gh_action_results --submission_dir=$HOME/scc_gh_action_submissions --env.CM_MLPERF_MODEL_SDXL_DOWNLOAD_TO_HOST=yes --hw_name=go-spr --custom_system_nvidia=yes --clean - cm run script --tags=run-mlperf,inference,_r4.1-dev,_short,_scc24-base --model=sdxl --implementation=nvidia --backend=${{ matrix.backend }} --category=datacenter --scenario=Offline --execution_mode=test --device=${{ matrix.device }} --precision=${{ matrix.precision }} --docker --docker_it=no --docker_cm_repo=$CM_DOCKER_REPO --docker_cm_repo_branch=$CM_DOCKER_REPO_BRANCH --docker_dt=yes --quiet --results_dir=$HOME/scc_gh_action_results --submission_dir=$HOME/scc_gh_action_submissions --env.CM_MLPERF_MODEL_SDXL_DOWNLOAD_TO_HOST=yes --clean - cm run script --tags=generate,inference,submission --clean --run-checker --tar=yes --env.CM_TAR_OUTFILE=submission.tar.gz --division=open --category=datacenter --run_style=test --adr.submission-checker.tags=_short-run --quiet --submitter=MLCommons --submission_dir=$HOME/scc_gh_action_submissions --results_dir=$HOME/scc_gh_action_results/test_results - cm run script --tags=push,github,mlperf,inference,submission --repo_url=https://github.com/gateoverflow/cm4mlperf-inference --repo_branch=mlperf-inference-results-scc24 --commit_message="Results from self hosted Github actions - NVIDIARTX4090" --quiet --submission_dir=$HOME/scc_gh_action_submissions + mlc pull repo + mlcr --tags=run-mlperf,inference,_find-performance,_r4.1-dev,_short,_scc24-base --pull_changes=yes --model=sdxl --implementation=nvidia --backend=${{ matrix.backend }} --category=datacenter --scenario=Offline --execution_mode=test --device=${{ matrix.device }} --precision=${{ matrix.precision }} --docker --docker_it=no --docker_cm_repo=$CM_DOCKER_REPO --docker_cm_repo_branch=$CM_DOCKER_REPO_BRANCH --docker_dt=yes --pull_changes --quiet --results_dir=$HOME/scc_gh_action_results --submission_dir=$HOME/scc_gh_action_submissions --env.CM_MLPERF_MODEL_SDXL_DOWNLOAD_TO_HOST=yes --hw_name=go-spr --custom_system_nvidia=yes --clean + mlcr --tags=run-mlperf,inference,_r4.1-dev,_short,_scc24-base --model=sdxl --implementation=nvidia --backend=${{ matrix.backend }} --category=datacenter --scenario=Offline --execution_mode=test --device=${{ matrix.device }} --precision=${{ matrix.precision }} --docker --docker_it=no --docker_cm_repo=$CM_DOCKER_REPO --docker_cm_repo_branch=$CM_DOCKER_REPO_BRANCH --docker_dt=yes --quiet --results_dir=$HOME/scc_gh_action_results --submission_dir=$HOME/scc_gh_action_submissions --env.CM_MLPERF_MODEL_SDXL_DOWNLOAD_TO_HOST=yes --clean + mlcr --tags=generate,inference,submission --clean --run-checker --tar=yes --env.CM_TAR_OUTFILE=submission.tar.gz --division=open --category=datacenter --run_style=test --adr.submission-checker.tags=_short-run --quiet --submitter=MLCommons --submission_dir=$HOME/scc_gh_action_submissions --results_dir=$HOME/scc_gh_action_results/test_results + mlcr --tags=push,github,mlperf,inference,submission --repo_url=https://github.com/gateoverflow/cm4mlperf-inference --repo_branch=mlperf-inference-results-scc24 --commit_message="Results from self hosted Github actions - NVIDIARTX4090" --quiet --submission_dir=$HOME/scc_gh_action_submissions From 192892b636ef541dc0dc3e7cfeb1e3812e00861a Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Thu, 23 Jan 2025 04:56:55 +0530 Subject: [PATCH 74/84] Added tutorial gh actions for mlc --- .../workflows/test-cm-tutorial-retinanet.yml | 38 ----------------- .github/workflows/test-cm-tutorial-tvm.yml | 40 ------------------ .../workflows/test-mlc-tutorial-retinanet.yml | 42 +++++++++++++++++++ .github/workflows/test-mlc-tutorial-tvm.yml | 38 +++++++++++++++++ 4 files changed, 80 insertions(+), 78 deletions(-) delete mode 100644 .github/workflows/test-cm-tutorial-retinanet.yml delete mode 100644 .github/workflows/test-cm-tutorial-tvm.yml create mode 100644 .github/workflows/test-mlc-tutorial-retinanet.yml create mode 100644 .github/workflows/test-mlc-tutorial-tvm.yml diff --git a/.github/workflows/test-cm-tutorial-retinanet.yml b/.github/workflows/test-cm-tutorial-retinanet.yml deleted file mode 100644 index 5fa649772..000000000 --- a/.github/workflows/test-cm-tutorial-retinanet.yml +++ /dev/null @@ -1,38 +0,0 @@ -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions - -name: CM tutorial retinanet - -on: - pull_request: - branches: [ "main", "dev", "mlperf-inference" ] - paths: - - '.github/workflows/test-cm-tutorial-retinanet.yml' - - '**' - - '!**.md' -jobs: - build: - - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - python-version: ["3.9"] - - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ github.event.pull_request.head.sha }} - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies on Unix Platforms - run: | - CM_PULL_DEFAULT_MLOPS_REPO=no pip install cm4mlops - - name: Pull MLOps repository - run: | - cm pull repo --url=${{ github.event.pull_request.head.repo.html_url }} --checkout=${{ github.event.pull_request.head.ref }} - cm run script --quiet --tags=get,sys-utils-cm - - name: Test CM Tutorial Retinanet - run: | - python script/test-cm-core/src/tutorials/test_tutorial_retinanet.py diff --git a/.github/workflows/test-cm-tutorial-tvm.yml b/.github/workflows/test-cm-tutorial-tvm.yml deleted file mode 100644 index 96b653b0f..000000000 --- a/.github/workflows/test-cm-tutorial-tvm.yml +++ /dev/null @@ -1,40 +0,0 @@ -# This workflow will install Python dependencies, run tests and lint with a variety of Python versions -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions - -name: CM tutorial tvm - -on: - pull_request: - branches: [ "test" ] - paths: - - '.github/workflows/test-cm-tutorial-tvm.yml' - - '**' - - '!**.md' - -jobs: - build: - - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - python-version: ["3.9"] - - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ github.event.pull_request.head.sha }} - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies on Unix Platforms - run: | - CM_PULL_DEFAULT_MLOPS_REPO=no pip install cm4mlops - - name: Pull MLOps repository - run: | - cm pull repo --url=${{ github.event.pull_request.head.repo.html_url }} --checkout=${{ github.event.pull_request.head.ref }} - cm run script --quiet --tags=get,sys-utils-cm - - name: Test CM Tutorial TVM - run: | - python script/test-cm-core/src/tutorials/test_tutorial_tvm.py diff --git a/.github/workflows/test-mlc-tutorial-retinanet.yml b/.github/workflows/test-mlc-tutorial-retinanet.yml new file mode 100644 index 000000000..c20c7c02c --- /dev/null +++ b/.github/workflows/test-mlc-tutorial-retinanet.yml @@ -0,0 +1,42 @@ +name: MLC tutorial retinanet + +on: + pull_request: + branches: [ "main", "dev" ] + paths: + - '.github/workflows/test-mlc-tutorial-retinanet.yml' + - '**' + - '!**.md' +jobs: + build: + + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.9"] + + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + pip install mlcflow + - name: Pull MLOps repository + run: | + mlc pull repo ${{ github.event.pull_request.head.repo.html_url }} --branch=${{ github.event.pull_request.head.ref }} + mlcr --quiet --tags=get,sys-utils-cm + - name: Test MLC Tutorial Retinanet + run: | + mlcr --tags=app,mlperf,inference,generic,_cpp,_retinanet,_onnxruntime,_cpu --adr.python.version_min=3.8 --adr.compiler.tags=gcc --adr.openimages-preprocessed.tags=_50 --scenario=Offline --mode=accuracy --test_query_count=10 --rerun --quiet + + mlcr --tags=app,mlperf,inference,generic,_cpp,_retinanet,_onnxruntime,_cpu --adr.python.version_min=3.8 --adr.compiler.tags=gcc --adr.openimages-preprocessed.tags=_50 --scenario=Offline --mode=performance --test_query_count=10 --rerun --quiet + + mlcr --tags=install,python-venv --version=3.10.8 --name=mlperf + + mlcr --tags=run,mlperf,inference,generate-run-cmds,_submission,_short --adr.python.name=mlperf --adr.python.version_min=3.8 --adr.compiler.tags=gcc --adr.openimages-preprocessed.tags=_50 --submitter=Community --implementation=cpp --hw_name=default --model=retinanet --backend=onnxruntime --device=cpu --scenario=Offline diff --git a/.github/workflows/test-mlc-tutorial-tvm.yml b/.github/workflows/test-mlc-tutorial-tvm.yml new file mode 100644 index 000000000..2a323f8cf --- /dev/null +++ b/.github/workflows/test-mlc-tutorial-tvm.yml @@ -0,0 +1,38 @@ +name: MLC tutorial tvm + +on: + pull_request: + branches: [ "main", "dev" ] + paths: + - '.github/workflows/test-mlc-tutorial-tvm.yml' + - '**' + - '!**.md' + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.9"] + extra-options: [ "", " --adr.tvm.tags=_pip-install", " --adr.tvm.tags=_pip_install --adr.tvm-model.tags=_graph-executor"] + + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + pip install mlcflow + - name: Pull MLOps repository + run: | + mlc pull repo ${{ github.event.pull_request.head.repo.html_url }} --branch=${{ github.event.pull_request.head.ref }} + mlcr --quiet --tags=get,sys-utils-cm + - name: Test MLC Tutorial TVM + run: | + mlcr --tags=run-mlperf,inference,_submission,_short --adr.python.name=mlperf --adr.python.version_min=3.8 --submitter=Community --implementation=python --hw_name=default --model=resnet50--backend=tvm-onnx --device=cpu --scenario=Offline --mode=accuracy --test_query_count=5 --clean --quiet ${{ matrix.extra-options }} From 6c90cb697274a90e0ac45315d669cc1aa7c7bac9 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Wed, 22 Jan 2025 23:34:56 +0000 Subject: [PATCH 75/84] Update test-mlperf-inference-resnet50.yml --- .github/workflows/test-mlperf-inference-resnet50.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-mlperf-inference-resnet50.yml b/.github/workflows/test-mlperf-inference-resnet50.yml index 3e8863f66..fc57f89b8 100644 --- a/.github/workflows/test-mlperf-inference-resnet50.yml +++ b/.github/workflows/test-mlperf-inference-resnet50.yml @@ -10,7 +10,7 @@ on: - '**' - '!**.md' jobs: - build: + mlperf-inference-r50: runs-on: ${{ matrix.os }} env: CM_INDEX: "on" From f76ceaa4ddc2a60b8504edbfd7abaa846916e3d7 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Thu, 23 Jan 2025 05:01:56 +0530 Subject: [PATCH 76/84] Added tutorial gh actions for mlc --- .github/workflows/test-mlc-tutorial-tvm.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-mlc-tutorial-tvm.yml b/.github/workflows/test-mlc-tutorial-tvm.yml index 2a323f8cf..815ec0b65 100644 --- a/.github/workflows/test-mlc-tutorial-tvm.yml +++ b/.github/workflows/test-mlc-tutorial-tvm.yml @@ -35,4 +35,4 @@ jobs: mlcr --quiet --tags=get,sys-utils-cm - name: Test MLC Tutorial TVM run: | - mlcr --tags=run-mlperf,inference,_submission,_short --adr.python.name=mlperf --adr.python.version_min=3.8 --submitter=Community --implementation=python --hw_name=default --model=resnet50--backend=tvm-onnx --device=cpu --scenario=Offline --mode=accuracy --test_query_count=5 --clean --quiet ${{ matrix.extra-options }} + mlcr --tags=run-mlperf,inference,_submission,_short --adr.python.name=mlperf --adr.python.version_min=3.8 --submitter=Community --implementation=python --hw_name=default --model=resnet50 --backend=tvm-onnx --device=cpu --scenario=Offline --mode=accuracy --test_query_count=5 --clean --quiet ${{ matrix.extra-options }} From 8698e9ec09d77c3fed6bd89c3e2819659804aa21 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Thu, 23 Jan 2025 05:29:19 +0530 Subject: [PATCH 77/84] Fixes to tests --- .../scripts/process_individual_tests.py | 0 .../workflows/run-individual-script-tests.yml | 12 ++-- .../workflows/test-cm-tutorial-tvm-pip.yml | 63 ------------------- .../workflows/test-cm4mlops-wheel-macos.yml | 39 ------------ .../workflows/test-cm4mlops-wheel-windows.yml | 43 ------------- .github/workflows/test-mlc-tutorial-tvm.yml | 2 +- ...wheel-ubuntu.yml => test-mlperf-wheel.yml} | 25 +++++--- .../customize.py | 2 +- .../run.sh | 1 + script/test-cm-core/COPYRIGHT.md | 9 --- script/test-cm-core/README-extra.md | 1 - script/test-cm-core/README.md | 1 - script/test-cm-core/customize.py | 17 ----- script/test-cm-core/meta.yaml | 14 ----- script/test-cm-core/run.bat | 3 - script/test-cm-core/run.sh | 13 ---- script/test-cm-core/src/script/check.py | 16 ----- .../src/script/process_dockerfile.py | 33 ---------- .../test-cm-core/src/script/process_readme.py | 27 -------- script/test-cm-core/src/script/test_deps.py | 25 -------- script/test-cm-core/src/script/test_docker.py | 39 ------------ .../test-cm-core/src/script/test_features.py | 55 ---------------- .../test-cm-core/src/script/test_install.py | 15 ----- script/test-cm-core/src/test_cm.py | 17 ----- script/test-cm-core/src/test_search_speed.py | 26 -------- .../src/tutorials/test_tutorial_retinanet.py | 37 ----------- .../src/tutorials/test_tutorial_tvm.py | 28 --------- .../src/tutorials/test_tutorial_tvm_pip_ge.py | 26 -------- .../src/tutorials/test_tutorial_tvm_pip_vm.py | 27 -------- script/test-cm-script-pipeline/COPYRIGHT.md | 9 --- .../test-cm-script-pipeline/README-extra.md | 8 --- script/test-cm-script-pipeline/README.md | 1 - script/test-cm-script-pipeline/customize.py | 40 ------------ script/test-cm-script-pipeline/meta.yaml | 37 ----------- script/test-cm-script-pipeline/run.bat | 5 -- script/test-cm-script-pipeline/run.sh | 5 -- script/test-cm-script-pipeline/run2.bat | 5 -- script/test-cm-script-pipeline/run2.sh | 5 -- script/test-cm-scripts/COPYRIGHT.md | 9 --- script/test-cm-scripts/customize.py | 24 ------- script/test-cm-scripts/meta.yaml | 31 --------- script/test-cm-scripts/run.bat | 1 - script/test-cm-scripts/run.sh | 17 ----- script/test-debug/.vscode/launch.json | 22 ------- script/test-debug/COPYRIGHT.md | 9 --- script/test-debug/README-extra.md | 20 ------ script/test-debug/README.md | 1 - script/test-debug/_demo.py | 9 --- script/test-debug/customize.py | 40 ------------ script/test-debug/meta.yaml | 29 --------- script/test-debug/python/.vscode/launch.json | 23 ------- script/test-debug/python/main.py | 26 -------- script/test-debug/run.bat | 6 -- script/test-debug/run.sh | 8 --- .../COPYRIGHT.md | 9 --- .../README-extra.md | 1 - .../README.md | 1 - .../customize.py | 24 ------- .../meta.yaml | 31 --------- .../run.bat | 1 - .../run.sh | 27 -------- .../COPYRIGHT.md | 9 --- .../test-mlperf-inference-retinanet/README.md | 1 - .../customize.py | 19 ------ .../test-mlperf-inference-retinanet/meta.yaml | 28 --------- .../test-mlperf-inference-retinanet/run.bat | 8 --- script/test-mlperf-inference-retinanet/run.sh | 9 --- 67 files changed, 25 insertions(+), 1149 deletions(-) rename script/test-cm-core/src/script/process_tests.py => .github/scripts/process_individual_tests.py (100%) delete mode 100644 .github/workflows/test-cm-tutorial-tvm-pip.yml delete mode 100644 .github/workflows/test-cm4mlops-wheel-macos.yml delete mode 100644 .github/workflows/test-cm4mlops-wheel-windows.yml rename .github/workflows/{test-cm4mlops-wheel-ubuntu.yml => test-mlperf-wheel.yml} (54%) delete mode 100644 script/test-cm-core/COPYRIGHT.md delete mode 100644 script/test-cm-core/README-extra.md delete mode 100644 script/test-cm-core/README.md delete mode 100644 script/test-cm-core/customize.py delete mode 100644 script/test-cm-core/meta.yaml delete mode 100644 script/test-cm-core/run.bat delete mode 100644 script/test-cm-core/run.sh delete mode 100644 script/test-cm-core/src/script/check.py delete mode 100644 script/test-cm-core/src/script/process_dockerfile.py delete mode 100644 script/test-cm-core/src/script/process_readme.py delete mode 100644 script/test-cm-core/src/script/test_deps.py delete mode 100644 script/test-cm-core/src/script/test_docker.py delete mode 100644 script/test-cm-core/src/script/test_features.py delete mode 100644 script/test-cm-core/src/script/test_install.py delete mode 100644 script/test-cm-core/src/test_cm.py delete mode 100644 script/test-cm-core/src/test_search_speed.py delete mode 100644 script/test-cm-core/src/tutorials/test_tutorial_retinanet.py delete mode 100644 script/test-cm-core/src/tutorials/test_tutorial_tvm.py delete mode 100644 script/test-cm-core/src/tutorials/test_tutorial_tvm_pip_ge.py delete mode 100644 script/test-cm-core/src/tutorials/test_tutorial_tvm_pip_vm.py delete mode 100644 script/test-cm-script-pipeline/COPYRIGHT.md delete mode 100644 script/test-cm-script-pipeline/README-extra.md delete mode 100644 script/test-cm-script-pipeline/README.md delete mode 100644 script/test-cm-script-pipeline/customize.py delete mode 100644 script/test-cm-script-pipeline/meta.yaml delete mode 100644 script/test-cm-script-pipeline/run.bat delete mode 100644 script/test-cm-script-pipeline/run.sh delete mode 100644 script/test-cm-script-pipeline/run2.bat delete mode 100644 script/test-cm-script-pipeline/run2.sh delete mode 100644 script/test-cm-scripts/COPYRIGHT.md delete mode 100644 script/test-cm-scripts/customize.py delete mode 100644 script/test-cm-scripts/meta.yaml delete mode 100644 script/test-cm-scripts/run.bat delete mode 100644 script/test-cm-scripts/run.sh delete mode 100644 script/test-debug/.vscode/launch.json delete mode 100644 script/test-debug/COPYRIGHT.md delete mode 100644 script/test-debug/README-extra.md delete mode 100644 script/test-debug/README.md delete mode 100644 script/test-debug/_demo.py delete mode 100644 script/test-debug/customize.py delete mode 100644 script/test-debug/meta.yaml delete mode 100644 script/test-debug/python/.vscode/launch.json delete mode 100644 script/test-debug/python/main.py delete mode 100644 script/test-debug/run.bat delete mode 100644 script/test-debug/run.sh delete mode 100644 script/test-download-and-extract-artifacts/COPYRIGHT.md delete mode 100644 script/test-download-and-extract-artifacts/README-extra.md delete mode 100644 script/test-download-and-extract-artifacts/README.md delete mode 100644 script/test-download-and-extract-artifacts/customize.py delete mode 100644 script/test-download-and-extract-artifacts/meta.yaml delete mode 100644 script/test-download-and-extract-artifacts/run.bat delete mode 100644 script/test-download-and-extract-artifacts/run.sh delete mode 100644 script/test-mlperf-inference-retinanet/COPYRIGHT.md delete mode 100644 script/test-mlperf-inference-retinanet/README.md delete mode 100644 script/test-mlperf-inference-retinanet/customize.py delete mode 100644 script/test-mlperf-inference-retinanet/meta.yaml delete mode 100644 script/test-mlperf-inference-retinanet/run.bat delete mode 100644 script/test-mlperf-inference-retinanet/run.sh diff --git a/script/test-cm-core/src/script/process_tests.py b/.github/scripts/process_individual_tests.py similarity index 100% rename from script/test-cm-core/src/script/process_tests.py rename to .github/scripts/process_individual_tests.py diff --git a/.github/workflows/run-individual-script-tests.yml b/.github/workflows/run-individual-script-tests.yml index 45b9dd283..cd0f2712d 100644 --- a/.github/workflows/run-individual-script-tests.yml +++ b/.github/workflows/run-individual-script-tests.yml @@ -1,12 +1,12 @@ # This workflow will run configured tests for any updated CM scripts -name: Individual CM script Tests +name: Individual Automation script Tests on: pull_request: branches: [ "main", "dev" ] paths: - - 'script/**_cm.json' - - 'script/**_cm.yaml' + - 'script/**meta.json' + - 'script/**meta.yaml' jobs: run-script-tests: @@ -32,6 +32,6 @@ jobs: for file in ${{ steps.getfile.outputs.files }}; do echo $file done - CM_PULL_DEFAULT_MLOPS_REPO=no pip install cm4mlops - cm pull repo --url=${{ github.event.pull_request.head.repo.html_url }} --checkout=${{ github.event.pull_request.head.ref }} - DOCKER_CM_REPO=${{ github.event.pull_request.head.repo.html_url }} DOCKER_CM_REPO_BRANCH=${{ github.event.pull_request.head.ref }} TEST_INPUT_INDEX=${{ matrix.test-input-index }} python3 script/test-cm-core/src/script/process_tests.py ${{ steps.getfile.outputs.files }} + pip install mlcflow + mlc pull repo ${{ github.event.pull_request.head.repo.html_url }} --branch=${{ github.event.pull_request.head.ref }} + DOCKER_CM_REPO=${{ github.event.pull_request.head.repo.html_url }} DOCKER_CM_REPO_BRANCH=${{ github.event.pull_request.head.ref }} TEST_INPUT_INDEX=${{ matrix.test-input-index }} python3 .github/scripts/process_individual_tests.py ${{ steps.getfile.outputs.files }} diff --git a/.github/workflows/test-cm-tutorial-tvm-pip.yml b/.github/workflows/test-cm-tutorial-tvm-pip.yml deleted file mode 100644 index 8cc87ca0e..000000000 --- a/.github/workflows/test-cm-tutorial-tvm-pip.yml +++ /dev/null @@ -1,63 +0,0 @@ -# This workflow will install Python dependencies, run tests and lint with a variety of Python versions -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions - -name: CM tutorial tvm pip install - -on: - pull_request: - branches: [ "main", "test", "mlperf-inference" ] - paths: - - '.github/workflows/test-cm-tutorial-tvm-pip.yml' - - '**' - - '!**.md' - -jobs: - test_vm_runtime: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - python-version: ["3.9"] - - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ github.event.pull_request.head.sha }} - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies on Unix Platforms - run: | - CM_PULL_DEFAULT_MLOPS_REPO=no pip install cm4mlops - - name: Pull MLOps repository - run: | - cm pull repo --url=${{ github.event.pull_request.head.repo.html_url }} --checkout=${{ github.event.pull_request.head.ref }} - cm run script --quiet --tags=get,sys-utils-cm - - name: Test CM Tutorial TVM pip install with VirtualMachine Runtime - run: | - python script/test-cm-core/src/tutorials/test_tutorial_tvm_pip_vm.py - - test_ge_runtime: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - python-version: ["3.9"] - - steps: - - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies on Unix Platforms - run: | - CM_PULL_DEFAULT_MLOPS_REPO=no pip install cm4mlops - - name: Pull MLOps repository - run: | - cm pull repo --url=${{ github.event.pull_request.head.repo.html_url }} --checkout=${{ github.event.pull_request.head.ref }} - cm run script --quiet --tags=get,sys-utils-cm - - name: Test CM Tutorial TVM pip install with GraphExecutor Runtime - run: | - python script/test-cm-core/src/tutorials/test_tutorial_tvm_pip_ge.py diff --git a/.github/workflows/test-cm4mlops-wheel-macos.yml b/.github/workflows/test-cm4mlops-wheel-macos.yml deleted file mode 100644 index fede3adb9..000000000 --- a/.github/workflows/test-cm4mlops-wheel-macos.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Build Python Wheel - -on: - pull_request: - branches: - - main - - dev - - mlperf-inference - paths: - - '.github/workflows/test-cm4mlops-wheel-macos.yml' - - 'setup.py' - -jobs: - build: - strategy: - fail-fast: false - matrix: - os: [macos-latest] - python-version: [ '3.11', '3.12'] - - runs-on: ${{ matrix.os }} - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - ref: ${{ github.event.pull_request.head.sha }} - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - - - name: Build the Python wheel - run: | - python3 -m venv cm - source cm/bin/activate - python3 -m pip install . -v diff --git a/.github/workflows/test-cm4mlops-wheel-windows.yml b/.github/workflows/test-cm4mlops-wheel-windows.yml deleted file mode 100644 index 68bf199a7..000000000 --- a/.github/workflows/test-cm4mlops-wheel-windows.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: Build Python Wheel - -on: - pull_request: - branches: - - main - - dev - - mlperf-inference - paths: - - '.github/workflows/test-cm4mlops-wheel-windows.yml' - - 'setup.py' - -jobs: - build: - strategy: - fail-fast: false - matrix: - os: [windows-latest] - python-version: ['3.9', '3.11', '3.12'] - exclude: - - os: ubuntu-latest - python-version: "3.8" - - runs-on: ${{ matrix.os }} - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - ref: ${{ github.event.pull_request.head.sha }} - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - - - name: Build the Python wheel - run: | - python3 -m venv cm - cm\Scripts\activate.bat - git config --system core.longpaths true - python3 -m pip install . -v diff --git a/.github/workflows/test-mlc-tutorial-tvm.yml b/.github/workflows/test-mlc-tutorial-tvm.yml index 815ec0b65..90997c9c2 100644 --- a/.github/workflows/test-mlc-tutorial-tvm.yml +++ b/.github/workflows/test-mlc-tutorial-tvm.yml @@ -16,7 +16,7 @@ jobs: fail-fast: false matrix: python-version: ["3.9"] - extra-options: [ "", " --adr.tvm.tags=_pip-install", " --adr.tvm.tags=_pip_install --adr.tvm-model.tags=_graph-executor"] + extra-options: [ "", " --adr.tvm.tags=_pip-install", " --adr.tvm.tags=_pip-install --adr.tvm-model.tags=_graph-executor"] steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/test-cm4mlops-wheel-ubuntu.yml b/.github/workflows/test-mlperf-wheel.yml similarity index 54% rename from .github/workflows/test-cm4mlops-wheel-ubuntu.yml rename to .github/workflows/test-mlperf-wheel.yml index 6ec9905d6..2ff1595fb 100644 --- a/.github/workflows/test-cm4mlops-wheel-ubuntu.yml +++ b/.github/workflows/test-mlperf-wheel.yml @@ -6,7 +6,7 @@ on: - main - dev paths: - - '.github/workflows/test-cm4mlops-wheel-ubuntu.yml' + - '.github/workflows/test-mlperf-wheel.yml' - 'setup.py' jobs: @@ -14,11 +14,8 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, ubuntu-20.04] - python-version: ['3.8', '3.11', '3.12'] - exclude: - - os: ubuntu-latest - python-version: "3.8" + os: [macos-latest, ubuntu-latest, windows-latest] + python-version: [ '3.8', '3.13'] runs-on: ${{ matrix.os }} @@ -34,12 +31,22 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install dependencies + if: runner.os == 'linux' run: | - sudo apt-get update + sudo apt-get update sudo apt-get install -y python3 python3-pip python3-venv - name: Build the Python wheel + if: runner.os != 'Windows' run: | - python3 -m venv cm - source cm/bin/activate + python3 -m venv mlc + source mlc/bin/activate + python3 -m pip install . -v + + - name: Build the Python wheel + if: runner.os == 'Windows' + run: | + python3 -m venv mlc + mlc\Scripts\activate.bat + git config --system core.longpaths true python3 -m pip install . -v diff --git a/script/push-mlperf-inference-results-to-github/customize.py b/script/push-mlperf-inference-results-to-github/customize.py index 88f1a90c5..10b73ec23 100644 --- a/script/push-mlperf-inference-results-to-github/customize.py +++ b/script/push-mlperf-inference-results-to-github/customize.py @@ -35,7 +35,7 @@ def preprocess(i): p = parse(repo) if env.get('CM_GITHUB_PAT', '') != '': token = env['CM_GITHUB_PAT'] - env['CM_GIT_PUSH_CMD'] = f"""git push https://x-access-token:{env['CM_GITHUB_PAT']}@{p.host}/{p.owner}/{p.repo}""" + env['CM_GIT_PUSH_CMD'] = f"""git push https://x-access-token:{token}@{p.host}/{p.owner}/{p.repo}""" else: env['CM_GIT_PUSH_CMD'] = "git push" diff --git a/script/push-mlperf-inference-results-to-github/run.sh b/script/push-mlperf-inference-results-to-github/run.sh index 8b6ac5648..795838f68 100644 --- a/script/push-mlperf-inference-results-to-github/run.sh +++ b/script/push-mlperf-inference-results-to-github/run.sh @@ -9,6 +9,7 @@ fi cd "${CM_GIT_REPO_CHECKOUT_PATH}" git pull git add * + if [[ -n ${CM_MLPERF_INFERENCE_SUBMISSION_DIR} ]]; then rsync -avz "${CM_MLPERF_INFERENCE_SUBMISSION_DIR}/" "${CM_GIT_REPO_CHECKOUT_PATH}/" git add * diff --git a/script/test-cm-core/COPYRIGHT.md b/script/test-cm-core/COPYRIGHT.md deleted file mode 100644 index a059b0c49..000000000 --- a/script/test-cm-core/COPYRIGHT.md +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright Notice - -© 2024-2025 MLCommons. All Rights Reserved. - -This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of the License can be obtained at: - -[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0) - -Unless required by applicable law or agreed to in writing, software distributed under the License is provided on an "AS IS" basis, without warranties or conditions of any kind, either express or implied. Please refer to the License for the specific language governing permissions and limitations under the License. diff --git a/script/test-cm-core/README-extra.md b/script/test-cm-core/README-extra.md deleted file mode 100644 index 582991f6d..000000000 --- a/script/test-cm-core/README-extra.md +++ /dev/null @@ -1 +0,0 @@ -# CM script diff --git a/script/test-cm-core/README.md b/script/test-cm-core/README.md deleted file mode 100644 index e2626fc25..000000000 --- a/script/test-cm-core/README.md +++ /dev/null @@ -1 +0,0 @@ -Please see [https://docs.mlcommons.org/cm4mlops/scripts/Tests/test-cm-core](https://docs.mlcommons.org/cm4mlops/scripts/Tests/test-cm-core) for the documentation of this CM script. diff --git a/script/test-cm-core/customize.py b/script/test-cm-core/customize.py deleted file mode 100644 index c394f862f..000000000 --- a/script/test-cm-core/customize.py +++ /dev/null @@ -1,17 +0,0 @@ -from mlc import utils -import os - - -def preprocess(i): - - os_info = i['os_info'] - - env = i['env'] - - meta = i['meta'] - - automation = i['automation'] - - quiet = (env.get('CM_QUIET', False) == 'yes') - - return {'return': 0} diff --git a/script/test-cm-core/meta.yaml b/script/test-cm-core/meta.yaml deleted file mode 100644 index 420d119f8..000000000 --- a/script/test-cm-core/meta.yaml +++ /dev/null @@ -1,14 +0,0 @@ -alias: test-cm-core -uid: 2c2fb9d20dc64cf3 - -automation_alias: script -automation_uid: 5b4e0237da074764 - -category: Tests - -tags: -- test -- cm -- core - -cache: false diff --git a/script/test-cm-core/run.bat b/script/test-cm-core/run.bat deleted file mode 100644 index 271224ef9..000000000 --- a/script/test-cm-core/run.bat +++ /dev/null @@ -1,3 +0,0 @@ -rem native script - -echo "TBD" diff --git a/script/test-cm-core/run.sh b/script/test-cm-core/run.sh deleted file mode 100644 index 997c0c33e..000000000 --- a/script/test-cm-core/run.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -#CM Script location: ${CM_TMP_CURRENT_SCRIPT_PATH} - -#To export any variable -#echo "VARIABLE_NAME=VARIABLE_VALUE" >>tmp-run-env.out - -#${CM_PYTHON_BIN_WITH_PATH} contains the path to python binary if "get,python" is added as a dependency - -echo "TBD" - -#Add your run commands here... -# run "$CM_RUN_CMD" diff --git a/script/test-cm-core/src/script/check.py b/script/test-cm-core/src/script/check.py deleted file mode 100644 index 4883116c0..000000000 --- a/script/test-cm-core/src/script/check.py +++ /dev/null @@ -1,16 +0,0 @@ -def check_return(r): - if 'return' not in r: - raise Exception( - 'CM access function should always return key \'return\'!') - if 'error' in r: - raise Exception(r['error']) - - -def check_list(r, string, found=True): - check_return(r) - if 'list' not in r: - raise Exception('CM search should return a list!') - if len(r['list']) < 1 and found: - raise Exception('CM search returned an empty list for ' + string) - if len(r['list']) > 0 and not found: - raise Exception('CM search returned at lease one entry for ' + string) diff --git a/script/test-cm-core/src/script/process_dockerfile.py b/script/test-cm-core/src/script/process_dockerfile.py deleted file mode 100644 index 1d23ec601..000000000 --- a/script/test-cm-core/src/script/process_dockerfile.py +++ /dev/null @@ -1,33 +0,0 @@ -import sys -import os -import cmind as cm -import check as checks -import json -import yaml - -files = sys.argv[1:] - -for file in files: - if not os.path.isfile(file): - continue - if not file.endswith("_cm.json") and not file.endswith("_cm.yaml"): - continue - if not file.startswith(os.path.join("script")): - continue - - script_path = os.path.dirname(file) - - f = open(file) - - if file.endswith(".json"): - data = json.load(f) - elif file.endswith(".yaml"): - data = yaml.safe_load(f) - - uid = data['uid'] - - r = cm.access({'action': 'dockerfile', - 'automation': 'script', - 'artifact': uid, - 'quiet': 'yes'}) - checks.check_return(r) diff --git a/script/test-cm-core/src/script/process_readme.py b/script/test-cm-core/src/script/process_readme.py deleted file mode 100644 index 03daec793..000000000 --- a/script/test-cm-core/src/script/process_readme.py +++ /dev/null @@ -1,27 +0,0 @@ -import sys -import os -import cmind as cm -import check as checks -import json -import yaml - -files = sys.argv[1:] - -for file in files: - if not os.path.isfile(file): - continue - if not file.endswith("_cm.json") and not file.endswith("_cm.yaml"): - continue - if not file.startswith(os.path.join("script")): - continue - script_path = os.path.dirname(file) - f = open(file) - if file.endswith(".json"): - data = json.load(f) - elif file.endswith(".yaml"): - data = yaml.safe_load(f) - uid = data['uid'] - - r = cm.access({'action': 'doc', 'automation': 'script', - 'artifact': uid, 'quiet': 'yes'}) - checks.check_return(r) diff --git a/script/test-cm-core/src/script/test_deps.py b/script/test-cm-core/src/script/test_deps.py deleted file mode 100644 index 37d75fd4c..000000000 --- a/script/test-cm-core/src/script/test_deps.py +++ /dev/null @@ -1,25 +0,0 @@ -# This test covers version, variation, compilation from src, add_deps, -# add_deps_recursive, deps, post_deps - -import cmind as cm -import check as checks - -# MLPerf v3.0 inference is now very outdated and we are testing inference -# in separate tests - -# r = cm.access({'action':'run', 'automation':'script', 'tags': 'generate-run-cmds,mlperf', 'adr': -# {'loadgen': {'version': 'r3.0'}, 'compiler': {'tags': "gcc"}}, 'env': {'CM_MODEL': 'resnet50', -# 'CM_DEVICE': 'cpu', 'CM_BACKEND': 'onnxruntime'}, 'quiet': 'yes'}) -# checks.check_return(r) -# -# r = cm.access({'action':'search', 'automation': 'cache', 'tags': 'loadgen,version-r3.0,deps-python-non-virtual'}) -# checks.check_list(r, "loadgen,version-r3.0,deps-python-non-virtual") -# -# r = cm.access({'action':'search', 'automation': 'cache', 'tags': 'inference,src,version-r3.0'}) -# checks.check_list(r, "inference,src,version-r3.0") -# -# r = cm.access({'action':'run', 'automation':'script', 'tags': 'app,mlperf,inference,generic,_python,_resnet50,_onnxruntime,_cpu,_r3.0_default', 'adr': {'mlperf-implementation': { 'version': 'master'}}, 'quiet': 'yes'}) -# checks.check_return(r) -# -# r = cm.access({'action':'run', 'automation':'script', 'tags': 'app,mlperf,inference,generic,_python,_resnet50,_tf,_cpu,_r3.0_default', 'adr': {'mlperf-implementation': { 'version': 'master'}}, 'quiet': 'yes'}) -# checks.check_return(r) diff --git a/script/test-cm-core/src/script/test_docker.py b/script/test-cm-core/src/script/test_docker.py deleted file mode 100644 index 1b63631c6..000000000 --- a/script/test-cm-core/src/script/test_docker.py +++ /dev/null @@ -1,39 +0,0 @@ -# This test covers version, variation, compilation from src, -# add_deps_recursive, post_deps - -import cmind as cm -import check as checks - -r = cm.access({'action': 'run', - 'automation': 'script', - 'tags': 'run,docker,container', - 'add_deps_recursive': { - 'compiler': {'tags': "gcc"} - }, - 'docker_cm_repo': 'mlcommons@mlperf-automations', - 'image_name': 'cm-script-app-image-classification-onnx-py', - 'env': { - 'CM_DOCKER_RUN_SCRIPT_TAGS': 'app,image-classification,onnx,python', - 'CM_DOCKER_IMAGE_BASE': 'ubuntu:22.04', - 'CM_DOCKER_IMAGE_REPO': 'cknowledge' - }, - 'quiet': 'yes' - }) -checks.check_return(r) - -r = cm.access({'action': 'run', - 'automation': 'script', - 'tags': 'run,docker,container', - 'add_deps_recursive': { - 'compiler': {'tags': "gcc"} - }, - 'docker_cm_repo': 'mlcommons@mlperf-automations', - 'image_name': 'cm-script-app-image-classification-onnx-py', - 'env': { - 'CM_DOCKER_RUN_SCRIPT_TAGS': 'app,image-classification,onnx,python', - 'CM_DOCKER_IMAGE_BASE': 'ubuntu:24.04', - 'CM_DOCKER_IMAGE_REPO': 'local' - }, - 'quiet': 'yes' - }) -checks.check_return(r) diff --git a/script/test-cm-core/src/script/test_features.py b/script/test-cm-core/src/script/test_features.py deleted file mode 100644 index fa8ccb706..000000000 --- a/script/test-cm-core/src/script/test_features.py +++ /dev/null @@ -1,55 +0,0 @@ -# This test covers -# 1. python-virtual-env and update_deps inside customize.py -# 2. cache search using "-" prefix - -import cmind as cm -import check as checks - -r = cm.access({'action': 'run', - 'automation': 'script', - 'tags': 'install,python-venv', - 'name': 'test', - 'quiet': 'yes'}) -checks.check_return(r) - -r = cm.access({'action': 'search', 'automation': 'cache', - 'tags': 'get,python,virtual,name-test'}) -checks.check_list(r, "get,python-venv") - -r = cm.access({'action': 'run', - 'automation': 'script', - 'tags': 'get,dataset,preprocessed,imagenet,_NHWC', - 'quiet': 'yes'}) -checks.check_return(r) - -r = cm.access({'action': 'search', 'automation': 'cache', - 'tags': 'get,dataset,preprocessed,imagenet,-_NCHW'}) -checks.check_list(r, "_NHWC") - -r = cm.access({'action': 'search', 'automation': 'cache', - 'tags': 'get,dataset,preprocessed,imagenet,-_NHWC'}) -checks.check_list(r, "_NHWC", False) - -r = cm.access({'action': 'run', - 'automation': 'script', - 'tags': 'get,generic-python-lib,_package.scipy', - 'version': '1.9.3', - 'quiet': 'yes'}) - -r = cm.access({'action': 'run', - 'automation': 'script', - 'tags': 'get,generic-python-lib,_package.scipy', - 'version': '1.9.2', - 'quiet': 'yes'}) - -r = cm.access({'action': 'run', - 'automation': 'script', - 'tags': 'get,generic-python-lib,_package.scipy', - 'version': '1.9.3', - 'only_execute_from_cache': True, - 'quiet': 'yes'}) - -# r should return error -if 'error' not in r: - print(r) - raise Exception('Invalidated cache entry for scipy==1.9.3 found in cache') diff --git a/script/test-cm-core/src/script/test_install.py b/script/test-cm-core/src/script/test_install.py deleted file mode 100644 index d4fb93ec7..000000000 --- a/script/test-cm-core/src/script/test_install.py +++ /dev/null @@ -1,15 +0,0 @@ -# This test covers script installation, version, shared library install - -import cmind as cm -import check as checks - -r = cm.access({'action': 'run', - 'automation': 'script', - 'tags': 'python,src,install,_shared', - 'version': '3.9.10', - 'quiet': 'true'}) -checks.check_return(r) - -r = cm.access({'action': 'search', 'automation': 'cache', - 'tags': 'python,src,install,_shared,version-3.9.10'}) -checks.check_list(r, "python,src,install,_shared,version-3.9.10") diff --git a/script/test-cm-core/src/test_cm.py b/script/test-cm-core/src/test_cm.py deleted file mode 100644 index 821e1571d..000000000 --- a/script/test-cm-core/src/test_cm.py +++ /dev/null @@ -1,17 +0,0 @@ -try: - import cmind as cm - - r = cm.access(['test', 'script']) - if 'return' not in r: - raise Exception( - 'CM access function should always return key \'return\'!') - exit(0) - -except ImportError as e: - from sys import stderr - from subprocess import call - print( - 'WARNING: CM module for python is not installed & jupyter notebooks will not be supported', - file=stderr) - retcode = call(['cm', 'test', 'script']) - exit(retcode) diff --git a/script/test-cm-core/src/test_search_speed.py b/script/test-cm-core/src/test_search_speed.py deleted file mode 100644 index b153f2162..000000000 --- a/script/test-cm-core/src/test_search_speed.py +++ /dev/null @@ -1,26 +0,0 @@ -import mlc -import time - -times = [] - -steps = 10 - -print('Running search with tags {} times ...'.format(steps)) - -for step in range(steps): - - start = time.time() - r = mlc.access({'action': 'search', - 'automation': 'script', - 'tags': 'detect,os'}) - timer = time.time() - start - - if r['return'] > 0: - mlc.error(r) - - times.append(timer) - -step = 0 -for t in times: - step += 1 - print("{}) {:0.3f} sec.".format(step, t)) diff --git a/script/test-cm-core/src/tutorials/test_tutorial_retinanet.py b/script/test-cm-core/src/tutorials/test_tutorial_retinanet.py deleted file mode 100644 index bc8d22f78..000000000 --- a/script/test-cm-core/src/tutorials/test_tutorial_retinanet.py +++ /dev/null @@ -1,37 +0,0 @@ -# This test covers version, variation, compilation from src, add_deps, -# add_deps_recursive, deps, post_deps - -import cmind as cm -from pathlib import Path -import sys -import os - -sys.path.insert( - 1, - os.path.join( - Path(__file__).parent.parent.resolve(), - "script")) -import check as checks # noqa - -r = cm.access({'action': 'run', 'automation': 'script', 'tags': 'app,mlperf,inference,generic,_cpp,_retinanet,_onnxruntime,_cpu', 'adr': - {'python': {'version_min': '3.8'}, 'compiler': {'tags': "gcc"}, 'openimages-preprocessed': {'tags': '_50'}}, 'scenario': 'Offline', - 'mode': 'accuracy', 'test_query_count': '10', 'rerun': 'true', 'quiet': 'yes'}) -checks.check_return(r) - -r = cm.access({'action': 'run', 'automation': 'script', 'tags': 'app,mlperf,inference,generic,_cpp,_retinanet,_onnxruntime,_cpu', 'adr': - {'python': {'version_min': '3.8'}, 'compiler': {'tags': "gcc"}, 'openimages-preprocessed': {'tags': '_50'}}, 'scenario': 'Offline', - 'mode': 'performance', 'test_query_count': '10', 'rerun': 'true', 'quiet': 'yes'}) -checks.check_return(r) - -r = cm.access({'action': 'run', - 'automation': 'script', - 'tags': 'install,python-venv', - 'version': '3.10.8', - 'name': 'mlperf'}) -checks.check_return(r) - -r = cm.access({'action': 'run', 'automation': 'script', 'tags': 'run,mlperf,inference,generate-run-cmds,_submission,_short', 'adr': - {'python': {'name': 'mlperf', 'version_min': '3.8'}, 'compiler': {'tags': "gcc"}, 'openimages-preprocessed': {'tags': '_50'}}, 'submitter': 'Community', - 'implementation': 'cpp', 'hw_name': 'default', 'model': 'retinanet', 'backend': 'onnxruntime', 'device': 'cpu', 'scenario': 'Offline', - 'test_query_count': '10', 'clean': 'true', 'quiet': 'yes'}) -checks.check_return(r) diff --git a/script/test-cm-core/src/tutorials/test_tutorial_tvm.py b/script/test-cm-core/src/tutorials/test_tutorial_tvm.py deleted file mode 100644 index 4b621ebe8..000000000 --- a/script/test-cm-core/src/tutorials/test_tutorial_tvm.py +++ /dev/null @@ -1,28 +0,0 @@ -# This test covers version, variation, compilation from src, add_deps, -# add_deps_recursive, deps, post_deps - -import cmind as cm - -from pathlib import Path -import sys -import os - -sys.path.insert( - 1, - os.path.join( - Path(__file__).parent.parent.resolve(), - "script")) -import check as checks # noqa - -r = cm.access({'action': 'run', 'automation': 'script', 'tags': 'run,mlperf,inference,generate-run-cmds', 'adr': - {'python': {'name': 'mlperf', 'version_min': '3.8'}}, 'submitter': 'Community', - 'implementation': 'python', 'hw_name': 'default', 'model': 'resnet50', 'backend': 'tvm-onnx', 'device': 'cpu', 'scenario': 'Offline', - 'mode': 'accuracy', 'test_query_count': '5', 'clean': 'true', 'quiet': 'yes'}) -checks.check_return(r) - - -r = cm.access({'action': 'run', 'automation': 'script', 'tags': 'run,mlperf,inference,generate-run-cmds,_submission,_dashboard', 'adr': - {'python': {'name': 'mlperf', 'version_min': '3.8'}}, 'submitter': 'Community', - 'implementation': 'python', 'hw_name': 'default', 'model': 'resnet50', 'backend': 'tvm-onnx', 'device': 'cpu', 'scenario': 'Offline', - 'test_query_count': '500', 'clean': 'true', 'quiet': 'yes'}) -checks.check_return(r) diff --git a/script/test-cm-core/src/tutorials/test_tutorial_tvm_pip_ge.py b/script/test-cm-core/src/tutorials/test_tutorial_tvm_pip_ge.py deleted file mode 100644 index 4e17d572d..000000000 --- a/script/test-cm-core/src/tutorials/test_tutorial_tvm_pip_ge.py +++ /dev/null @@ -1,26 +0,0 @@ -import cmind as cm - -from pathlib import Path -import sys -import os - -sys.path.insert( - 1, - os.path.join( - Path(__file__).parent.parent.resolve(), - "script")) -import check as checks # noqa - -r = cm.access({'action': 'run', 'automation': 'script', 'tags': 'run,mlperf,inference,generate-run-cmds', 'adr': - {'python': {'name': 'mlperf', 'version_min': '3.8'}, 'tvm': { - 'tags': '_pip-install'}, 'tvm-model': {'tags': '_graph_executor'}}, - 'submitter': 'Community', 'implementation': 'python', 'hw_name': 'default', 'model': 'resnet50', 'backend': 'tvm-onnx', - 'device': 'cpu', 'scenario': 'Offline', 'mode': 'accuracy', 'test_query_count': '5', 'clean': 'true', 'quiet': 'yes'}) -checks.check_return(r) - -r = cm.access({'action': 'run', 'automation': 'script', 'tags': 'run,mlperf,inference,generate-run-cmds,_submission,_short', 'adr': - {'python': {'name': 'mlperf', 'version_min': '3.8'}, 'tvm': { - 'tags': '_pip-install'}, 'tvm-model': {'tags': '_graph_executor'}}, - 'submitter': 'Community', 'implementation': 'python', 'hw_name': 'default', 'model': 'resnet50', 'backend': 'tvm-onnx', - 'device': 'cpu', 'scenario': 'Offline', 'test_query_count': '500', 'clean': 'true', 'quiet': 'yes'}) -checks.check_return(r) diff --git a/script/test-cm-core/src/tutorials/test_tutorial_tvm_pip_vm.py b/script/test-cm-core/src/tutorials/test_tutorial_tvm_pip_vm.py deleted file mode 100644 index 28bc0132b..000000000 --- a/script/test-cm-core/src/tutorials/test_tutorial_tvm_pip_vm.py +++ /dev/null @@ -1,27 +0,0 @@ -# This test covers version, variation, compilation from src, add_deps, -# add_deps_recursive, deps, post_deps - -import cmind as cm - -from pathlib import Path -import sys -import os - -sys.path.insert( - 1, - os.path.join( - Path(__file__).parent.parent.resolve(), - "script")) -import check as checks # noqa - -r = cm.access({'action': 'run', 'automation': 'script', 'tags': 'run,mlperf,inference,generate-run-cmds', 'adr': - {'python': {'name': 'mlperf', 'version_min': '3.8'}, 'tvm': {'tags': '_pip-install'}}, 'submitter': 'Community', - 'implementation': 'python', 'hw_name': 'default', 'model': 'resnet50', 'backend': 'tvm-onnx', 'device': 'cpu', 'scenario': 'Offline', - 'mode': 'accuracy', 'test_query_count': '5', 'clean': 'true', 'quiet': 'yes'}) -checks.check_return(r) - -r = cm.access({'action': 'run', 'automation': 'script', 'tags': 'run,mlperf,inference,generate-run-cmds,_submission,_short', 'adr': - {'python': {'name': 'mlperf', 'version_min': '3.8'}, 'tvm': {'tags': '_pip-install'}}, 'submitter': 'Community', - 'implementation': 'python', 'hw_name': 'default', 'model': 'resnet50', 'backend': 'tvm-onnx', 'device': 'cpu', 'scenario': 'Offline', - 'test_query_count': '500', 'clean': 'true', 'quiet': 'yes'}) -checks.check_return(r) diff --git a/script/test-cm-script-pipeline/COPYRIGHT.md b/script/test-cm-script-pipeline/COPYRIGHT.md deleted file mode 100644 index a059b0c49..000000000 --- a/script/test-cm-script-pipeline/COPYRIGHT.md +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright Notice - -© 2024-2025 MLCommons. All Rights Reserved. - -This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of the License can be obtained at: - -[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0) - -Unless required by applicable law or agreed to in writing, software distributed under the License is provided on an "AS IS" basis, without warranties or conditions of any kind, either express or implied. Please refer to the License for the specific language governing permissions and limitations under the License. diff --git a/script/test-cm-script-pipeline/README-extra.md b/script/test-cm-script-pipeline/README-extra.md deleted file mode 100644 index 480bea4f4..000000000 --- a/script/test-cm-script-pipeline/README-extra.md +++ /dev/null @@ -1,8 +0,0 @@ -# CM script - -This script prints internal pipeline run: - -```bash -cmr "test cm-script pipeline" -``` - diff --git a/script/test-cm-script-pipeline/README.md b/script/test-cm-script-pipeline/README.md deleted file mode 100644 index 1c6e7b38a..000000000 --- a/script/test-cm-script-pipeline/README.md +++ /dev/null @@ -1 +0,0 @@ -Please see [https://docs.mlcommons.org/cm4mlops/scripts/Tests/test-cm-script-pipeline](https://docs.mlcommons.org/cm4mlops/scripts/Tests/test-cm-script-pipeline) for the documentation of this CM script. diff --git a/script/test-cm-script-pipeline/customize.py b/script/test-cm-script-pipeline/customize.py deleted file mode 100644 index f91cfa581..000000000 --- a/script/test-cm-script-pipeline/customize.py +++ /dev/null @@ -1,40 +0,0 @@ -# Developers: Grigori Fursin - -from mlc import utils -import os - - -def preprocess(i): - - print('') - print('customize.py: preprocess') - print('') - - return {'return': 0} - - -def postprocess(i): - - automation = i['automation'] - run_script_input = i['run_script_input'] - env = i['env'] - - print('') - print('customize.py: postprocess') - print('') - - r = automation.run_native_script( - {'run_script_input': run_script_input, 'env': env, 'script_name': 'run2'}) - if r['return'] > 0: - return r - - return {'return': 0} - - -def detect_version(i): - - print('') - print('customize.py: detect_version') - print('') - - return {'return': 0} diff --git a/script/test-cm-script-pipeline/meta.yaml b/script/test-cm-script-pipeline/meta.yaml deleted file mode 100644 index 9a2327ae6..000000000 --- a/script/test-cm-script-pipeline/meta.yaml +++ /dev/null @@ -1,37 +0,0 @@ -alias: test-cm-script-pipeline -uid: ebe50aa281be4458 - -automation_alias: script -automation_uid: 5b4e0237da074764 - -category: Tests - -developers: "Grigori Fursin" - -tags: -- test -- cm-script -- pipeline - -cache: false - -deps: -- tags: print,any-text - env: - CM_PRINT_ANY_TEXT: "_cm.yaml: deps" - -prehook_deps: -- tags: print,any-text - env: - CM_PRINT_ANY_TEXT: "_cm.yaml: prehook_deps" - -posthook_deps: -- tags: print,any-text - env: - CM_PRINT_ANY_TEXT: "_cm.yaml: posthook_deps" - -post_deps: -- tags: print,any-text - env: - CM_PRINT_ANY_TEXT: "_cm.yaml: post_deps" - CM_PRINT_ANY_CM_ENV_KEYS: 'CM_TMP_CURRENT_SCRIPT_PATH,CM_TMP_CURRENT_PATH,CM_QUIET' diff --git a/script/test-cm-script-pipeline/run.bat b/script/test-cm-script-pipeline/run.bat deleted file mode 100644 index 3103960b7..000000000 --- a/script/test-cm-script-pipeline/run.bat +++ /dev/null @@ -1,5 +0,0 @@ -rem native script - -echo. -echo run.bat -echo. diff --git a/script/test-cm-script-pipeline/run.sh b/script/test-cm-script-pipeline/run.sh deleted file mode 100644 index 51936abac..000000000 --- a/script/test-cm-script-pipeline/run.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -echo "" -echo "run.sh" -echo "" diff --git a/script/test-cm-script-pipeline/run2.bat b/script/test-cm-script-pipeline/run2.bat deleted file mode 100644 index 120bd24a8..000000000 --- a/script/test-cm-script-pipeline/run2.bat +++ /dev/null @@ -1,5 +0,0 @@ -rem native script - -echo. -echo run2.bat -echo. diff --git a/script/test-cm-script-pipeline/run2.sh b/script/test-cm-script-pipeline/run2.sh deleted file mode 100644 index 21664817b..000000000 --- a/script/test-cm-script-pipeline/run2.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -echo "" -echo "run2.sh" -echo "" diff --git a/script/test-cm-scripts/COPYRIGHT.md b/script/test-cm-scripts/COPYRIGHT.md deleted file mode 100644 index a059b0c49..000000000 --- a/script/test-cm-scripts/COPYRIGHT.md +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright Notice - -© 2024-2025 MLCommons. All Rights Reserved. - -This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of the License can be obtained at: - -[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0) - -Unless required by applicable law or agreed to in writing, software distributed under the License is provided on an "AS IS" basis, without warranties or conditions of any kind, either express or implied. Please refer to the License for the specific language governing permissions and limitations under the License. diff --git a/script/test-cm-scripts/customize.py b/script/test-cm-scripts/customize.py deleted file mode 100644 index 3df1d0660..000000000 --- a/script/test-cm-scripts/customize.py +++ /dev/null @@ -1,24 +0,0 @@ -from mlc import utils -import os - - -def preprocess(i): - - os_info = i['os_info'] - - env = i['env'] - - meta = i['meta'] - - automation = i['automation'] - - quiet = (env.get('CM_QUIET', False) == 'yes') - - return {'return': 0} - - -def postprocess(i): - - env = i['env'] - - return {'return': 0} diff --git a/script/test-cm-scripts/meta.yaml b/script/test-cm-scripts/meta.yaml deleted file mode 100644 index b8b7a9c79..000000000 --- a/script/test-cm-scripts/meta.yaml +++ /dev/null @@ -1,31 +0,0 @@ -alias: test-cm-scripts -automation_alias: script -automation_uid: 5b4e0237da074764 -cache: false -tags: -- test -- test-scripts -- cm-test -env: - CM_VAR1: orig -const: - CM_CVAR1: orig -new_env_keys: - - CM_VAR* - - CM_CVAR* - -uid: 6fbe3884575c4e51 -variations: - v1: - env: - CM_VAR1: v1 - v2: - env: - CM_VAR1: v2 - CM_VAR2: v2 - const: - CM_VAR2: constv2 - v1,v2: - env: - CM_VAR1: combv1v2 - CM_VAR2: combv1v2 diff --git a/script/test-cm-scripts/run.bat b/script/test-cm-scripts/run.bat deleted file mode 100644 index 648302ca7..000000000 --- a/script/test-cm-scripts/run.bat +++ /dev/null @@ -1 +0,0 @@ -rem native script diff --git a/script/test-cm-scripts/run.sh b/script/test-cm-scripts/run.sh deleted file mode 100644 index 4c23c380e..000000000 --- a/script/test-cm-scripts/run.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -#CM Script location: ${CM_TMP_CURRENT_SCRIPT_PATH} - -#To export any variable -#echo "VARIABLE_NAME=VARIABLE_VALUE" >>tmp-run-env.out - -#${CM_PYTHON_BIN_WITH_PATH} contains the path to python binary if "get,python" is added as a dependency - -echo "Running: " -echo "${CM_RUN_CMD}" -echo "" - -if [[ ${CM_FAKE_RUN} != "yes" ]]; then - eval "${CM_RUN_CMD}" - test $? -eq 0 || exit 1 -fi diff --git a/script/test-debug/.vscode/launch.json b/script/test-debug/.vscode/launch.json deleted file mode 100644 index 49c4e19f0..000000000 --- a/script/test-debug/.vscode/launch.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "name": "Python Debugger: Remote Attach", - "type": "debugpy", - "request": "attach", - "connect": { - "host": "localhost", - "port": 5678 - }, - "pathMappings": [ - { - "localRoot": "${workspaceFolder}", - "remoteRoot": "${workspaceFolder}" - } - ] - } -} \ No newline at end of file diff --git a/script/test-debug/COPYRIGHT.md b/script/test-debug/COPYRIGHT.md deleted file mode 100644 index a059b0c49..000000000 --- a/script/test-debug/COPYRIGHT.md +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright Notice - -© 2024-2025 MLCommons. All Rights Reserved. - -This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of the License can be obtained at: - -[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0) - -Unless required by applicable law or agreed to in writing, software distributed under the License is provided on an "AS IS" basis, without warranties or conditions of any kind, either express or implied. Please refer to the License for the specific language governing permissions and limitations under the License. diff --git a/script/test-debug/README-extra.md b/script/test-debug/README-extra.md deleted file mode 100644 index 06a41746c..000000000 --- a/script/test-debug/README-extra.md +++ /dev/null @@ -1,20 +0,0 @@ -Demo of debugging CM scripts and wrapped apps with Visual Studio Code. - - -Debug customize.py using remote debugging and follow instructions on command line: - -```bash -cmr "test cm-debug" --debug_uid=8d96cd9fa4734204 -``` - -Debug Python application or tool wrapped by the CM script (see [python/main.py](python/main.py)): - -```bash -cmr "test cm-debug" --debug_uid=45a7c3a500d24a63 -``` - - - -Debug CM internals using standard Python debugging: -* Open _demo.py and start debugging using "Python File" default configuration. - diff --git a/script/test-debug/README.md b/script/test-debug/README.md deleted file mode 100644 index 7854c9e1d..000000000 --- a/script/test-debug/README.md +++ /dev/null @@ -1 +0,0 @@ -Please see [https://docs.mlcommons.org/cm4mlops/scripts/CM-interface-prototyping/test-debug](https://docs.mlcommons.org/cm4mlops/scripts/CM-interface-prototyping/test-debug) for the documentation of this CM script. diff --git a/script/test-debug/_demo.py b/script/test-debug/_demo.py deleted file mode 100644 index 878249a74..000000000 --- a/script/test-debug/_demo.py +++ /dev/null @@ -1,9 +0,0 @@ -# Developer: Grigori Fursin - -import cmind -import sys - -print(sys.executable) - -r = cmind.access('run script "test cm-debug"') -print(r) diff --git a/script/test-debug/customize.py b/script/test-debug/customize.py deleted file mode 100644 index 4c1388a1a..000000000 --- a/script/test-debug/customize.py +++ /dev/null @@ -1,40 +0,0 @@ -# Developer(s): Grigori Fursin - -import os - - -def preprocess(i): - - os_info = i['os_info'] - env = i['env'] - meta = i['meta'] - - print("********************************************************") - print('- Importing CM library ...') - import cmind - print(' SUCCESS!') - - cmind.utils.debug_here( - __file__, - port=5678, - text='Debugging customize.py!', - env=env, - env_debug_uid='8d96cd9fa4734204').breakpoint() - - print('') - print('- List CM repos ...') - print('') - r = cmind.access({'action': 'show', 'automation': 'repo', 'out': 'con'}) - print('') - print(' SUCCESS!') - print("********************************************************") - - return {'return': 0} - - -def postprocess(i): - - env = i['env'] - state = i['state'] - - return {'return': 0} diff --git a/script/test-debug/meta.yaml b/script/test-debug/meta.yaml deleted file mode 100644 index 8a4ab37aa..000000000 --- a/script/test-debug/meta.yaml +++ /dev/null @@ -1,29 +0,0 @@ -alias: test-debug -uid: 5ccd3d701a9144f9 - -automation_alias: script -automation_uid: 5b4e0237da074764 - -category: CM interface prototyping - -deps: - # Detect host OS features - - tags: detect,os - - # Detect host CPU features - - tags: detect,cpu - - # Get Python - - tags: get,python3 - names: - - python - - python3 - - # May need to use CM in automation recipes - - tags: get,generic-python-lib,_package.cmind - names: - - python-cmind - -tags: -- test -- cm-debug diff --git a/script/test-debug/python/.vscode/launch.json b/script/test-debug/python/.vscode/launch.json deleted file mode 100644 index c2dc39156..000000000 --- a/script/test-debug/python/.vscode/launch.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "name": "Python Debugger: Remote Attach", - "type": "debugpy", - "request": "attach", - "connect": { - "host": "localhost", - "port": 5678 - }, - "pathMappings": [ - { - "localRoot": "${workspaceFolder}", - "remoteRoot": "${workspaceFolder}" - } - ] - } - ] -} \ No newline at end of file diff --git a/script/test-debug/python/main.py b/script/test-debug/python/main.py deleted file mode 100644 index a00bf6b34..000000000 --- a/script/test-debug/python/main.py +++ /dev/null @@ -1,26 +0,0 @@ -""" -Testing CM debugging - -# Developer(s): Grigori Fursin -""" - -import cmind.utils -import os -import json - -print("Hello World 1") - -env = os.environ - -print('') -print(json.dumps(dict(env), indent=2)) - -# Import cmind to test break points -if os.environ.get('CM_TMP_DEBUG_UID', '') == '45a7c3a500d24a63': - cmind.utils.debug_here( - __file__, - port=5678, - text='Debugging main.py!').breakpoint() - -print('') -print("Hello World 2") diff --git a/script/test-debug/run.bat b/script/test-debug/run.bat deleted file mode 100644 index d45522c1d..000000000 --- a/script/test-debug/run.bat +++ /dev/null @@ -1,6 +0,0 @@ -echo ======================================================== - -%CM_PYTHON_BIN_WITH_PATH% %CM_TMP_CURRENT_SCRIPT_PATH%\python\main.py -IF %ERRORLEVEL% NEQ 0 EXIT %ERRORLEVEL% - -echo ======================================================== diff --git a/script/test-debug/run.sh b/script/test-debug/run.sh deleted file mode 100644 index ee43341da..000000000 --- a/script/test-debug/run.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -echo "========================================================" - -${CM_PYTHON_BIN_WITH_PATH} ${CM_TMP_CURRENT_SCRIPT_PATH}/python/main.py -test $? -eq 0 || exit 1 - -echo ======================================================== diff --git a/script/test-download-and-extract-artifacts/COPYRIGHT.md b/script/test-download-and-extract-artifacts/COPYRIGHT.md deleted file mode 100644 index 2d6a2775e..000000000 --- a/script/test-download-and-extract-artifacts/COPYRIGHT.md +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright Notice - -© 2023-2025 MLCommons. All Rights Reserved. - -This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of the License can be obtained at: - -[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0) - -Unless required by applicable law or agreed to in writing, software distributed under the License is provided on an "AS IS" basis, without warranties or conditions of any kind, either express or implied. Please refer to the License for the specific language governing permissions and limitations under the License. diff --git a/script/test-download-and-extract-artifacts/README-extra.md b/script/test-download-and-extract-artifacts/README-extra.md deleted file mode 100644 index 582991f6d..000000000 --- a/script/test-download-and-extract-artifacts/README-extra.md +++ /dev/null @@ -1 +0,0 @@ -# CM script diff --git a/script/test-download-and-extract-artifacts/README.md b/script/test-download-and-extract-artifacts/README.md deleted file mode 100644 index 3a88769c5..000000000 --- a/script/test-download-and-extract-artifacts/README.md +++ /dev/null @@ -1 +0,0 @@ -Please see [https://docs.mlcommons.org/cm4mlops/scripts/Tests/test-download-and-extract-artifacts](https://docs.mlcommons.org/cm4mlops/scripts/Tests/test-download-and-extract-artifacts) for the documentation of this CM script. diff --git a/script/test-download-and-extract-artifacts/customize.py b/script/test-download-and-extract-artifacts/customize.py deleted file mode 100644 index 3df1d0660..000000000 --- a/script/test-download-and-extract-artifacts/customize.py +++ /dev/null @@ -1,24 +0,0 @@ -from mlc import utils -import os - - -def preprocess(i): - - os_info = i['os_info'] - - env = i['env'] - - meta = i['meta'] - - automation = i['automation'] - - quiet = (env.get('CM_QUIET', False) == 'yes') - - return {'return': 0} - - -def postprocess(i): - - env = i['env'] - - return {'return': 0} diff --git a/script/test-download-and-extract-artifacts/meta.yaml b/script/test-download-and-extract-artifacts/meta.yaml deleted file mode 100644 index c1961ba30..000000000 --- a/script/test-download-and-extract-artifacts/meta.yaml +++ /dev/null @@ -1,31 +0,0 @@ -alias: test-download-and-extract-artifacts -uid: 51dde7580b404b27 - -automation_alias: script -automation_uid: 5b4e0237da074764 - -cache: false - -category: Tests - -deps: -- tags: download,file,_url.https://zenodo.org/record/4735647/files/resnet50_v1.onnx - env: - CM_DOWNLOAD_FINAL_ENV_NAME: CM_REPRODUCE_PAPER_XYZ - CM_DOWNLOAD_CHECKSUM: - force_cache: true - extra_cache_tags: reproduce,paper,artifact,zenodo,xyz -- tags: download-and-extract,_extract,_url.https://zenodo.org/record/5597155/files/3dunet_kits19_128x128x128.tf.zip?download=1 - env: - CM_DOWNLOAD_FINAL_ENV_NAME: CM_REPRODUCE_PAPER_XYZ2 - CM_EXTRACT_FINAL_ENV_NAME: CM_REPRODUCE_PAPER_XYZ2_EXTRACTED -# CM_DOWNLOAD_CHECKSUM: - force_cache: true - extra_cache_tags: reproduce,paper,artifact,zenodo,xyz2 - -new_env_keys: - - CM_REPRODUCE_PAPER_XYZ* - -tags: -- test -- download-and-extract-artifacts diff --git a/script/test-download-and-extract-artifacts/run.bat b/script/test-download-and-extract-artifacts/run.bat deleted file mode 100644 index 648302ca7..000000000 --- a/script/test-download-and-extract-artifacts/run.bat +++ /dev/null @@ -1 +0,0 @@ -rem native script diff --git a/script/test-download-and-extract-artifacts/run.sh b/script/test-download-and-extract-artifacts/run.sh deleted file mode 100644 index 3a584c10c..000000000 --- a/script/test-download-and-extract-artifacts/run.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash - -#CM Script location: ${CM_TMP_CURRENT_SCRIPT_PATH} - -#To export any variable -#echo "VARIABLE_NAME=VARIABLE_VALUE" >>tmp-run-env.out - -#${CM_PYTHON_BIN_WITH_PATH} contains the path to python binary if "get,python" is added as a dependency - - - -function exit_if_error() { - test $? -eq 0 || exit $? -} - -function run() { - echo "Running: " - echo "$1" - echo "" - if [[ ${CM_FAKE_RUN} != 'yes' ]]; then - eval "$1" - exit_if_error - fi -} - -#Add your run commands here... -# run "$CM_RUN_CMD" diff --git a/script/test-mlperf-inference-retinanet/COPYRIGHT.md b/script/test-mlperf-inference-retinanet/COPYRIGHT.md deleted file mode 100644 index a059b0c49..000000000 --- a/script/test-mlperf-inference-retinanet/COPYRIGHT.md +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright Notice - -© 2024-2025 MLCommons. All Rights Reserved. - -This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of the License can be obtained at: - -[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0) - -Unless required by applicable law or agreed to in writing, software distributed under the License is provided on an "AS IS" basis, without warranties or conditions of any kind, either express or implied. Please refer to the License for the specific language governing permissions and limitations under the License. diff --git a/script/test-mlperf-inference-retinanet/README.md b/script/test-mlperf-inference-retinanet/README.md deleted file mode 100644 index 79f9d851b..000000000 --- a/script/test-mlperf-inference-retinanet/README.md +++ /dev/null @@ -1 +0,0 @@ -Please see [https://docs.mlcommons.org/cm4mlops/scripts/CM-interface-prototyping/test-mlperf-inference-retinanet](https://docs.mlcommons.org/cm4mlops/scripts/CM-interface-prototyping/test-mlperf-inference-retinanet) for the documentation of this CM script. diff --git a/script/test-mlperf-inference-retinanet/customize.py b/script/test-mlperf-inference-retinanet/customize.py deleted file mode 100644 index bc9170735..000000000 --- a/script/test-mlperf-inference-retinanet/customize.py +++ /dev/null @@ -1,19 +0,0 @@ -from mlc import utils -import os - - -def preprocess(i): - - os_info = i['os_info'] - env = i['env'] - meta = i['meta'] - - return {'return': 0} - - -def postprocess(i): - - env = i['env'] - state = i['state'] - - return {'return': 0} diff --git a/script/test-mlperf-inference-retinanet/meta.yaml b/script/test-mlperf-inference-retinanet/meta.yaml deleted file mode 100644 index fd6a8607c..000000000 --- a/script/test-mlperf-inference-retinanet/meta.yaml +++ /dev/null @@ -1,28 +0,0 @@ -alias: test-mlperf-inference-retinanet -automation_alias: script -automation_uid: 5b4e0237da074764 -category: CM interface prototyping -deps: -- tags: get,sys-utils-cm -- names: - - python - - python3 - tags: get,python3 -- tags: get,generic-python-lib,_requests -- names: - - loadgen - - mlperf-inference-loadgen - tags: get,loadgen -- force_env_keys: - - CM_GIT_* - names: - - inference-src - tags: mlperf,inference,source -- tags: get,dataset,open-images,original -- tags: get,raw,ml-model,retinanet -tags: -- test -- mlperf-inference-win -- retinanet -- windows -uid: 1cedbc3b642a403a diff --git a/script/test-mlperf-inference-retinanet/run.bat b/script/test-mlperf-inference-retinanet/run.bat deleted file mode 100644 index 38970bc0e..000000000 --- a/script/test-mlperf-inference-retinanet/run.bat +++ /dev/null @@ -1,8 +0,0 @@ -echo. - -set CUR_DIR=%cd% -set SCRIPT_DIR=%CM_TMP_CURRENT_SCRIPT_PATH% - -cd %CM_MLPERF_INFERENCE_CLASSIFICATION_AND_DETECTION_PATH% - -%CM_PYTHON_BIN_WITH_PATH% python/main.py --profile retinanet-onnxruntime --scenario Offline --model %CM_ML_MODEL_FILE_WITH_PATH% --dataset-path %CM_DATASET_PATH_ROOT%\validation\data --accuracy diff --git a/script/test-mlperf-inference-retinanet/run.sh b/script/test-mlperf-inference-retinanet/run.sh deleted file mode 100644 index b43737407..000000000 --- a/script/test-mlperf-inference-retinanet/run.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -echo "" - -cd ${CM_MLPERF_INFERENCE_CLASSIFICATION_AND_DETECTION_PATH} - -ln -s ${CM_DATASET_PATH_ROOT}/annotations ${CM_DATASET_PATH_ROOT}/validation/data/annotations - -${CM_PYTHON_BIN_WITH_PATH} python/main.py --profile retinanet-onnxruntime --scenario Offline --model ${CM_ML_MODEL_FILE_WITH_PATH} --dataset-path ${CM_DATASET_PATH_ROOT}/validation/data --accuracy From b76d063ac6e45dd0c5e6eece241034769cfd852a Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Thu, 23 Jan 2025 05:38:19 +0530 Subject: [PATCH 78/84] Fixes to github tests --- .github/scripts/process_individual_tests.py | 10 +++++----- .github/workflows/test-mlc-tutorial-retinanet.yml | 4 ++-- .github/workflows/test-mlperf-inference-resnet50.yml | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/scripts/process_individual_tests.py b/.github/scripts/process_individual_tests.py index 8012d097b..297e7a1dc 100644 --- a/.github/scripts/process_individual_tests.py +++ b/.github/scripts/process_individual_tests.py @@ -1,6 +1,6 @@ import sys import os -import cmind as cm +import mlc import check as checks import json import yaml @@ -11,7 +11,7 @@ print(file) if not os.path.isfile(file) or not "script" in file: continue - if not file.endswith("_cm.json") and not file.endswith("_cm.yaml"): + if not file.endswith("meta.json") and not file.endswith("meta.yaml"): continue script_path = os.path.dirname(file) f = open(file) @@ -33,6 +33,6 @@ if os.environ.get('TEST_INPUT_INDEX', '') != '': ii['test_input_index'] = os.environ['TEST_INPUT_INDEX'] print(ii) - r = cm.access(ii) - - checks.check_return(r) + ret = mlc.access(ii) + if ret['return'] > 0: + raise Exception(r['error']) diff --git a/.github/workflows/test-mlc-tutorial-retinanet.yml b/.github/workflows/test-mlc-tutorial-retinanet.yml index c20c7c02c..af40cd023 100644 --- a/.github/workflows/test-mlc-tutorial-retinanet.yml +++ b/.github/workflows/test-mlc-tutorial-retinanet.yml @@ -37,6 +37,6 @@ jobs: mlcr --tags=app,mlperf,inference,generic,_cpp,_retinanet,_onnxruntime,_cpu --adr.python.version_min=3.8 --adr.compiler.tags=gcc --adr.openimages-preprocessed.tags=_50 --scenario=Offline --mode=performance --test_query_count=10 --rerun --quiet - mlcr --tags=install,python-venv --version=3.10.8 --name=mlperf + mlcr --tags=install,python-venv --version=3.10.8 --name=mlperf --quiet - mlcr --tags=run,mlperf,inference,generate-run-cmds,_submission,_short --adr.python.name=mlperf --adr.python.version_min=3.8 --adr.compiler.tags=gcc --adr.openimages-preprocessed.tags=_50 --submitter=Community --implementation=cpp --hw_name=default --model=retinanet --backend=onnxruntime --device=cpu --scenario=Offline + mlcr --tags=run,mlperf,inference,generate-run-cmds,_submission,_short --adr.python.name=mlperf --adr.python.version_min=3.8 --adr.compiler.tags=gcc --adr.openimages-preprocessed.tags=_50 --submitter=Community --implementation=cpp --hw_name=default --model=retinanet --backend=onnxruntime --device=cpu --scenario=Offline --quiet diff --git a/.github/workflows/test-mlperf-inference-resnet50.yml b/.github/workflows/test-mlperf-inference-resnet50.yml index fc57f89b8..3a22167ef 100644 --- a/.github/workflows/test-mlperf-inference-resnet50.yml +++ b/.github/workflows/test-mlperf-inference-resnet50.yml @@ -3,7 +3,7 @@ name: MLPerf inference ResNet50 on: - pull_request: + pull_request_target: branches: [ "main", "dev" ] paths: - '.github/workflows/test-mlperf-inference-resnet50.yml' From 69fb6b7884363804dc26c9e2f527d6e64e302961 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Thu, 23 Jan 2025 05:48:24 +0530 Subject: [PATCH 79/84] Fixes to github tests --- .github/scripts/process_individual_tests.py | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/scripts/process_individual_tests.py b/.github/scripts/process_individual_tests.py index 297e7a1dc..a5dab2ea0 100644 --- a/.github/scripts/process_individual_tests.py +++ b/.github/scripts/process_individual_tests.py @@ -1,7 +1,6 @@ import sys import os import mlc -import check as checks import json import yaml From d210baa9909c0a919d81ba63a26728fb81fc15cc Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Thu, 23 Jan 2025 05:53:06 +0530 Subject: [PATCH 80/84] Fixes to github tests --- .github/scripts/process_individual_tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/process_individual_tests.py b/.github/scripts/process_individual_tests.py index a5dab2ea0..d328aad63 100644 --- a/.github/scripts/process_individual_tests.py +++ b/.github/scripts/process_individual_tests.py @@ -23,7 +23,7 @@ uid = data['uid'] ii = { - 'action': 'test', 'automation': 'script', 'artifact': uid, 'quiet': 'yes', 'out': 'con' + 'action': 'test', 'target': 'script', 'item': uid, 'quiet': 'yes', 'out': 'con' } if os.environ.get('DOCKER_CM_REPO', '') != '': ii['docker_cm_repo'] = os.environ['DOCKER_CM_REPO'] From 20b3e17c0c3b492e399fc2a1aa0cdce0bc73a800 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Thu, 23 Jan 2025 06:15:17 +0530 Subject: [PATCH 81/84] Fix script test --- automation/script/module.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/automation/script/module.py b/automation/script/module.py index cee4d0df2..52b6cfa92 100644 --- a/automation/script/module.py +++ b/automation/script/module.py @@ -2917,9 +2917,6 @@ def test(self, i): import json - # Check parsed automation - if 'parsed_automation' not in i: - return {'return': 1, 'error': 'automation is not specified'} console = i.get('out') == 'con' From 08c21b6e6d5680b684828af0071c1ac48377e129 Mon Sep 17 00:00:00 2001 From: arjunsuresh Date: Thu, 23 Jan 2025 00:45:42 +0000 Subject: [PATCH 82/84] [Automated Commit] Format Codebase --- automation/script/module.py | 1 - 1 file changed, 1 deletion(-) diff --git a/automation/script/module.py b/automation/script/module.py index 52b6cfa92..8d169aab2 100644 --- a/automation/script/module.py +++ b/automation/script/module.py @@ -2917,7 +2917,6 @@ def test(self, i): import json - console = i.get('out') == 'con' # Find CM artifact(s) From affcf7c5fdd31d380e12afa597e598ba69b7eeea Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Thu, 23 Jan 2025 06:18:21 +0530 Subject: [PATCH 83/84] Fix script test --- automation/script/module.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/automation/script/module.py b/automation/script/module.py index 8d169aab2..bceca05d3 100644 --- a/automation/script/module.py +++ b/automation/script/module.py @@ -2919,7 +2919,7 @@ def test(self, i): console = i.get('out') == 'con' - # Find CM artifact(s) + # Find script item(s) i['out'] = None r = self.search(i) @@ -2971,7 +2971,7 @@ def test(self, i): continue ii = {'action': 'run', - 'automation': 'script', + 'target': 'script', 'quiet': i.get('quiet'), } test_all_variations = run_input.get( From 9029855411a94e4cf124a4e6704c8eae50af8e0a Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Thu, 23 Jan 2025 06:47:22 +0530 Subject: [PATCH 84/84] Dont force gcc for ABTF test --- .github/workflows/test-mlperf-inference-abtf-poc.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-mlperf-inference-abtf-poc.yml b/.github/workflows/test-mlperf-inference-abtf-poc.yml index d9da5830d..5e4399f7e 100644 --- a/.github/workflows/test-mlperf-inference-abtf-poc.yml +++ b/.github/workflows/test-mlperf-inference-abtf-poc.yml @@ -21,7 +21,7 @@ jobs: backend: [ "pytorch" ] implementation: [ "python" ] docker: [ "", " --docker --docker_it=no --docker_cm_repo=mlcommons@mlperf-automations --docker_cm_repo_branch=dev --docker_dt=yes" ] - extra-args: [ "--adr.compiler.tags=gcc", "--env.CM_MLPERF_LOADGEN_BUILD_FROM_SRC=off" ] + extra-args: [ "", "--env.CM_MLPERF_LOADGEN_BUILD_FROM_SRC=off" ] exclude: - os: ubuntu-24.04 python-version: "3.8"