Skip to content
Open
9 changes: 9 additions & 0 deletions script/get-mlperf-endpoints-src/COPYRIGHT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Copyright Notice

Β© 2025-2026 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.
57 changes: 57 additions & 0 deletions script/get-mlperf-endpoints-src/customize.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
from mlc import utils
from utils import is_true
import os
import shutil


def preprocess(i):

os_info = i['os_info']

env = i['env']
meta = i['meta']

script_path = i['run_script_input']['path']

if env.get("MLC_MLPERF_LAST_RELEASE", '') == '':
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably need a better variable here.

env["MLC_MLPERF_LAST_RELEASE"] = "v5.1"

if 'MLC_GIT_DEPTH' not in env:
env['MLC_GIT_DEPTH'] = ''

if 'MLC_GIT_RECURSE_SUBMODULES' not in env:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are we using submodules?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not yet, just placed it in case endpoints need any submodules in future as we integrate accuracy evaluation modules

env['MLC_GIT_RECURSE_SUBMODULES'] = ''

submodules = []

# will add submodules in future if needed, for now none
possible_submodules = {
}

for submodule in possible_submodules:
env_name = submodule.upper().replace("-", "_")
if is_true(env.get("MLC_SUBMODULE_" + env_name)):
submodules.append(possible_submodules[submodule])

env['MLC_GIT_SUBMODULES'] = ",".join(submodules)

if env.get('MLC_GIT_PATCH_FILENAME', '') != '':
patch_file_name = env['MLC_GIT_PATCH_FILENAME']
env['MLC_GIT_PATCH_FILEPATHS'] = os.path.join(
script_path, 'patch', patch_file_name)

return {'return': 0}


def postprocess(i):

env = i['env']
state = i['state']

endpoints_root = env['MLC_MLPERF_INFERENCE_ENDPOINTS_SOURCE']

env['MLC_GET_DEPENDENT_CACHED_PATH'] = endpoints_root

env['+PYTHONPATH'] = []

return {'return': 0}
94 changes: 94 additions & 0 deletions script/get-mlperf-endpoints-src/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
alias: get-mlperf-endpoints-src
automation_alias: script
automation_uid: 5b4e0237da074764
cache: true
category: MLPerf benchmark support
default_env:
MLC_GIT_CHECKOUT_FOLDER: endpoints
MLC_GIT_DEPTH: --depth 4
MLC_GIT_PATCH: 'no'
MLC_GIT_RECURSE_SUBMODULES: ''
deps:
- tags: detect,os
- names:
- python
- python3
tags: get,python3
new_env_keys:
- MLC_MLPERF_INFERENCE_ENDPOINTS_SOURCE
- MLC_MLPERF_INFERENCE_ENDPOINTS_SOURCE_VERSION
- MLC_MLPERF_LAST_RELEASE
- +PYTHONPATH
prehook_deps:
- env:
MLC_GIT_CHECKOUT_PATH_ENV_NAME: MLC_MLPERF_INFERENCE_ENDPOINTS_SOURCE
extra_cache_tags: endpoints,src
force_env_keys:
- MLC_GIT_*
names:
- endpoints-git-repo
tags: get,git,repo
update_tags_from_env_with_prefix:
_branch.:
- MLC_GIT_CHECKOUT
_repo.:
- MLC_GIT_URL
_sha.:
- MLC_GIT_SHA
_submodules.:
- MLC_GIT_SUBMODULES
print_env_at_the_end_disabled:
MLC_MLPERF_INFERENCE_ENDPOINTS_SOURCE: Path to MLPerf endpoints benchmark sources
tags:
- get-mlperf-endpoints-src
uid: 82c6b66389b24322
variations:
mlcommons:
default: true
env:
MLC_GIT_URL: https://github.com/mlcommons/endpoints
group: repo
main:
default: true
env:
MLC_GIT_CHECKOUT: main
group: checkout
branch.#:
env:
MLC_GIT_CHECKOUT: '#'
MLC_MLPERF_INFERENCE_ENDPOINTS_SOURCE_VERSION: 'custom'
group: checkout
repo.#:
env:
MLC_GIT_URL: '#'
MLC_MLPERF_INFERENCE_ENDPOINTS_SOURCE_VERSION: 'custom'
group: repo
submodules.#:
env:
MLC_GIT_SUBMODULES: '#'
sha.#:
env:
MLC_GIT_SHA: '#'
group: checkout
full-history:
env:
MLC_GIT_DEPTH: ''
group: git-history
no-recurse-submodules:
env:
MLC_GIT_RECURSE_SUBMODULES: ''
patch:
ad:
inference-git-repo:
tags: _patch
env:
MLC_GIT_PATCH: 'yes'
recurse-submodules:
env:
MLC_GIT_RECURSE_SUBMODULES: ' --recurse-submodules'
short-history:
default: true
env:
MLC_GIT_DEPTH: --depth 10
group: git-history

Loading