-
Notifications
You must be signed in to change notification settings - Fork 24
Add script to get the endpoints repo #713
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
anandhu-eng
wants to merge
10
commits into
dev
Choose a base branch
from
add-endpoints-src
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+160
β0
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
94efae7
Add script to get endpoints repo
anandhu-eng 9284b9a
fix tag
anandhu-eng b104d79
Merge branch 'dev' into add-endpoints-src
arjunsuresh aab4893
Merge branch 'dev' into add-endpoints-src
arjunsuresh 82a31d5
Merge branch 'dev' into add-endpoints-src
arjunsuresh f4aef05
Merge branch 'dev' into add-endpoints-src
anandhu-eng 101c267
Merge branch 'dev' into add-endpoints-src
arjunsuresh 830e20e
Merge branch 'dev' into add-endpoints-src
arjunsuresh d6d989c
Merge branch 'dev' into add-endpoints-src
arjunsuresh c71264c
Merge branch 'dev' into add-endpoints-src
arjunsuresh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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", '') == '': | ||
| 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: | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. are we using submodules?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
|
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.