Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
1b4bde4
Update action.py
arjunsuresh Jun 14, 2025
1b6e4dc
Update action.py
arjunsuresh Jun 14, 2025
3213e05
Update mlperf-inference-bert.yml
arjunsuresh Jun 14, 2025
1d27cd3
Version update
arjunsuresh Jun 14, 2025
0a3eb76
Update action.py | Fix search by folder name (#156)
arjunsuresh Jun 14, 2025
2059099
mlc-log.txt -> .mlc-log.txt
arjunsuresh Jun 15, 2025
145c087
Merge branch 'dev' into dev
arjunsuresh Jun 15, 2025
cae4667
Merge from GO (#157)
arjunsuresh Jun 16, 2025
1bdfb9b
Added doc action for script target
arjunsuresh Jun 25, 2025
e429553
Merge branch 'dev' into dev
arjunsuresh Jun 25, 2025
3a8179d
Added doc action for script target
arjunsuresh Jun 25, 2025
ce4dd0c
Merge pull request #158 from GATEOverflow/dev
anandhu-eng Jul 14, 2025
b0f7449
Changes for supporting lint in MLC (#161)
anandhu-eng Jul 15, 2025
38f3369
Update mkdocs.yml
arjunsuresh Jul 15, 2025
ad75ef0
Fix trailing / issue for mlc add repo (#163)
arjunsuresh Jul 21, 2025
8a4d84a
Create pull_request_template.md (#162)
anandhu-eng Jul 22, 2025
08ddf4f
* Fixes #165, add support for exact_tags_search
arjunsuresh Jul 27, 2025
cf02729
Fix Windows install instructions (#166)
arjunsuresh Jul 30, 2025
09e08d5
cleaned & tested
sinanshamsudheen Aug 2, 2025
f3fcf50
Merge branch 'dev' into issue-141
sinanshamsudheen Aug 2, 2025
08f9166
Fixes for help, support --all in search
arjunsuresh Aug 17, 2025
940c151
Update execution-flow.md
arjunsuresh Aug 17, 2025
46dc484
Merge branch 'dev' into dev
arjunsuresh Aug 17, 2025
1ebfe71
Merge pull request #169 from GATEOverflow/dev
arjunsuresh Aug 17, 2025
9e23acf
removed describe function
sinanshamsudheen Aug 23, 2025
8158c35
Merge branch 'dev' into issue-141
anandhu-eng Aug 23, 2025
14d935a
Merge pull request #168 from sinanshamsudheen/issue-141
anandhu-eng Aug 23, 2025
c0ba5ea
Create codeql.yml
arjunsuresh Sep 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
## ✅ PR Checklist

- [ ] Target branch is `dev`

📌 Note: PRs must be raised against `dev`. Do not commit directly to `main`.

### ✅ Testing & CI
- [ ] Have tested the changes in my local environment, else have properly conveyed in the PR description
- [ ] The change includes a GitHub Action to test the script(if it is possible to be added).
- [ ] No existing GitHub Actions are failing because of this change.

### 📚 Documentation
- [ ] README or help docs are updated for new features or changes.
- [ ] CLI help messages are meaningful and complete.

### 📁 File Hygiene & Output Handling
- [ ] No unintended files (e.g., logs, cache, temp files, __pycache__, output folders) are committed.

### 🛡️ Safety & Security
- [ ] No secrets or credentials are committed.
- [ ] Paths, shell commands, and environment handling are safe and portable.

### 🙌 Contribution Hygiene
- [ ] PR title and description are concise and clearly state the purpose of the change.
- [ ] Related issues (if any) are properly referenced using `Fixes #` or `Closes #`.
- [ ] All reviewer feedback has been addressed.
100 changes: 100 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL Advanced"

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: '43 6 * * 0'

jobs:
analyze:
name: Analyze (${{ matrix.language }})
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners (GitHub.com only)
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
permissions:
# required for all workflows
security-events: write

# required to fetch internal or private CodeQL packs
packages: read

# only required for workflows in private repositories
actions: read
contents: read

strategy:
fail-fast: false
matrix:
include:
- language: actions
build-mode: none
- language: python
build-mode: none
# CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'rust', 'swift'
# Use `c-cpp` to analyze code written in C, C++ or both
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Checkout repository
uses: actions/checkout@v4

# Add any setup steps before running the `github/codeql-action/init` action.
# This includes steps like installing compilers or runtimes (`actions/setup-node`
# or others). This is typically only required for manual builds.
# - name: Setup runtime (example)
# uses: actions/setup-example@v1

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality

# If the analyze step fails for one of the languages you are analyzing with
# "We were unable to automatically build your code", modify the matrix above
# to set the build mode to "manual" for that language. Then modify this step
# to build your code.
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
- if: matrix.build-mode == 'manual'
shell: bash
run: |
echo 'If you are using a "manual" build mode for one or more of the' \
'languages you are analyzing, replace this with the commands to build' \
'your code, for example:'
echo ' make bootstrap'
echo ' make release'
exit 1

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
2 changes: 1 addition & 1 deletion .github/workflows/mlperf-inference-bert.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: MLPerf inference bert (deepsparse, tf, onnxruntime, pytorch)

on:
pull_request:
branches: [ "main", "dev" ]
branches: [ "main_off", "dev_off" ]
paths:
- '.github/workflows/test-mlperf-inference-bert-deepsparse-tf-onnxruntime-pytorch.yml'
- '**'
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.8
1.1.0
14 changes: 11 additions & 3 deletions docs/install/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,11 @@ This step is not mandatory. But the latest `pip` install requires this or else w

=== "Windows"
```bash
python3 -m venv mlcflow
python -m venv mlcflow
mlcflow\Scripts\activate.bat
```
Run as Administrator
```bash
git config --system core.longpaths true
```

Expand All @@ -60,9 +63,14 @@ If you are not using virtual ENV for installation, the latest `pip` install requ
```bash
pip install mlcflow
```

## Pull the Automation Repo
```bash
mlc pull repo mlcommons@mlperf-automations
```
* If you are forking https://github.com/mlcommons/mlperf-automations you can substitute the above command by `mlc pull repo <your_github_username>@mlperf-automations`.

!!! tip
If you want to pull the latest changes (recommended), please do `mlc pull repo` after the installation.
If you want to pull the latest changes (recommended), please do `mlc pull repo` periodically.


Now, you are ready to use the `mlc` commands. Currently, `mlc` is being used to automate the benchmark runs for:
Expand Down
9 changes: 5 additions & 4 deletions docs/targets/script/execution-flow.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ When we run an MLC script we can also pass inputs to it and any input added in `
We can use `skip_if_env` dictionary inside any `deps`, `prehook_deps`, `posthook_deps` or `post_deps` to make its execution conditional

### Versions
We can specify any specific version of a script using `version`. `version_max` and `version_min` are also possible options.
We can specify any specific version of a script using `version`. `version_max`, `version_min` and `version_max_usable` are also possible options.

* When `version_min` is given, any version above this if present in the cache or detected in the system can be chosen. If nothing is detected `default_version` if present and if above `version_min` will be used for installation. Otherwise `version_min` will be used as `version`.
* When `version_min` is given, any version above this if present in the cache or detected in the system can be chosen. If nothing is detected `default_version` if present and if above `version_min` will be used for installation. Otherwise `version_max_usable` if present or else `version_min` will be used as `version`.

* When `version_max` is given, any version below this if present in the cache or detected in the system can be chosen. If nothing is detected `default_version` if present and if below `version_max` will be used for installation. Otherwise `version_max_usable` (additional needed input for `version_max`) will be used as `version`.

### Variations
* Variations are used to customize MLC script and each unique combination of variations uses a unique cache entry. Each variation can turn on `env` keys also any other meta including dependencies specific to it. Variations are turned on like tags but with a `_` prefix. For example, if a script is having tags `"get,myscript"`, to call the variation `"test"` inside it, we have to use tags `"get,myscript,_test"`.
* Variations are used to customize MLC script and each set of variations uses a unique cache entry. A variation can turn on `env` keys and any other meta including dependencies specific to it. Variations are turned on like tags but with a `_` prefix. For example, if a script is having tags `"get,myscript"`, to call the variation `"test"` inside it, we can use tags `"get,myscript,_test"`.

#### Variation groups
`group` is a key to map variations into a group and at any time only one variation from a group can be used in the variation tags. For example, both `cpu` and `cuda` can be two variations under the `device` group, but user can at any time use either `cpu` or `cuda` as variation tags but not both.
Expand All @@ -63,6 +63,7 @@ Sometimes it is difficult to add all variations needed for a script like say `ba
* Similarly we can avoid any env key from being passed to a given dependency by adding the prefix of the key in the `clean_env_keys` list of the concerned dependency.
* `--input` is automatically converted to `MLC_INPUT` env key
* `version` is converted to `MLC_VERSION`, ``version_min` to `MLC_VERSION_MIN` and `version_max` to `MLC_VERSION_MAX`
* `mlc
* If `env['MLC_GH_TOKEN']=TOKEN_VALUE` is set then git URLs (specified by `MLC_GIT_URL`) are changed to add this token.
* If `env['MLC_GIT_SSH']=yes`, then git URLs are changed to SSH from HTTPS.

Expand Down
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
site_name: MLCFlow Documentation
repo_url: https://github.com/mlcommons/mlcflow
site_url: https://docs.mlcommons.org/mlcflow
theme:
name: material
logo: img/logo_v2.svg
Expand Down
10 changes: 5 additions & 5 deletions mlc/action.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ class Action:
logger = None
local_repo = None
current_repo_path = None
#mlc = None
repos = [] #list of Repo objects

# Main access function to simulate a Python interface for CLI
Expand Down Expand Up @@ -167,7 +166,7 @@ def load_repos(self):


def __init__(self):
setup_logging(log_path=os.getcwd(),log_file='mlc-log.txt')
setup_logging(log_path=os.getcwd(), log_file='.mlc-log.txt')
self.logger = logger

temp_repo = os.environ.get('MLC_REPOS','').strip()
Expand Down Expand Up @@ -654,6 +653,7 @@ def search(self, i):
uid = i.get("uid")
alias = i.get("alias")
item_repo = i.get('item_repo')
exact_tags_match = i.get('exact_tags_match', False)
fetch_all = True if i.get('fetch_all') else False

# For targets like cache, sometimes user would need to clear the entire cache folder present in the system
Expand Down Expand Up @@ -707,13 +707,13 @@ def search(self, i):
for res in target_index:
if os.path.basename(res["path"]) == folder_name:
it = Item(res['path'], res['repo'])
#result.append(it)
result.append(it)
else:
tags = i.get("tags")
if tags:
tags_split = tags.split(",")
else:
return {"return":1, "error": f"Tags are not specifeid for completing the specific action"}
return {"return":1, "error": f"Tags are not specified for completing the requested action"}
if target == "script":
non_variation_tags = [t for t in tags_split if not t.startswith("_")]
tags_to_match = non_variation_tags
Expand All @@ -726,7 +726,7 @@ def search(self, i):
p_tags = list(set(tags_to_match) - set(n_tags_))
for res in target_index:
c_tags = res["tags"]
if set(p_tags).issubset(set(c_tags)) and set(n_tags).isdisjoint(set(c_tags)):
if (exact_tags_match and set(p_tags) == set(c_tags)) or (not exact_tags_match and set(p_tags).issubset(set(c_tags)) and set(n_tags).isdisjoint(set(c_tags))):
it = Item(res['path'], res['repo'])
result.append(it)
return {'return': 0, 'list': result}
Expand Down
2 changes: 1 addition & 1 deletion mlc/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def format(self, record):


# Set up logging configuration
def setup_logging(log_path = os.getcwd(),log_file = 'mlc-log.txt'):
def setup_logging(log_path = os.getcwd(), log_file = '.mlc-log.txt'):

if not logger.hasHandlers():
logFormatter = ColoredFormatter('[%(asctime)s %(filename)s:%(lineno)d %(levelname)s] - %(message)s')
Expand Down
15 changes: 8 additions & 7 deletions mlc/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,12 @@ def search(self, i):
uid = item_split[1]
else:
uid = item_split[0]
for res in target_index:
c_tags = res["tags"]
if set(p_tags).issubset(set(c_tags)) and set(n_tags).isdisjoint(set(c_tags)) and (not uid or uid == res['uid']) and (not alias or alias == res['alias']):
it = Item(res['path'], res['repo'])
result.append(it)
if tags or uid or i.get('all'):
for res in target_index:
c_tags = res["tags"]
if set(p_tags).issubset(set(c_tags)) and set(n_tags).isdisjoint(set(c_tags)) and (not uid or uid == res['uid']) and (not alias or alias == res['alias']):
it = Item(res['path'], res['repo'])
result.append(it)
#logger.info(result)
return {'return': 0, 'list': result}
#indices
Expand Down Expand Up @@ -152,7 +153,7 @@ def main():
action_parser.add_argument('extra', nargs=argparse.REMAINDER, help='Extra options (e.g., -v)')

# Script specific subcommands
for action in ['docker', 'experiment']:
for action in ['docker', 'experiment', 'doc', 'lint']:
action_parser = subparsers.add_parser(action, help=f'{action.capitalize()} a target.')
action_parser.add_argument('target', choices=['script', 'run'], help='Target type (script).')
# the argument given after target and before any extra options like --tags will be stored in "details"
Expand Down Expand Up @@ -247,7 +248,7 @@ def main():
if args.target == "repo":
run_args['repo'] = args.details

if args.command in ['docker', 'experiment']:
if args.command in ['docker', 'experiment', 'doc', 'lint']:
if args.target == "run":
run_args['target'] = 'script' #allowing run to be used for docker run instead of docker script
args.target = "script"
Expand Down
2 changes: 1 addition & 1 deletion mlc/repo_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def add(self, run_args):
return {"return": 1, "error": "The repository to be added is not specified"}

i_repo_path = run_args['repo'] #can be a path, forder_name or URL
repo_folder_name = os.path.basename(i_repo_path)
repo_folder_name = os.path.basename(i_repo_path.rstrip('/'))

repo_path = os.path.join(self.repos_path, repo_folder_name)

Expand Down
Loading
Loading