Skip to content

Commit

Permalink
- fixed yaml generation when adding new scripts
Browse files Browse the repository at this point in the history
- improved get,cudnn
- a few minor clean ups
  • Loading branch information
gfursin committed Jan 27, 2024
1 parent 01e4a66 commit bcd65fb
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 21 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ from [MLCommons projects](https://mlcommons.org) and [research papers](https://c
in a unified way on any operating system with any software and hardware
either natively or inside containers.

Here are some most commonly used examples from the community:
Here are some most commonly used examples from our users:

```bash
pip install cmind
Expand Down Expand Up @@ -89,7 +89,7 @@ running experiments, processing logs, and reproducing results
without thinking where and how they run.

That is why we implemented CM as a [small Python library](https://github.com/mlcommons/ck/tree/master/cm)
with minimal dependencies (Python 3.7+, git, wget), simple Python API, StreamLit GUI and human-friendly command line.
with minimal dependencies (Python 3.7+, git, wget), simple Python API, GUI and human-friendly command line.
CM simply searches for CM scripts by tags or Unique IDs in all pulled Git repositories, automatically generates command lines
for a given script or tool on a given platform, updates all paths and environment variables,
runs a given automation either natively or inside automatically-generated containers
Expand Down
36 changes: 24 additions & 12 deletions cm-mlops/automation/script/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -2125,6 +2125,16 @@ def add(self, i):
tags_list = utils.convert_tags_to_list(i)
if 'tags' in i: del(i['tags'])

if len(tags_list)==0:
if console:
x=input('Please specify a combination of unique tags separated by comma for this script: ')
x = x.strip()
if x!='':
tags_list = x.split(',')

if len(tags_list)==0:
return {'return':1, 'error':'you must specify a combination of unique tags separate by comman using "--new_tags"'}

# Add placeholder (use common action)
ii['out']='con'
ii['common']=True # Avoid recursion - use internal CM add function to add the script artifact
Expand All @@ -2150,18 +2160,19 @@ def add(self, i):

# Check if preloaded meta exists
meta = {
'cache':False,
'new_env_keys':[],
'new_state_keys':[],
'input_mapping':{},
'docker_input_mapping':{},
'deps':[],
'prehook_deps':[],
'posthook_deps':[],
'post_deps':[],
'versions':{},
'variations':{},
'input_description':{}
'cache':False
# 20240127: Grigori commented that because newly created script meta looks ugly
# 'new_env_keys':[],
# 'new_state_keys':[],
# 'input_mapping':{},
# 'docker_input_mapping':{},
# 'deps':[],
# 'prehook_deps':[],
# 'posthook_deps':[],
# 'post_deps':[],
# 'versions':{},
# 'variations':{},
# 'input_description':{}
}

fmeta = os.path.join(template_path, self.cmind.cfg['file_cmeta'])
Expand Down Expand Up @@ -2200,6 +2211,7 @@ def add(self, i):
ii['yaml']=True

ii['automation']='script,5b4e0237da074764'

r_obj=self.cmind.access(ii)
if r_obj['return']>0: return r_obj

Expand Down
11 changes: 6 additions & 5 deletions cm-mlops/script/app-image-classification-onnx-py/README-extra.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ See [this tutorial](https://github.com/mlcommons/ck/blob/master/docs/tutorials/m

# Collaborative testing

## Windows 11

* CUDA 11.8; cuDNN 8.7.0; ONNX GPU 1.16.1

## Windows 10

* ONNX Runtime 1.13.1 with CPU and CUDA
* CUDA 11.6
* cuDNN 8.5.0.96
* CUDA 11.6; cuDNN 8.6.0.96; ONNX GPU 1.13.1

## Ubuntu 22.04

* ONNX Runtime 1.12.0 with CPU and CUDA
* CUDA 11.3
* CUDA 11.3; ONNX 1.12.0
3 changes: 3 additions & 0 deletions cm-mlops/script/get-cudnn/README-extra.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# TBD

We need to add detection of cuDNN version on Windows, Linux and MacOS
1 change: 1 addition & 0 deletions cm-mlops/script/get-cudnn/customize.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def preprocess(i):

libfilename = extra_pre + 'cudnn.' +extra_ext
env['CM_CUDNN_VERSION'] = 'vdetected'

if os.path.exists(os.path.join(cuda_path_lib, libfilename)):
env['CM_CUDA_PATH_LIB_CUDNN'] = env['CM_CUDA_PATH_LIB']
return {'return': 0}
Expand Down
1 change: 1 addition & 0 deletions cm-mlops/script/get-generic-python-lib/customize.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ def preprocess(i):
return automation._available_variations({'meta':meta})

if package_name == "onnxruntime_gpu":
# https://onnxruntime.ai/docs/execution-providers/CUDA-ExecutionProvider.html#requirements
cuda_version_split = env['CM_CUDA_VERSION'].split(".")
if int(cuda_version_split[0]) >= 12:
# env['CM_INSTALL_ONNXRUNTIME_GPU_FROM_SRC'] = "yes"
Expand Down
2 changes: 1 addition & 1 deletion cm/cmind/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "1.6.0"
__version__ = "1.6.0.1"

from cmind.core import access
from cmind.core import error
Expand Down
2 changes: 1 addition & 1 deletion cmr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ alias: mlcommons@ck
git: true
prefix: cm-mlops
uid: a4705959af8e447a
version: 1.5.4
version: 1.6.0

0 comments on commit bcd65fb

Please sign in to comment.