forked from mlcommons/ck
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added test_deps for cm-scripts, mlcommons#275
- Loading branch information
1 parent
63c1e6d
commit 9f48b14
Showing
3 changed files
with
20 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,3 +32,4 @@ jobs: | |
- name: Test CM Script | ||
run: | | ||
python tests/script/test_install.py | ||
python tests/script/test_deps.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,18 @@ | ||
# This test covers version, variation, compilation from src, add_deps_recursive, post_deps | ||
try: | ||
import cmind as cm | ||
|
||
r = cm.access({'action':'run', 'automation':'script', 'tags': 'generate-run-cmds,mlperf', 'add_deps_recursive': | ||
{'inference-src': {'tags': '_octoml'}, 'loadgen': {'version': 'r2.1'}}, 'env': {'CM_MODEL': 'resnet50', | ||
'CM_DEVICE': 'cpu', 'CM_BACKEND': 'onnxruntime'}}) | ||
if 'return' not in r: | ||
raise Exception('CM access function should always return key \'return\'!') | ||
if 'error' in r: | ||
raise Exception(r['error']) | ||
|
||
exit(0) | ||
|
||
except ImportError as e: | ||
from sys import stderr | ||
print('CM module for python is not installed', file=stderr) | ||
exit(1) |
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# This test covers script installation, version, shared library install | ||
try: | ||
import cmind as cm | ||
|
||
|