-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
1,169 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
alias: get-dataset-imagenet-calibration | ||
automation_alias: script | ||
automation_uid: 5b4e0237da074764 | ||
cache: true | ||
deps: | ||
- tags: download,file | ||
force_cache: true | ||
extra_cache_tags: imagenet-calibration,imagenet,calibration | ||
names: | ||
- calibration-file-downloader | ||
env: | ||
CM_DOWNLOAD_FINAL_ENV_NAME: CM_MLPERF_IMAGENET_CALIBRATION_LIST_FILE_WITH_PATH | ||
CM_DOWNLOAD_LOCAL_FILE_PATH: <<<CM_MLPERF_IMAGENET_CALIBRATION_LIST_LOCAL_PATH>>> | ||
|
||
docker_input_mapping: {} | ||
input_description: {} | ||
input_mapping: {} | ||
new_env_keys: | ||
- CM_MLPERF_IMAGENET_CALIBRATION_LIST_FILE_WITH_PATH | ||
new_state_keys: [] | ||
post_deps: [] | ||
posthook_deps: [] | ||
prehook_deps: [] | ||
tags: | ||
- get | ||
- dataset | ||
- imagenet | ||
- calibration | ||
uid: 30361fad3dff49ff | ||
variations: | ||
mlperf.option1: | ||
group: calibration-option | ||
default: true | ||
env: | ||
CM_MLPERF_IMAGENET_CALIBRATION_OPTION: one | ||
CM_DOWNLOAD_CHECKSUM: f09719174af3553119e2c621157773a6 | ||
adr: | ||
calibration-file-downloader: | ||
tags: _url.https://github.com/mlcommons/inference/raw/master/calibration/ImageNet/cal_image_list_option_1.txt | ||
mlperf.option2: | ||
group: calibration-option | ||
env: | ||
CM_MLPERF_IMAGENET_CALIBRATION_OPTION: two | ||
CM_DOWNLOAD_CHECKSUM: e44582af00e3b4fc3fac30efd6bdd05f | ||
adr: | ||
calibration-file-downloader: | ||
tags: _url.https://github.com/mlcommons/inference/raw/master/calibration/ImageNet/cal_image_list_option_2.txt |
22 changes: 22 additions & 0 deletions
22
cm-mlops/script/get-dataset-imagenet-calibration/customize.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
from cmind import utils | ||
import os | ||
|
||
def preprocess(i): | ||
|
||
os_info = i['os_info'] | ||
|
||
env = i['env'] | ||
|
||
meta = i['meta'] | ||
|
||
automation = i['automation'] | ||
|
||
quiet = (env.get('CM_QUIET', False) == 'yes') | ||
|
||
return {'return':0} | ||
|
||
def postprocess(i): | ||
|
||
env = i['env'] | ||
|
||
return {'return':0} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
rem native script |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
|
||
#CM Script location: ${CM_TMP_CURRENT_SCRIPT_PATH} | ||
|
||
#To export any variable | ||
#echo "VARIABLE_NAME=VARIABLE_VALUE" >>tmp-run-env.out | ||
|
||
#${CM_PYTHON_BIN_WITH_PATH} contains the path to python binary if "get,python" is added as a dependency | ||
|
||
|
||
|
||
function exit_if_error() { | ||
test $? -eq 0 || exit $? | ||
} | ||
|
||
function run() { | ||
echo "Running: " | ||
echo "$1" | ||
echo "" | ||
if [[ ${CM_FAKE_RUN} != 'yes' ]]; then | ||
eval "$1" | ||
exit_if_error | ||
fi | ||
} | ||
|
||
#Add your run commands here... | ||
# run "$CM_RUN_CMD" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"alias": "get-lib-qaic-api", | ||
"automation_alias": "script", | ||
"automation_uid": "5b4e0237da074764", | ||
"cache": true, | ||
"category": "Detection or installation of tools and artifacts", | ||
"default_version": "master", | ||
"deps": [ | ||
{ | ||
"tags": "detect,os" | ||
} | ||
], | ||
"env": { | ||
}, | ||
"new_env_keys": [ | ||
"CM_LIB_QAIC_*", | ||
"+C_INCLUDE_PATH", | ||
"+CPLUS_INCLUDE_PATH", | ||
"+LD_LIBRARY_PATH" | ||
], | ||
"prehook_deps": [ | ||
], | ||
"tags": [ | ||
"get", | ||
"api", | ||
"lib-qaic-api", | ||
"lib", | ||
"qaic" | ||
], | ||
"uid": "1e253ae184e44f23", | ||
"versions": { | ||
"master": { | ||
"env": { | ||
"CM_LIB_QAIC_VERSION": "master" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
from cmind import utils | ||
import os | ||
|
||
def preprocess(i): | ||
os_info = i['os_info'] | ||
if os_info['platform'] == 'windows': | ||
return {'return':1, 'error': 'Windows is not supported in this script yet'} | ||
|
||
env = i['env'] | ||
|
||
#env['CM_GIT_CHECKOUT'] = env['CM_TMP_GIT_BRANCH_NAME'] | ||
|
||
return {'return':0} | ||
|
||
def postprocess(i): | ||
|
||
env = i['env'] | ||
|
||
paths = [ | ||
"+C_INCLUDE_PATH", | ||
"+CPLUS_INCLUDE_PATH", | ||
"+LD_LIBRARY_PATH", | ||
"+DYLD_FALLBACK_LIBRARY_PATH" | ||
] | ||
|
||
for key in paths: | ||
env[key] = [] | ||
|
||
include_paths = [ env['CM_TMP_CURRENT_SCRIPT_PATH'] ] | ||
|
||
for inc_path in include_paths: | ||
env['+C_INCLUDE_PATH'].append(inc_path) | ||
env['+CPLUS_INCLUDE_PATH'].append(inc_path) | ||
|
||
version = "master" | ||
env['CM_QAIC_API_SRC_FILE'] = os.path.join(env['CM_TMP_CURRENT_SCRIPT_PATH'], version, "QAicInfApi.cpp") | ||
env['CM_QAIC_API_INC_FILE'] = os.path.join(env['CM_TMP_CURRENT_SCRIPT_PATH'], version, "QAicInfApi.h") | ||
|
||
return {'return':0} |
Oops, something went wrong.