Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
a7bec41
add test for find repo
anandhu-eng Feb 10, 2025
dab459a
Update test-mlc-core-actions.yaml
anandhu-eng Feb 10, 2025
f4b03f0
Merge pull request #74 from anandhu-eng/dev
arjunsuresh Feb 10, 2025
f157c0c
replaced relative with static links
anandhu-eng Feb 10, 2025
fbef40e
add documentation page for mlcflow
anandhu-eng Feb 10, 2025
2fecdb0
Merge pull request #75 from anandhu-eng/docs
arjunsuresh Feb 10, 2025
cd1d718
Update README.md
sahilavaran Feb 10, 2025
78d94e3
Update README.md
sahilavaran Feb 10, 2025
9d55697
Update README.md
sahilavaran Feb 10, 2025
828c15a
Update README.md
sahilavaran Feb 10, 2025
ba3f781
Merge pull request #76 from sahilavaran/dev
anandhu-eng Feb 10, 2025
9a73ee1
added docker and test action for script target
anandhu-eng Feb 10, 2025
4993121
update contributors list
anandhu-eng Feb 10, 2025
3f89c49
Merge pull request #78 from anandhu-eng/docs-update
arjunsuresh Feb 10, 2025
d7f0ab3
add list action for script and cache
anandhu-eng Feb 11, 2025
fb3dc84
Add check for local changes while checkout
anandhu-eng Feb 11, 2025
382a2b7
Update test-mlc-core-actions.yaml
anandhu-eng Feb 11, 2025
442f4b1
handle corrupt repo entries on runtime
anandhu-eng Feb 11, 2025
fe20556
Update main.py
anandhu-eng Feb 11, 2025
602feaa
Merge pull request #79 from anandhu-eng/docs-update
arjunsuresh Feb 11, 2025
5a3d67a
Merge pull request #80 from anandhu-eng/dev
arjunsuresh Feb 11, 2025
29eab23
added script execution flow
anandhu-eng Feb 11, 2025
15004c9
initial commit for script meta information
anandhu-eng Feb 11, 2025
c384cb4
Fix access function in Action class
arjunsuresh Feb 11, 2025
47fef8e
Fix access function in Action class
arjunsuresh Feb 11, 2025
95a064a
Fix access function in Action class
arjunsuresh Feb 11, 2025
a571b50
Merge branch 'dev' into docs-update
arjunsuresh Feb 11, 2025
c717b70
Merge pull request #82 from anandhu-eng/docs-update
arjunsuresh Feb 11, 2025
d5ec19e
Merge branch 'dev' into dev
arjunsuresh Feb 11, 2025
963da7d
Merge pull request #83 from GATEOverflow/dev
arjunsuresh Feb 11, 2025
cada9a3
Merge branch 'dev' into issue-54
arjunsuresh Feb 11, 2025
2535c60
Update main.py
arjunsuresh Feb 11, 2025
f601739
Merge branch 'dev' into issue-54
arjunsuresh Feb 11, 2025
8a92e61
Update install.md
arjunsuresh Feb 11, 2025
377c71b
Update install.md
arjunsuresh Feb 11, 2025
7edbd0d
Update install.md
arjunsuresh Feb 11, 2025
d4d8f86
Update install.md
arjunsuresh Feb 11, 2025
bc5168a
Update install.md
arjunsuresh Feb 11, 2025
0eee884
Update test 21
anandhu-eng Feb 12, 2025
daf6f96
Update test-mlc-core-actions.yaml
anandhu-eng Feb 12, 2025
7b8b56e
updated test 10
anandhu-eng Feb 12, 2025
fa0af0b
Update test-mlc-core-actions.yaml
anandhu-eng Feb 12, 2025
58242d7
Update mkdocs.yml
anandhu-eng Feb 13, 2025
09f809d
Rename install.md to index.md
anandhu-eng Feb 13, 2025
7d9b2e2
improve rm repo
anandhu-eng Feb 13, 2025
534a091
Merge pull request #87 from anandhu-eng/dev
arjunsuresh Feb 13, 2025
ab701a8
Merge pull request #88 from anandhu-eng/improve-repoaction
arjunsuresh Feb 13, 2025
5452be3
Update test-mlc-core-actions.yaml
anandhu-eng Feb 13, 2025
fde809e
Update main.py
anandhu-eng Feb 13, 2025
e010075
Merge pull request #81 from anandhu-eng/issue-54
arjunsuresh Feb 13, 2025
ecb34bf
Update index.md
arjunsuresh Feb 13, 2025
ca3ab17
Update index.md
arjunsuresh Feb 13, 2025
b65f84c
Update index.md
arjunsuresh Feb 13, 2025
6503585
Update index.md
arjunsuresh Feb 13, 2025
f24cbe5
Update index.md
arjunsuresh Feb 13, 2025
affee1f
Update index.md
arjunsuresh Feb 13, 2025
c97397d
Update index.md
arjunsuresh Feb 13, 2025
7ada901
Update index.md
arjunsuresh Feb 13, 2025
a9bb355
Fixes for docs
arjunsuresh Feb 13, 2025
85019c0
Fix console output, #89
arjunsuresh Feb 13, 2025
0acf9c4
Docs cleanup
arjunsuresh Feb 13, 2025
fa7bfb9
Fixes to docs
arjunsuresh Feb 13, 2025
4b2c037
Fixes to docs
arjunsuresh Feb 13, 2025
06a6c4a
Merge pull request #90 from GATEOverflow/dev
arjunsuresh Feb 13, 2025
a16be42
Fixes to docs
arjunsuresh Feb 13, 2025
4d77d46
Merge pull request #91 from GATEOverflow/dev
arjunsuresh Feb 13, 2025
67d30b6
Fix typo
arjunsuresh Feb 13, 2025
7dde5da
Merge branch 'dev' into dev
arjunsuresh Feb 13, 2025
67a146e
Merge pull request #92 from GATEOverflow/dev
arjunsuresh Feb 13, 2025
5f17cf3
Update README.md
arjunsuresh Feb 14, 2025
0ce4e42
GitHub action tests for mlc access function (#85)
anandhu-eng Feb 15, 2025
bb04270
Merge branch 'main' into dev
arjunsuresh Feb 15, 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
443 changes: 443 additions & 0 deletions .github/scripts/test_mlc_access.py

Large diffs are not rendered by default.

31 changes: 31 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Publish MLCFlow documentation site


on:
release:
types: [published]
push:
branches:
- main
- dev

jobs:

publish:
name: Publish the site
runs-on: ubuntu-latest

steps:
- name: Checkout repository normally
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"

- name: Install Mkdocs
run: pip install -r docs/requirements.txt

- name: Run Mkdocs deploy
run: mkdocs gh-deploy --force
97 changes: 79 additions & 18 deletions .github/workflows/test-mlc-core-actions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- '!**.md'

jobs:
test_mlc_core_actions:
test_mlc_cli_core_actions:

runs-on: ${{ matrix.os }}
strategy:
Expand Down Expand Up @@ -62,8 +62,15 @@ jobs:
exit 1
fi

- name: Test 2 - find repo
run: |
mlc find repo anandhu-eng@mlperf-automations
mlc find repo https://github.com/mlcommons/mlperf-automations.git
mlc find repo 9cf241afa6074c89
mlc find repo mlcommons@mlperf-automations
mlc find repo mlcommons@mlperf-automations,9cf241afa6074c89

- name: Test 2 - pull repo - Test conflicting repo scenario
- name: Test 3 - pull repo - Test conflicting repo scenario
run: |
GH_MLC_REPO_PATH="${HOME}/MLC/repos/mlcommons@mlperf-automations"
GH_MLC_REPO_JSON_PATH="${HOME}/MLC/repos/repos.json"
Expand Down Expand Up @@ -91,11 +98,11 @@ jobs:
fi
mlc pull repo

- name: Test 3 - list repo - List the existing repositories
- name: Test 4 - list repo - List the existing repositories
run: |
mlc list repo

- name: Test 4 - rm repo - Remove the forked mlperf-automation repo
- name: Test 5 - rm repo - Remove the forked mlperf-automation repo
run: |
GH_MLC_REPO_PATH_FORK="${HOME}/MLC/repos/anandhu-eng@mlperf-automations"
mlc rm repo anandhu-eng@mlperf-automations
Expand All @@ -104,78 +111,132 @@ jobs:
exit 1
fi

- name: Test 5 - find cache - Cache not present
- name: Test 6 - find cache - Cache not present
run: |
mlc find cache --tags=detect,os 2>&1 | tee test5.log
if ! grep -q "No cache entry found for the specified input:" test5.log; then
exit 1
fi

- name: Test 6 - run script - Output being used for testing mlc cache
- name: Test 7 - run script - Output being used for testing mlc cache
run: |
mlc run script --tags=get,imagenet-aux --quiet
mlc run script --tags=get,imagenet-aux,_from.dropbox --quiet

- name: Test 7 - find cache - More than one cache present
- name: Test 8 - find cache - More than one cache present
run: |
mlc search cache --tags=get,imagenet-aux 2>&1 | tee test7.log
if grep -q "No cache entry found for the specified tags:" test7.log; then
exit 1
fi

- name: Test 8 - show cache - More than one cache present
- name: Test 9 - show cache - More than one cache present
run: |
mlc show cache --tags=get,imagenet-aux 2>&1 | tee test7.log

- name: Test 9 - rm cache - More than one cache present
- name: Test 10 - rm cache - More than one cache present
run: |
mlc rm cache --tags=get,imagenet-aux 2>&1 --all | tee test7.log
mlc rm cache --tags=get,imagenet-aux -f

- name: Test 10 - cp script - Copy mlc script
- name: Test 11 - cp script - Copy mlc script
run: |
mlc cp script detect-os my-os-detect

- name: Test 11 - add repo - Add a new MLC repo
- name: Test 12 - add repo - Add a new MLC repo
run: |
mlc add repo my-new-repo
mlc add repo https://github.com/mlcommons/inference
mlc add repo https://mygit.com/myrepo

- name: Test 12 - rm repo where we have a corrupt entry
- name: Test 13 - rm repo where we have a corrupt entry
run: |
rm -r $HOME/MLC/repos/mlcommons@mlperf-automations
mlc rm repo mlcommons@mlperf-automations
mlc pull repo mlcommons@mlperf-automations --branch=dev

- name: Test 13 - add script - Add a new MLC script
- name: Test 14 - add script - Add a new MLC script
run: |
mlc add script my-script-1 --tags=my,new-tags-1
mlc add script my-script-2 --tags=my,new-tags-2
mlc add script my-script-3 --tags=my,new-tags3 --template_tags=detect,os
mlc add script mlcommons@mlperf-automations:my-script-4 --tags=my,new-tags4 --template_tags=detect,os

- name: Test 14 - mv script - Move/rename an MLC script
- name: Test 15 - mv script - Move/rename an MLC script
run: |
mlc mv script my-script-1 moved-my-script-1
mlc mv script my-script-2 mlcommons@mlperf-automations:moved-my-script-2

- name: Test 15 - show script
- name: Test 16 - show script
run: |
mlc show script --tags=run-mlperf,inference
mlc show script 863735b7db8c44fc
mlc show script detect-os,863735b7db8c44fc
mlc show script detect-os

- name: Test 16 - find script
- name: Test 17 - find script
run: |
mlc find script --tags=run-mlperf,inference
mlc find script 863735b7db8c44fc
mlc find script detect-os,863735b7db8c44fc
mlc find script detect-os

- name: Test 17 - rm script
- name: Test 18 - rm script
run: |
mlc rm script get-ipol-src -f
mlc rm script --tags=app,image,corner-detection -f
mlc rm script 63080407db4d4ac4 -f

- name: Test 19 - list script
run: |
mlc list script

- name: Test 20 - list cache
run: |
mlc list cache

test_mlc_access_core_actions:

runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.12", "3.8"]
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
exclude:
- os: windows-latest
- os: 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 mlcflow from the pull request's source repository and branch
run: |
python -m pip install --upgrade pip
python -m pip install --ignore-installed --verbose pip setuptools
python -m pip install .

- name: Pull a forked mlperf-automations repository
run: |
mlc pull repo anandhu-eng@mlperf-automations --checkout=dev

- name: Run find repo from test-mlc-access.py
run: |
cd .github/scripts && python -c "import test_mlc_access as test; test.test_find_repo()"

- name: Pull MLCOMMONS mlperf-automations repository
run: |
mlc pull repo mlcommons@mlperf-automations --checkout=dev

- name: Run tests from test-mlc-access.py
run: |
cd .github/scripts && python -c "import test_mlc_access as test; test.run_tests()"

1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Once your contribution exceeds 50 lines of code (in total), we will:
- **[Shaik Masthan](https://github.com/csemasthan)** - *Initial Development Discussions*
- **[Sahil Avaran](https://github.com/sahilavaran)** - *Initial Development Discussions*, added logging
- **[R.A Sidharth](https://github.com/Sid9993)** - *Find repo implementation*
- **[Sujith Kanakkassery](https://github.com/sujik18)** - *Initial Development Discussions*, adding logging to a file
- **[Your Name Here]** - This could be you! 🎉

---
Expand Down
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
**MLCFlow: Simplifying MLPerf Automations**

[![License](https://img.shields.io/badge/License-Apache%202.0-green)](LICENSE.md)
[![License](https://img.shields.io/badge/License-Apache%202.0-green)](https://github.com/mlcommons/mlcflow/blob/main/LICENSE.md)
[![Downloads](https://static.pepy.tech/badge/mlcflow)](https://pepy.tech/project/mlcflow)

[![MLC core actions test](https://github.com/mlcommons/mlcflow/actions/workflows/test-mlc-core-actions.yaml/badge.svg)](https://github.com/mlcommons/mlcflow/actions/workflows/test-mlc-core-actions.yaml)
Expand All @@ -9,11 +9,11 @@
[![MLPerf inference bert (deepsparse, tf, onnxruntime, pytorch)](https://github.com/mlcommons/mlcflow/actions/workflows/mlperf-inference-bert.yml/badge.svg)](https://github.com/mlcommons/mlcflow/actions/workflows/mlperf-inference-bert.yml)


MLCFlow is a versatile CLI and Python interface developed by MLCommons in collaboration with a dedicated team of volunteers (see [Contributors](CONTRIBUTORS.md)). It serves as a streamlined replacement for the [CMind](https://github.com/mlcommons/ck/tree/master/cm) tool, designed to drive the automation workflows of MLPerf benchmarks more efficiently.
MLCFlow is a versatile CLI and Python interface developed by MLCommons in collaboration with a dedicated team of volunteers (see [Contributors](https://github.com/mlcommons/mlcflow/blob/main/CONTRIBUTORS.md)). It serves as a streamlined replacement for the [CMind](https://github.com/mlcommons/ck/tree/master/cm) tool, designed to drive the automation workflows of MLPerf benchmarks more efficiently. You can use this tool for any of your workflow automation tasks.

The concept behind CMind originated from **Grigori Fursin**, while the **MLPerf Automations** project was created by **Grigori Fursin** and **Arjun Suresh**, whose collective contributions laid the foundation for modernizing MLPerf benchmarking tools.
The concept behind CMind originated from **Grigori Fursin**, while the **MLPerf Automations** project was created by **Grigori Fursin** and **Arjun Suresh**, whose collective contributions laid the foundation for modernizing MLPerf benchmarking tools. MLCFlow is a complete replacement for the CMind package with an entirely new implementation led by **Arjun Suresh** and **Anandhu Sooraj**, with support from the [MLCFlow community](https://github.com/mlcommons/mlcflow/blob/main/CONTRIBUTORS.md). The script automation used in MLCFlow is inherited from the CM project but is now modified to support MLC and provides a simpler interface to the devlopers. Please see [the documentation](https://docs.mlcommons.org/mlcflow/) for more details.

On February 9, 2025, MLCFlow is releasing its first stable version, 1.0.0. This milestone was led by **Arjun Suresh** and **Anandhu Sooraj**, with support from the [MLCFlow community](CONTRIBUTORS.md).
On February 9, 2025, MLCFlow is releasing its first stable version, 1.0.0.

### Key Features
Building upon the core idea of CMind—wrapping native scripts with Python wrappers and YAML metadata—MLCFlow focuses exclusively on key automation components: **Scripts**, along with its complementary modules: **Cache**, **Docker**, and **Experiments**. This targeted design simplifies both implementation and interface, enabling a more user-friendly experience.
Expand Down Expand Up @@ -57,15 +57,14 @@ Each target has its own set of specific actions to tailor automation workflows a

| Target | Action |
|--------|-----------------|
| script | run, find/search, rm, mv, cp, add, test, docker, show |
| script | run, find/search, rm, mv, cp, add, test, docker, show |
| cache | find/search, rm, show |
| repo | pull, search, rm, list, find/search |
| repo | pull, search, rm, list, find/search , add |


## CM compatibility layer

MLC started with a compatibility layer where by it supported MLCommons CM automations - Script, Cache and Experiment. Now, MLCFLow has just the Script Automation which is an extension of the Script Automation from CM but with a cleaner integration of Cache Automation and Docker and Test extensions. The old CM scripts are now updated with the latest MLCFlow scripts in the [MLPerf Automations](https://github.com/mlcommons/mlperf-automations/tree/main/script) repository.


## Architectural Diagram

```mermaid
Expand Down
1 change: 1 addition & 0 deletions docs/README.md
6 changes: 6 additions & 0 deletions docs/img/logo_v2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
66 changes: 66 additions & 0 deletions docs/install/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
hide:
- toc
---

# Installation

## Dependencies
MLCFlow needs `python>=3.7`, `python3-pip`, `python3-venv` and `git` installed on your system.

=== "Ubuntu"
```bash
sudo apt-get install -y python3-dev python3-venv python3-pip git wget sudo unzip curl
```
=== "RedHat"
```bash
sudo dnf install -y python3-dev python3-pip git wget sudo unzip binutils curl
```
=== "Arch"
```bash
sudo pacman -Sy python python-pip git wget sudo binutils curl
```
=== "macOS"
```bash
brew install python git wget binutils curl
```
=== "Windows"

TBD





## Activate a Virtual ENV for MLCFlow (Optional)
This step is not mandatory. But the latest `pip` install requires this or else will need the `--break-system-packages` flag while installing.

=== "Unix"
```bash
python3 -m venv mlcflow
. mlcflow/bin/activate
```

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

## Install MLCFLow

If you are not using virtual ENV for installation, the latest `pip` install requires the `--break-system-packages` flag while installing.

```bash
pip install mlcflow
```

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


Now, you are ready to use the `mlc` commands. Currently, `mlc` is being used to automate the benchmark runs for:

* [MLPerf Inference](https://docs.mlcommons.org/inference/)

6 changes: 6 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
mkdocs-material
swagger-markdown
mkdocs-macros-plugin
ruamel.yaml
mkdocs-redirects
mkdocs-site-urls
Loading
Loading