-
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
1 parent
922e9fa
commit 926ae67
Showing
1 changed file
with
160 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 |
---|---|---|
@@ -0,0 +1,160 @@ | ||
<details> | ||
<summary>Click here to see the table of contents.</summary> | ||
|
||
* [Description](#description) | ||
* [Information](#information) | ||
* [Usage](#usage) | ||
* [ CM installation](#cm-installation) | ||
* [ CM script automation help](#cm-script-automation-help) | ||
* [ CM CLI](#cm-cli) | ||
* [ CM Python API](#cm-python-api) | ||
* [ CM GUI](#cm-gui) | ||
* [ CM modular Docker container](#cm-modular-docker-container) | ||
* [Customization](#customization) | ||
* [ Script flags mapped to environment](#script-flags-mapped-to-environment) | ||
* [ 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) | ||
|
||
</details> | ||
|
||
*Note that this README is automatically generated - don't edit! Use `README-extra.md` to add more info.* | ||
|
||
### Description | ||
|
||
#### Information | ||
|
||
* 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/set-sqlite-dir)* | ||
* CM meta description for this script: *[_cm.json](_cm.json)* | ||
* CM "database" tags to find this script: *set,sqlite,dir,sqlite-dir* | ||
* Output cached?: *True* | ||
___ | ||
### Usage | ||
|
||
#### CM installation | ||
|
||
[Guide](https://github.com/mlcommons/ck/blob/master/docs/installation.md) | ||
|
||
##### CM pull repository | ||
|
||
```cm pull repo mlcommons@ck``` | ||
|
||
##### CM script automation help | ||
|
||
```cm run script --help``` | ||
|
||
#### CM CLI | ||
|
||
1. `cm run script --tags=set,sqlite,dir,sqlite-dir [--input_flags]` | ||
|
||
2. `cm run script "set sqlite dir sqlite-dir" [--input_flags]` | ||
|
||
3. `cm run script 05904966355a43ac [--input_flags]` | ||
|
||
* `variations` can be seen [here](#variations) | ||
|
||
* `input_flags` can be seen [here](#script-flags-mapped-to-environment) | ||
|
||
#### CM Python API | ||
|
||
<details> | ||
<summary>Click here to expand this section.</summary> | ||
|
||
```python | ||
|
||
import cmind | ||
|
||
r = cmind.access({'action':'run' | ||
'automation':'script', | ||
'tags':'set,sqlite,dir,sqlite-dir' | ||
'out':'con', | ||
... | ||
(other input keys for this script) | ||
... | ||
}) | ||
|
||
if r['return']>0: | ||
print (r['error']) | ||
|
||
``` | ||
|
||
</details> | ||
|
||
|
||
#### CM GUI | ||
|
||
```cm run script --tags=gui --script="set,sqlite,dir,sqlite-dir"``` | ||
|
||
Use this [online GUI](https://cKnowledge.org/cm-gui/?tags=set,sqlite,dir,sqlite-dir) to generate CM CMD. | ||
|
||
#### CM modular Docker container | ||
|
||
*TBD* | ||
|
||
___ | ||
### Customization | ||
|
||
|
||
#### Script flags mapped to environment | ||
<details> | ||
<summary>Click here to expand this section.</summary> | ||
|
||
* `--path=value` → `CM_SQLITE_PATH=value` | ||
|
||
**Above CLI flags can be used in the Python CM API as follows:** | ||
|
||
```python | ||
r=cm.access({... , "path":...} | ||
``` | ||
|
||
</details> | ||
|
||
#### Default environment | ||
|
||
<details> | ||
<summary>Click here to expand this section.</summary> | ||
|
||
These keys can be updated via `--env.KEY=VALUE` or `env` dictionary in `@input.json` or using script flags. | ||
|
||
|
||
</details> | ||
|
||
___ | ||
### Script workflow, dependencies and native scripts | ||
|
||
<details> | ||
<summary>Click here to expand this section.</summary> | ||
|
||
1. ***Read "deps" on other CM scripts from [meta](https://github.com/mlcommons/ck/tree/master/cm-mlops/script/set-sqlite-dir/_cm.json)*** | ||
* detect,os | ||
- CM script: [detect-os](https://github.com/mlcommons/ck/tree/master/cm-mlops/script/detect-os) | ||
* get,python3 | ||
* CM names: `--adr.['python', 'python3']...` | ||
- CM script: [get-python3](https://github.com/mlcommons/ck/tree/master/cm-mlops/script/get-python3) | ||
1. Run "preprocess" function from customize.py | ||
1. Read "prehook_deps" on other CM scripts from [meta](https://github.com/mlcommons/ck/tree/master/cm-mlops/script/set-sqlite-dir/_cm.json) | ||
1. ***Run native script if exists*** | ||
* [run.bat](https://github.com/mlcommons/ck/tree/master/cm-mlops/script/set-sqlite-dir/run.bat) | ||
* [run.sh](https://github.com/mlcommons/ck/tree/master/cm-mlops/script/set-sqlite-dir/run.sh) | ||
1. Read "posthook_deps" on other CM scripts from [meta](https://github.com/mlcommons/ck/tree/master/cm-mlops/script/set-sqlite-dir/_cm.json) | ||
1. ***Run "postrocess" function from [customize.py](https://github.com/mlcommons/ck/tree/master/cm-mlops/script/set-sqlite-dir/customize.py)*** | ||
1. Read "post_deps" on other CM scripts from [meta](https://github.com/mlcommons/ck/tree/master/cm-mlops/script/set-sqlite-dir/_cm.json) | ||
</details> | ||
|
||
___ | ||
### Script output | ||
#### New environment keys (filter) | ||
|
||
* `CM_SQLITE_PATH` | ||
#### New environment keys auto-detected from customize | ||
|
||
* `CM_SQLITE_PATH` | ||
___ | ||
### Maintainers | ||
|
||
* [Open MLCommons taskforce on automation and reproducibility](https://github.com/mlcommons/ck/blob/master/docs/taskforce.md) |