Skip to content

[Automated Commit] Format Codebase #51

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

Merged
merged 8 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/test-mlperf-inference-rgat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
cm pull repo --url=${{ github.event.pull_request.head.repo.html_url }} --checkout=${{ github.event.pull_request.head.ref }}
- name: Test MLPerf Inference R-GAT using ${{ matrix.backend }} on ${{ matrix.os }}
run: |
cm run script --tags=run,mlperf,inference,generate-run-cmds,_submission,_short --submitter="MLCommons" --hw_name=gh_${{ matrix.os }}_x86 --model=rgat --implementation=${{ matrix.implementation }} --backend=${{ matrix.backend }} --device=cpu --scenario=Offline --test_query_count=500 --adr.compiler.tags=gcc --quiet -v --target_qps=1
cm run script --tags=run,mlperf,inference,generate-run-cmds,_submission,_short --adr.inference-src.tags=_branch.fix_submission_generation --submitter="MLCommons" --hw_name=gh_${{ matrix.os }}_x86 --model=rgat --implementation=${{ matrix.implementation }} --backend=${{ matrix.backend }} --device=cpu --scenario=Offline --test_query_count=500 --adr.compiler.tags=gcc --category=datacenter --quiet -v --target_qps=1
- name: Push Results
if: github.repository_owner == 'gateoverflow'
env:
Expand Down
5 changes: 2 additions & 3 deletions script/get-docker/customize.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,8 @@ def detect_version(i):
if "podman" in r['string'].lower():
tool = "podman"


print(i['recursion_spaces'] + ' Detected version: {}'.format(version))
return {'return': 0, 'version': version, "tool":tool}
return {'return': 0, 'version': version, "tool": tool}


def postprocess(i):
Expand All @@ -76,7 +75,7 @@ def postprocess(i):
env['CM_DOCKER_CACHE_TAGS'] = 'version-' + version

env['CM_DOCKER_VERSION'] = version

env['CM_CONTAINER_TOOL'] = tool

return {'return': 0, 'version': version}
1 change: 1 addition & 0 deletions script/get-ml-model-rgat/_cm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,5 @@ variations:
group: download-tool
rclone,fp32:
env:
CM_ML_MODEL_STARTING_WEIGHTS_FILENAME: https://github.com/mlcommons/inference/tree/master/graph/R-GAT#download-model-using-rclone
CM_DOWNLOAD_URL: mlc-inference:mlcommons-inference-wg-public/R-GAT/RGAT.pt
34 changes: 26 additions & 8 deletions script/process-mlperf-accuracy/customize.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,18 +118,30 @@ def preprocess(i):
extra_options = ""

if env.get('CM_SDXL_STATISTICS_FILE_PATH', '') != '':
extra_options += f" --statistics-path '{env['CM_SDXL_STATISTICS_FILE_PATH']}' "
extra_options += (
f""" --statistics-path '{
env['CM_SDXL_STATISTICS_FILE_PATH']}'"""
)

if env.get('CM_SDXL_COMPLIANCE_IMAGES_PATH', '') != '':
extra_options += f" --compliance-images-path '{env['CM_SDXL_COMPLIANCE_IMAGES_PATH']}' "
extra_options += (
f""" --compliance-images-path '{
env['CM_SDXL_COMPLIANCE_IMAGES_PATH']}' """
)
else:
extra_options += f""" --compliance-images-path '{os.path.join(result_dir, "images")}' """
extra_options += f""" --compliance-images-path '{
os.path.join(
result_dir, "images")}' """

if env.get('CM_COCO2014_SAMPLE_ID_PATH', '') != '':
extra_options += f" --ids-path '{env['CM_COCO2014_SAMPLE_ID_PATH']}' "
extra_options += (
f" --ids-path '{env['CM_COCO2014_SAMPLE_ID_PATH']}' "
)

if env.get('CM_SDXL_ACCURACY_RUN_DEVICE', '') != '':
extra_options += f" --device '{env['CM_SDXL_ACCURACY_RUN_DEVICE']}' "
extra_options += (
f" --device '{env['CM_SDXL_ACCURACY_RUN_DEVICE']}' "
)

# env['DATASET_ANNOTATIONS_FILE_PATH'] = env['CM_DATASET_ANNOTATIONS_FILE_PATH']
CMD = env['CM_PYTHON_BIN_WITH_PATH'] + " '" + os.path.join(env['CM_MLPERF_INFERENCE_SOURCE'], "text_to_image", "tools",
Expand Down Expand Up @@ -162,9 +174,15 @@ def preprocess(i):
elif dataset == "terabyte":
extra_options = ""
if env.get('CM_DLRM_V2_AGGREGATION_TRACE_FILE_PATH', '') != '':
extra_options += f" --aggregation-trace-file '{env['CM_DLRM_V2_AGGREGATION_TRACE_FILE_PATH']}' "
extra_options += (
f""" --aggregation-trace-file '{
env['CM_DLRM_V2_AGGREGATION_TRACE_FILE_PATH']}' """
)
if env.get('CM_DLRM_V2_DAY23_FILE_PATH', '') != '':
extra_options += f" --day-23-file '{env['CM_DLRM_V2_DAY23_FILE_PATH']}' "
extra_options += (
f""" --day-23-file '{
env['CM_DLRM_V2_DAY23_FILE_PATH']}' """
)
CMD = env['CM_PYTHON_BIN_WITH_PATH'] + " '" + os.path.join(env['CM_MLPERF_INFERENCE_DLRM_V2_PATH'], "pytorch", "tools",
"accuracy-dlrm.py") + "' --mlperf-accuracy-file '" + os.path.join(result_dir,
"mlperf_log_accuracy.json") + "'" + extra_options + \
Expand All @@ -179,7 +197,7 @@ def preprocess(i):
else:
env['CM_DATASET_IGBH_SIZE'] = "tiny"
CMD = env['CM_PYTHON_BIN_WITH_PATH'] + " '" + os.path.join(env['CM_MLPERF_INFERENCE_SOURCE'], "graph", "R-GAT", "tools", "accuracy_igbh.py") + "' --mlperf-accuracy-file '" + os.path.join(
result_dir, "mlperf_log_accuracy.json") + "' --dataset-path '" + env['CM_DATASET_IGBH_PATH'] + "' --dataset-size '" + env['CM_DATASET_IGBH_SIZE'] + "' > '" + out_file + "'"
result_dir, "mlperf_log_accuracy.json") + "' --dataset-path '" + env['CM_DATASET_IGBH_PATH'] + "' --dataset-size '" + env['CM_DATASET_IGBH_SIZE'] + "' --output-file '" + out_file + "'"

else:
return {'return': 1, 'error': 'Unsupported dataset'}
Expand Down
2 changes: 2 additions & 0 deletions script/run-mlperf-inference-app/_cm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ variations:
env:
CM_MLPERF_INFERENCE_VERSION: '4.1'
CM_RUN_MLPERF_INFERENCE_APP_DEFAULTS: r4.1_default
CM_MLPERF_SUBMISSION_CHECKER_VERSION: v4.1
adr:
get-mlperf-inference-results-dir:
tags: _version.r4_1
Expand All @@ -357,6 +358,7 @@ variations:
env:
CM_MLPERF_INFERENCE_VERSION: '5.0-dev'
CM_RUN_MLPERF_INFERENCE_APP_DEFAULTS: r5.0-dev_default
CM_MLPERF_SUBMISSION_CHECKER_VERSION: v5.0
group: benchmark-version
adr:
get-mlperf-inference-results-dir:
Expand Down
Loading