Skip to content

Commit fe55062

Browse files
authored
Merge branch 'master' into mingyuanm/update_vlm_v6.1_readme
2 parents 12c0e9b + e59ce58 commit fe55062

213 files changed

Lines changed: 3314 additions & 2785 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Close old issues and PRs older than 2 years
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * *'
6+
workflow_dispatch:
7+
8+
permissions:
9+
issues: write
10+
pull-requests: write
11+
12+
jobs:
13+
close-old:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/stale@v10
17+
with:
18+
days-before-issue-stale: 730
19+
days-before-issue-close: 0
20+
close-issue-message: |
21+
🔒 This issue has been **automatically closed** because it has been open for more than 2 years with no activity.
22+
If this is still relevant, you may **reopen it or create a new one**.
23+
close-issue-reason: not_planned
24+
25+
days-before-pr-stale: 730
26+
days-before-pr-close: 0
27+
close-pr-message: |
28+
🔒 This pull request has been **automatically closed** because it has been open for more than 2 years with no activity.
29+
If you still want to proceed, you may **reopen this PR or open a new one**.
30+
31+
exempt-issue-labels: pinned,security-fix,long-term
32+
exempt-pr-labels: pinned,security-fix,wip

.github/workflows/auto-update-dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Auto-Update Dev Branches from Master
33
on:
44
push:
55
branches:
6-
- master # Trigger workflow on commits to 'master' branch.
6+
- master # Trigger workflow on commits to 'master' branch
77
workflow_dispatch: {}
88

99
jobs:

.github/workflows/build_wheels.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
name: Build loadgen wheels and release them into PYPI
22

3+
34
on:
45
release:
56
types: [published]

.github/workflows/cla.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
path-to-signatures: 'cla-bot/v1/cla.json'
2424
# branch should not be protected
2525
branch: 'main'
26-
allowlist: user1,bot*,github-actions,github-actions[bot]
26+
allowlist: user1,bot*,github-actions,mlc-automations,github-actions[bot]
2727
remote-organization-name: mlcommons
2828
remote-repository-name: systems
2929

.github/workflows/format.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,26 @@ env:
1010

1111
jobs:
1212
format-code:
13+
if: github.actor != 'mlc-automations'
1314
runs-on: ubuntu-latest
1415
permissions:
1516
contents: write
1617
steps:
18+
- name: Generate GitHub App token
19+
id: app-token
20+
uses: actions/create-github-app-token@v1
21+
with:
22+
app-id: ${{ secrets.MLC_AUTOMATIONS_APP_ID }}
23+
private-key: ${{ secrets.MLC_AUTOMATIONS_PRIVATE_KEY }}
24+
1725
- name: Checkout code
1826
uses: actions/checkout@v4
1927
with:
2028
fetch-depth: 0
29+
token: ${{ steps.app-token.outputs.token }}
2130

2231
- name: Set up Python ${{ env.python_version }}
23-
uses: actions/setup-python@v3
32+
uses: actions/setup-python@v5
2433
with:
2534
python-version: ${{ env.python_version }}
2635

@@ -55,10 +64,10 @@ jobs:
5564
run: |
5665
HAS_CHANGES=$(git diff --staged --name-only)
5766
if [ ${#HAS_CHANGES} -gt 0 ]; then
58-
git config --global user.name github-actions[bot]
59-
git config --global user.email "github-actions[bot]@users.noreply.github.com"
67+
# Use the GitHub actor's name and email
68+
git config --global user.name mlc-automations
69+
git config --global user.email "3246381+mlc-automations@users.noreply.github.com"
6070
# Commit changes
6171
git commit -m '[Automated Commit] Format Codebase'
62-
# Use the GITHUB_TOKEN to push changes
63-
git push
72+
git push
6473
fi

.github/workflows/gitleaks.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: "Secret Scanning"
2+
on:
3+
pull_request:
4+
5+
jobs:
6+
gitleaks:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v4
10+
with:
11+
fetch-depth: 0
12+
13+
- name: Install gitleaks
14+
run: |
15+
set -euo pipefail
16+
GITLEAKS_VERSION="8.30.1"
17+
curl -sSfL "https://github.com/gitleaks/gitleaks/releases/download/v${GITLEAKS_VERSION}/gitleaks_${GITLEAKS_VERSION}_linux_x64.tar.gz" \
18+
| tar -xz -C /usr/local/bin gitleaks
19+
gitleaks version
20+
21+
- name: Run gitleaks
22+
run: |
23+
gitleaks git \
24+
--log-opts="${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}" \
25+
--config .gitleaks.toml

.github/workflows/test-bert.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ name: Test for MLPerf inference bert submission generation using MLC script auto
55

66
on:
77
pull_request:
8-
branches: [ "master_off", "dev_off" ]
8+
branches: [ "master", "dev" ]
99
paths:
1010
- language/bert/**
1111
- tools/submission/**
@@ -22,8 +22,8 @@ jobs:
2222
strategy:
2323
fail-fast: false
2424
matrix:
25-
python-version: [ "3.9" ]
26-
backend: [ "deepsparse" ]
25+
python-version: [ "3.10" ]
26+
backend: [ "onnxruntime" ]
2727

2828
steps:
2929
- uses: actions/checkout@v3
@@ -36,4 +36,4 @@ jobs:
3636
python3 -m pip install mlc-scripts
3737
- name: Test BERT and end to end submission generation
3838
run: |
39-
mlcr run,mlperf,inference,generate-run-cmds,_submission,_short --quiet --submitter="MLCommons" --hw_name=default --model=bert-99 --implementation=reference --backend=${{ matrix.backend }} --device=cpu --scenario=Offline --adr.compiler.tags=gcc --adr.inference-src.version=custom --adr.inference-src.tags=_repo.${{ github.event.pull_request.head.repo.html_url }},_branch.$PR_HEAD_REF --adr.inference-src-loadgen.tags=_branch.$PR_HEAD_REF,_repo.${{ github.event.pull_request.head.repo.html_url }} --adr.inference-src-loadgen.version=custom --adr.loadgen.version=custom
39+
mlcr run,mlperf,inference,generate-run-cmds,_submission,_short --quiet --submitter="MLCommons" --hw_name=default --model=bert-99 --implementation=reference --backend=${{ matrix.backend }} --device=cpu --scenario=Offline --adr.compiler.tags=gcc --adr.inference-src.version=custom --adr.inference-src.tags=_repo.${{ github.event.pull_request.head.repo.html_url }},_branch.$PR_HEAD_REF --adr.inference-src-loadgen.tags=_branch.$PR_HEAD_REF,_repo.${{ github.event.pull_request.head.repo.html_url }} --adr.inference-src-loadgen.version=custom --adr.loadgen.version=custom

.gitignore

Lines changed: 151 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,157 @@
1+
### Python config adapted from toptal.com ###
2+
3+
# Repository-specific ignores
14
loadgen/build/
25
libmlperf_loadgen.a
36
__pycache__/
47
generated/
58
*.swp
6-
*.egg-info/
9+
.vscode/
10+
11+
# Byte-compiled / optimized / DLL files
12+
__pycache__/
13+
*.py[cod]
14+
*$py.class
15+
16+
# C extensions
717
*.so
8-
.vscode/
18+
19+
# Distribution / packaging
20+
.Python
21+
build/
22+
develop-eggs/
23+
dist/
24+
downloads/
25+
eggs/
26+
.eggs/
27+
lib/
28+
lib64/
29+
parts/
30+
sdist/
31+
var/
32+
wheels/
33+
share/python-wheels/
34+
*.egg-info/
35+
.installed.cfg
36+
*.egg
37+
MANIFEST
38+
node_modules/
39+
40+
# PyInstaller
41+
# Usually these files are written by a python script from a template
42+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
43+
*.manifest
44+
*.spec
45+
46+
# Installer logs
47+
pip-log.txt
48+
pip-delete-this-directory.txt
49+
50+
# Unit test / coverage reports
51+
htmlcov/
52+
.tox/
53+
.nox/
54+
.coverage
55+
.coverage.*
56+
.cache
57+
nosetests.xml
58+
coverage.xml
59+
*.cover
60+
*.py,cover
61+
.hypothesis/
62+
.pytest_cache/
63+
cover/
64+
65+
# Translations
66+
*.mo
67+
*.pot
68+
69+
# Django stuff:
70+
*.log
71+
local_settings.py
72+
db.sqlite3
73+
db.sqlite3-journal
74+
75+
# Flask stuff:
76+
instance/
77+
.webassets-cache
78+
79+
# Scrapy stuff:
80+
.scrapy
81+
82+
# Sphinx documentation
83+
docs/_build/
84+
85+
# PyBuilder
86+
.pybuilder/
87+
target/
88+
89+
# Jupyter Notebook
90+
.ipynb_checkpoints
91+
92+
# IPython
93+
profile_default/
94+
ipython_config.py
95+
96+
# pdm
97+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
98+
#pdm.lock
99+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
100+
# in version control.
101+
# https://pdm.fming.dev/#use-with-ide
102+
.pdm.toml
103+
104+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
105+
__pypackages__/
106+
107+
# Celery stuff
108+
celerybeat-schedule
109+
celerybeat.pid
110+
111+
# SageMath parsed files
112+
*.sage.py
113+
114+
# Environments
115+
.env
116+
.venv
117+
env/
118+
venv/
119+
ENV/
120+
env.bak/
121+
venv.bak/
122+
123+
# Spyder project settings
124+
.spyderproject
125+
.spyproject
126+
127+
# Rope project settings
128+
.ropeproject
129+
130+
# mkdocs documentation
131+
/site
132+
133+
# mypy
134+
.mypy_cache/
135+
.dmypy.json
136+
dmypy.json
137+
138+
# Pyre type checker
139+
.pyre/
140+
141+
# pytype static type analyzer
142+
.pytype/
143+
144+
# Cython debug symbols
145+
cython_debug/
146+
147+
### Python Patch ###
148+
# Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration
149+
poetry.toml
150+
151+
# ruff
152+
.ruff_cache/
153+
154+
# LSP config files
155+
pyrightconfig.json
156+
157+
# End of https://www.toptal.com/developers/gitignore/api/python

.gitleaks.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[extend]
2+
useDefault = true
3+
disabledRules = ["generic-api-key"]

.pre-commit-config.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/mirrors-autopep8
3+
rev: v2.0.4
4+
hooks:
5+
- id: autopep8
6+
args: ['--in-place', '-a', '--max-line-length', '79']
7+
exclude: 'tools/submission/power/power_checker\.py'
8+
9+
- repo: https://github.com/pre-commit/mirrors-clang-format
10+
rev: v22.1.5
11+
hooks:
12+
- id: clang-format
13+
args: ['--style=file']
14+
types_or: [c, c++]
15+
16+
- repo: https://github.com/gitleaks/gitleaks
17+
rev: v8.30.0
18+
hooks:
19+
- id: gitleaks

0 commit comments

Comments
 (0)