Skip to content

Commit f95f29a

Browse files
authored
Merge branch 'master' into submission_checker_refactor
2 parents 1e92a79 + 353bfb8 commit f95f29a

File tree

9 files changed

+27
-25
lines changed

9 files changed

+27
-25
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
strategy:
1313
matrix:
1414
branch: [ "dev", "docs" ]
15+
1516
runs-on: ubuntu-latest
1617

1718
permissions:

.github/workflows/test-resnet50.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,7 @@ jobs:
3535
python-version: ${{ matrix.python-version }}
3636
- name: Install dependencies
3737
run: |
38-
python3 -m pip install mlcflow
39-
mlc pull repo mlcommons@mlperf-automations --branch=sub-gen-change
40-
# python3 -m pip install mlc-scripts
38+
python3 -m pip install mlc-scripts
4139
- name: Test Resnet50 and end to end submission generation
4240
run: |
43-
mlcr run,mlperf,inference,generate-run-cmds,_submission,_short --quiet --adr.inference-src.tags=_branch.submission_dir --submitter="MLCommons" --hw_name=default --model=resnet50 --implementation=reference --backend=${{ matrix.backend }} --device=cpu --scenario=Offline --test_query_count=500 --adr.compiler.tags=gcc --adr.inference-src.tags=_branch.${{ github.event.pull_request.head.ref }},_repo.${{ github.event.pull_request.head.repo.html_url }} --adr.inference-src.version=custom --adr.inference-src-loadgen.tags=_branch.${{ github.event.pull_request.head.ref }},_repo.${{ github.event.pull_request.head.repo.html_url }} --adr.inference-src-loadgen.version=custom --adr.loadgen.version=custom ${{ matrix.loadgen-flag }}
41+
mlcr run,mlperf,inference,generate-run-cmds,_submission,_short --quiet --submitter="MLCommons" --hw_name=default --model=resnet50 --implementation=reference --backend=${{ matrix.backend }} --device=cpu --scenario=Offline --test_query_count=500 --adr.compiler.tags=gcc --adr.inference-src.tags=_branch.${{ github.event.pull_request.head.ref }},_repo.${{ github.event.pull_request.head.repo.html_url }} --adr.inference-src.version=custom --adr.inference-src-loadgen.tags=_branch.${{ github.event.pull_request.head.ref }},_repo.${{ github.event.pull_request.head.repo.html_url }} --adr.inference-src-loadgen.version=custom --adr.loadgen.version=custom ${{ matrix.loadgen-flag }}

.github/workflows/test-retinanet.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,7 @@ jobs:
3333
python-version: ${{ matrix.python-version }}
3434
- name: Install dependencies
3535
run: |
36-
python3 -m pip install mlcflow
37-
mlc pull repo mlcommons@mlperf-automations --branch=sub-gen-change
38-
# python3 -m pip install mlc-scripts
36+
python3 -m pip install mlc-scripts
3937
- name: Test Retinanet and end to end submission generation
4038
run: |
41-
mlcr run,mlperf,inference,generate-run-cmds,_submission,_short --adr.inference-src.tags=_branch.submission_dir --quiet --submitter="MLCommons" --hw_name=default --model=retinanet --implementation=reference --backend=${{ matrix.backend }} --device=cpu --scenario=Offline --test_query_count=10 --adr.compiler.tags=gcc --adr.inference-src.version=custom --adr.inference-src.tags=_repo.${{ github.event.pull_request.head.repo.html_url }},_branch.${{ github.event.pull_request.head.ref }} --adr.inference-src-loadgen.tags=_branch.${{ github.event.pull_request.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=retinanet --implementation=reference --backend=${{ matrix.backend }} --device=cpu --scenario=Offline --test_query_count=10 --adr.compiler.tags=gcc --adr.inference-src.version=custom --adr.inference-src.tags=_repo.${{ github.event.pull_request.head.repo.html_url }},_branch.${{ github.event.pull_request.head.ref }} --adr.inference-src-loadgen.tags=_branch.${{ github.event.pull_request.head.ref }},_repo.${{ github.event.pull_request.head.repo.html_url }} --adr.inference-src-loadgen.version=custom --adr.loadgen.version=custom

.github/workflows/test-rgat.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@ jobs:
3232
python-version: ${{ matrix.python-version }}
3333
- name: Install dependencies
3434
run: |
35-
python3 -m pip install mlcflow
36-
mlc pull repo mlcommons@mlperf-automations --branch=sub-gen-change
37-
# python3 -m pip install mlc-scripts
35+
python3 -m pip install mlc-scripts
3836
- name: Test R-GAT and end to end submission generation
3937
run: |
40-
mlcr run,mlperf,inference,generate-run-cmds,_submission,_short --adr.inference-src.tags=_branch.submission_dir --quiet --submitter="MLCommons" --category=datacenter --hw_name=default --model=rgat --implementation=reference --backend=${{ matrix.backend }} --device=cpu --scenario=Offline --test_query_count=500 --adr.compiler.tags=gcc --adr.inference-src.tags=_branch.$PR_HEAD_REF,_repo.${{ github.event.pull_request.head.repo.html_url }} --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 ${{ matrix.loadgen-flag }}
38+
mlcr run,mlperf,inference,generate-run-cmds,_submission,_short --quiet --submitter="MLCommons" --category=datacenter --hw_name=default --model=rgat --implementation=reference --backend=${{ matrix.backend }} --device=cpu --scenario=Offline --test_query_count=500 --adr.compiler.tags=gcc --adr.inference-src.tags=_branch.$PR_HEAD_REF,_repo.${{ github.event.pull_request.head.repo.html_url }} --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 ${{ matrix.loadgen-flag }}

loadgen/README_BUILD.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ This will fetch the loadgen source, build and install the loadgen as a python mo
1818

1919
Alternatively, we provide wheels for several python versions and operating system that can be installed using pip directly.
2020

21-
pip install mlperf-loadgen
21+
pip install mlcommons-loadgen
2222

23-
**NOTE:** Take into account that we only update the published wheels after an official release, they may not include the latest changes.
23+
**NOTE:** The `mlcommons-loadgen` PyPI package is automatically updated whenever the `loadgen/` folder in the `master` branch changes or when a release is published, as controlled by the workflow defined [here](https://github.com/mlcommons/inference/blob/master/.github/workflows/build_wheels.yml).
2424

2525
### Testing your Installation
2626
The following command will run a simple end-to-end demo:

loadgen/VERSION.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.1.1
1+
5.1.2

tools/submission/preprocess_submission.py

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def delete_empty_dirs(src):
9999
return False
100100

101101

102-
def copy_submission_dir(src, dst, filter_submitter, keep_structure = True):
102+
def copy_submission_dir(src, dst, filter_submitter, keep_structure=True):
103103
"""
104104
Copies the submission tree to output directory for processing
105105
"""
@@ -116,15 +116,18 @@ def copy_submission_dir(src, dst, filter_submitter, keep_structure = True):
116116
)
117117
else:
118118
for dir in os.listdir(os.path.join(src, division, submitter)):
119-
if os.path.isdir(os.path.join(src, division, submitter, dir)):
120-
target_dir = "results" if dir in ["compliance", "measurements"] else dir
119+
if os.path.isdir(os.path.join(
120+
src, division, submitter, dir)):
121+
target_dir = "results" if dir in [
122+
"compliance", "measurements"] else dir
121123
shutil.copytree(
122124
os.path.join(src, division, submitter, dir),
123125
os.path.join(dst, division, submitter, target_dir),
124-
dirs_exist_ok = True
126+
dirs_exist_ok=True
125127
)
126128
for file in os.listdir(os.path.join(src, division, submitter)):
127-
if os.path.isfile(os.path.join(src, division, submitter, file)):
129+
if os.path.isfile(os.path.join(
130+
src, division, submitter, file)):
128131
shutil.copyfile(
129132
os.path.join(src, division, submitter, file),
130133
os.path.join(dst, division, submitter, file)
@@ -561,7 +564,11 @@ def main():
561564
log.error(f"output directory {args.output} already exists")
562565
sys.exit(1)
563566
os.makedirs(args.output)
564-
copy_submission_dir(args.input, args.output, args.submitter, args.keep_structure)
567+
copy_submission_dir(
568+
args.input,
569+
args.output,
570+
args.submitter,
571+
args.keep_structure)
565572
src_dir = args.output
566573

567574
config = checker.Config(

tools/submission/submission_checker.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1061,7 +1061,7 @@ def set_type(self, submission_type):
10611061
self.optional = self.base["optional-scenarios-datacenter-edge"]
10621062
else:
10631063
raise ValueError("invalid system type")
1064-
1064+
10651065
def skip_calibration(self):
10661066
return self.skip_calibration_check or self.version in ["v5.0"]
10671067

@@ -1893,7 +1893,7 @@ def get_power_metric(config, scenario_fixed, log_path, is_valid, res):
18931893
samples_per_query = 8
18941894

18951895
if (scenario_fixed in ["MultiStream"]
1896-
) and scenario in ["SingleStream"]:
1896+
) and scenario in ["SingleStream"]:
18971897
power_metric = (
18981898
avg_power * power_duration * samples_per_query * 1000 / num_queries
18991899
)
@@ -3040,7 +3040,6 @@ def check_measurement_dir(
30403040
end = len(".json")
30413041
break
30423042

3043-
30443043
weight_data_types = None
30453044
if system_file:
30463045
with open(os.path.join(measurement_dir, system_file), "r") as f:

tools/submission/truncate_accuracy_log.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,8 @@ def truncate_results_dir(filter_submitter, backup, scenarios_to_skip):
172172
acc_path, "accuracy.txt")
173173

174174
# only TEST01 has an accuracy log
175-
if str(test).startswith("TEST") and test != "TEST01":
175+
if str(test).startswith(
176+
"TEST") and test != "TEST01":
176177
continue
177178
if not os.path.exists(acc_log):
178179
log.error("%s missing", acc_log)

0 commit comments

Comments
 (0)