From 8ad5582526c1d55794e79eb22d787a594338d63e Mon Sep 17 00:00:00 2001 From: Grigori Fursin Date: Sun, 3 Mar 2024 22:40:41 +0000 Subject: [PATCH] moved unused tools to another repo for tools under evaluation --- cm-mlops/script/get-axs/README-extra.md | 5 - cm-mlops/script/get-axs/README.md | 145 ------------------ cm-mlops/script/get-axs/_cm.yaml | 38 ----- cm-mlops/script/get-axs/customize.py | 38 ----- .../patch/fix-python-name-on-windows.patch | 7 - cm-mlops/script/get-axs/run.bat | 1 - cm-mlops/script/get-axs/run.sh | 27 ---- 7 files changed, 261 deletions(-) delete mode 100644 cm-mlops/script/get-axs/README-extra.md delete mode 100644 cm-mlops/script/get-axs/README.md delete mode 100644 cm-mlops/script/get-axs/_cm.yaml delete mode 100644 cm-mlops/script/get-axs/customize.py delete mode 100644 cm-mlops/script/get-axs/patch/fix-python-name-on-windows.patch delete mode 100644 cm-mlops/script/get-axs/run.bat delete mode 100644 cm-mlops/script/get-axs/run.sh diff --git a/cm-mlops/script/get-axs/README-extra.md b/cm-mlops/script/get-axs/README-extra.md deleted file mode 100644 index 6aa4f450f4..0000000000 --- a/cm-mlops/script/get-axs/README-extra.md +++ /dev/null @@ -1,5 +0,0 @@ -# CM script - -```bash -cm run "get axs" --shell -``` diff --git a/cm-mlops/script/get-axs/README.md b/cm-mlops/script/get-axs/README.md deleted file mode 100644 index 8450e0d021..0000000000 --- a/cm-mlops/script/get-axs/README.md +++ /dev/null @@ -1,145 +0,0 @@ -
-Click here to see the table of contents. - -* [About](#about) -* [Summary](#summary) -* [Reuse this script in your project](#reuse-this-script-in-your-project) - * [ Install CM automation language](#install-cm-automation-language) - * [ Check CM script flags](#check-cm-script-flags) - * [ Run this script from command line](#run-this-script-from-command-line) - * [ Run this script from Python](#run-this-script-from-python) - * [ Run this script via GUI](#run-this-script-via-gui) - * [ Run this script via Docker (beta)](#run-this-script-via-docker-(beta)) -* [Customization](#customization) - * [ Default environment](#default-environment) -* [Script workflow, dependencies and native scripts](#script-workflow-dependencies-and-native-scripts) -* [Script output](#script-output) -* [New environment keys (filter)](#new-environment-keys-(filter)) -* [New environment keys auto-detected from customize](#new-environment-keys-auto-detected-from-customize) -* [Maintainers](#maintainers) - -
- -*Note that this README is automatically generated - don't edit!* - -### About - - -See extra [notes](README-extra.md) from the authors and contributors. - -#### Summary - -* Category: *Detection or installation of tools and artifacts.* -* CM GitHub repository: *[mlcommons@ck](https://github.com/mlcommons/ck/tree/master/cm-mlops)* -* GitHub directory for this script: *[GitHub](https://github.com/mlcommons/ck/tree/master/cm-mlops/script/get-axs)* -* CM meta description for this script: *[_cm.yaml](_cm.yaml)* -* CM "database" tags to find this script: *get,axs* -* Output cached? *True* -___ -### Reuse this script in your project - -#### Install CM automation language - -* [Installation guide](https://github.com/mlcommons/ck/blob/master/docs/installation.md) -* [CM intro](https://doi.org/10.5281/zenodo.8105339) - -#### Pull CM repository with this automation - -```cm pull repo mlcommons@ck``` - - -#### Run this script from command line - -1. `cm run script --tags=get,axs ` - -2. `cmr "get axs" ` - -#### Run this script from Python - -
-Click here to expand this section. - -```python - -import cmind - -r = cmind.access({'action':'run' - 'automation':'script', - 'tags':'get,axs' - 'out':'con', - ... - (other input keys for this script) - ... - }) - -if r['return']>0: - print (r['error']) - -``` - -
- - -#### Run this script via GUI - -```cmr "cm gui" --script="get,axs"``` - -Use this [online GUI](https://cKnowledge.org/cm-gui/?tags=get,axs) to generate CM CMD. - -#### Run this script via Docker (beta) - -`cm docker script "get axs" ` - -___ -### Customization - -#### Default environment - -
-Click here to expand this section. - -These keys can be updated via `--env.KEY=VALUE` or `env` dictionary in `@input.json` or using script flags. - - -
- -___ -### Script workflow, dependencies and native scripts - -
-Click here to expand this section. - - 1. ***Read "deps" on other CM scripts from [meta](https://github.com/mlcommons/ck/tree/master/cm-mlops/script/get-axs/_cm.yaml)*** - * detect,os - - CM script: [detect-os](https://github.com/mlcommons/ck/tree/master/cm-mlops/script/detect-os) - * get,sys-utils-cm - - CM script: [get-sys-utils-cm](https://github.com/mlcommons/ck/tree/master/cm-mlops/script/get-sys-utils-cm) - * get,python3 - * CM names: `--adr.['python', 'python3']...` - - CM script: [get-python3](https://github.com/mlcommons/ck/tree/master/cm-mlops/script/get-python3) - * get,git,repo,_repo.https://github.com/krai/axs - * CM names: `--adr.['axs-repo']...` - - CM script: [get-git-repo](https://github.com/mlcommons/ck/tree/master/cm-mlops/script/get-git-repo) - 1. ***Run "preprocess" function from [customize.py](https://github.com/mlcommons/ck/tree/master/cm-mlops/script/get-axs/customize.py)*** - 1. Read "prehook_deps" on other CM scripts from [meta](https://github.com/mlcommons/ck/tree/master/cm-mlops/script/get-axs/_cm.yaml) - 1. ***Run native script if exists*** - * [run.bat](https://github.com/mlcommons/ck/tree/master/cm-mlops/script/get-axs/run.bat) - * [run.sh](https://github.com/mlcommons/ck/tree/master/cm-mlops/script/get-axs/run.sh) - 1. Read "posthook_deps" on other CM scripts from [meta](https://github.com/mlcommons/ck/tree/master/cm-mlops/script/get-axs/_cm.yaml) - 1. ***Run "postrocess" function from [customize.py](https://github.com/mlcommons/ck/tree/master/cm-mlops/script/get-axs/customize.py)*** - 1. Read "post_deps" on other CM scripts from [meta](https://github.com/mlcommons/ck/tree/master/cm-mlops/script/get-axs/_cm.yaml) -
- -___ -### Script output -`cmr "get axs" -j` -#### New environment keys (filter) - -* `+PATH` -* `CM_AXS_PATH` -#### New environment keys auto-detected from customize - -___ -### Maintainers - -* [Open MLCommons taskforce on automation and reproducibility](https://github.com/mlcommons/ck/blob/master/docs/taskforce.md) \ No newline at end of file diff --git a/cm-mlops/script/get-axs/_cm.yaml b/cm-mlops/script/get-axs/_cm.yaml deleted file mode 100644 index 125557df35..0000000000 --- a/cm-mlops/script/get-axs/_cm.yaml +++ /dev/null @@ -1,38 +0,0 @@ -alias: get-axs -uid: 4b4a8d9999bb4368 - -automation_alias: script -automation_uid: 5b4e0237da074764 - -cache: true - -tags: -- get -- axs - -category: Detection or installation of tools and artifacts - -new_env_keys: - - CM_AXS_PATH - - "+PATH" - -deps: - - - tags: detect,os - - - tags: get,sys-utils-cm - - - names: - - python - - python3 - tags: get,python3 - - - tags: get,git,repo,_repo.https://github.com/krai/axs - names: - - axs-repo - extra_cache_tags: git-axs - env: - CM_GIT_CHECKOUT_PATH_ENV_NAME: CM_AXS_PATH - -print_env_at_the_end: - CM_AXS_PATH: "Path to the tool" diff --git a/cm-mlops/script/get-axs/customize.py b/cm-mlops/script/get-axs/customize.py deleted file mode 100644 index df98127a8c..0000000000 --- a/cm-mlops/script/get-axs/customize.py +++ /dev/null @@ -1,38 +0,0 @@ -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): - - os_info = i['os_info'] - - script_path = i['artifact'].path - - env = i['env'] - - path = env['CM_AXS_PATH'] - env['+PATH'] = [ path ] - - if os_info['platform'] == 'windows': - os.chdir(path) - - # Applying patch - cmd = 'patch -p1 < {}'.format(os.path.join(script_path, 'patch', 'fix-python-name-on-windows.patch')) - - print ('Patching code: {}'.format(cmd)) - os.system(cmd) - - return {'return':0} diff --git a/cm-mlops/script/get-axs/patch/fix-python-name-on-windows.patch b/cm-mlops/script/get-axs/patch/fix-python-name-on-windows.patch deleted file mode 100644 index 5e48a826f9..0000000000 --- a/cm-mlops/script/get-axs/patch/fix-python-name-on-windows.patch +++ /dev/null @@ -1,7 +0,0 @@ -diff -Naur repo\axs.bat repo.new\axs.bat ---- repo\axs.bat Thu Feb 29 20:26:24 2024 -+++ repo.new\axs.bat Thu Feb 29 20:25:30 2024 -@@ -1,2 +1,2 @@ - @set PATH_TO_THIS_DIR=%~dp0 --@python3 %PATH_TO_THIS_DIR%axs %* -+@python %PATH_TO_THIS_DIR%axs %* diff --git a/cm-mlops/script/get-axs/run.bat b/cm-mlops/script/get-axs/run.bat deleted file mode 100644 index 648302ca71..0000000000 --- a/cm-mlops/script/get-axs/run.bat +++ /dev/null @@ -1 +0,0 @@ -rem native script diff --git a/cm-mlops/script/get-axs/run.sh b/cm-mlops/script/get-axs/run.sh deleted file mode 100644 index 3a584c10cf..0000000000 --- a/cm-mlops/script/get-axs/run.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/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"