Skip to content

Commit

Permalink
Updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ctuning-admin committed Apr 15, 2024
1 parent 6a2a494 commit b5ea1e2
Showing 1 changed file with 21 additions and 38 deletions.
59 changes: 21 additions & 38 deletions cm-mlops/script/prune-docker/README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
Automatically generated README for this automation recipe: **print-hello-world**
Automatically generated README for this automation recipe: **prune-docker**

Category: **Tests**
Category: **Docker automation**

License: **Apache 2.0**

Maintainers: [Public MLCommons Task Force on Automation and Reproducibility](https://github.com/mlcommons/ck/blob/master/docs/taskforce.md)

---
*[ [Online info and GUI to run this CM script](https://access.cknowledge.org/playground/?action=scripts&name=print-hello-world,b9f0acba4aca4baa) ]*
*[ [Online info and GUI to run this CM script](https://access.cknowledge.org/playground/?action=scripts&name=prune-docker,27ead88809bb4d4e) ]*

---
#### Summary

* CM GitHub repository: *[mlcommons@ck](https://github.com/mlcommons/ck/tree/dev/cm-mlops)*
* GitHub directory for this script: *[GitHub](https://github.com/mlcommons/ck/tree/dev/cm-mlops/script/print-hello-world)*
* GitHub directory for this script: *[GitHub](https://github.com/mlcommons/ck/tree/dev/cm-mlops/script/prune-docker)*
* CM meta description for this script: *[_cm.json](_cm.json)*
* All CM tags to find and reuse this script (see in above meta description): *print,hello-world,hello world,hello,world,native-script,native,script*
* All CM tags to find and reuse this script (see in above meta description): *prune,docker*
* Output cached? *False*
* See [pipeline of dependencies](#dependencies-on-other-cm-scripts) on other CM scripts

Expand All @@ -34,19 +34,19 @@ Maintainers: [Public MLCommons Task Force on Automation and Reproducibility](htt

#### Print CM help from the command line

````cmr "print hello-world hello world hello world native-script native script" --help````
````cmr "prune docker" --help````

#### Customize and run this script from the command line with different variations and flags

`cm run script --tags=print,hello-world,hello world,hello,world,native-script,native,script`
`cm run script --tags=prune,docker`

`cm run script --tags=print,hello-world,hello world,hello,world,native-script,native,script [--input_flags]`
`cm run script --tags=prune,docker `

*or*

`cmr "print hello-world hello world hello world native-script native script"`
`cmr "prune docker"`

`cmr "print hello-world hello world hello world native-script native script " [--input_flags]`
`cmr "prune docker " `


#### Run this script from Python
Expand All @@ -60,7 +60,7 @@ import cmind

r = cmind.access({'action':'run'
'automation':'script',
'tags':'print,hello-world,hello world,hello,world,native-script,native,script'
'tags':'prune,docker'
'out':'con',
...
(other input keys for this script)
Expand All @@ -77,61 +77,44 @@ if r['return']>0:

#### Run this script via GUI

```cmr "cm gui" --script="print,hello-world,hello world,hello,world,native-script,native,script"```
```cmr "cm gui" --script="prune,docker"```

Use this [online GUI](https://cKnowledge.org/cm-gui/?tags=print,hello-world,hello world,hello,world,native-script,native,script) to generate CM CMD.
Use this [online GUI](https://cKnowledge.org/cm-gui/?tags=prune,docker) to generate CM CMD.

#### Run this script via Docker (beta)

`cm docker script "print hello-world hello world hello world native-script native script" [--input_flags]`
`cm docker script "prune docker" `

___
### Customization


#### Script flags mapped to environment
<details>
<summary>Click here to expand this section.</summary>

* `--test1=value` &rarr; `CM_ENV_TEST1=value`

**Above CLI flags can be used in the Python CM API as follows:**

```python
r=cm.access({... , "test1":...}
```

</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.

* CM_ENV_TEST1: `TEST1`

</details>

___
### Dependencies on other CM scripts


1. Read "deps" on other CM scripts from [meta](https://github.com/mlcommons/ck/tree/dev/cm-mlops/script/print-hello-world/_cm.json)
1. Read "deps" on other CM scripts from [meta](https://github.com/mlcommons/ck/tree/dev/cm-mlops/script/prune-docker/_cm.json)
1. Run "preprocess" function from customize.py
1. Read "prehook_deps" on other CM scripts from [meta](https://github.com/mlcommons/ck/tree/dev/cm-mlops/script/print-hello-world/_cm.json)
1. Read "prehook_deps" on other CM scripts from [meta](https://github.com/mlcommons/ck/tree/dev/cm-mlops/script/prune-docker/_cm.json)
1. ***Run native script if exists***
* [run.bat](https://github.com/mlcommons/ck/tree/dev/cm-mlops/script/print-hello-world/run.bat)
* [run.sh](https://github.com/mlcommons/ck/tree/dev/cm-mlops/script/print-hello-world/run.sh)
1. Read "posthook_deps" on other CM scripts from [meta](https://github.com/mlcommons/ck/tree/dev/cm-mlops/script/print-hello-world/_cm.json)
* [run.bat](https://github.com/mlcommons/ck/tree/dev/cm-mlops/script/prune-docker/run.bat)
* [run.sh](https://github.com/mlcommons/ck/tree/dev/cm-mlops/script/prune-docker/run.sh)
1. Read "posthook_deps" on other CM scripts from [meta](https://github.com/mlcommons/ck/tree/dev/cm-mlops/script/prune-docker/_cm.json)
1. Run "postrocess" function from customize.py
1. Read "post_deps" on other CM scripts from [meta](https://github.com/mlcommons/ck/tree/dev/cm-mlops/script/print-hello-world/_cm.json)
1. Read "post_deps" on other CM scripts from [meta](https://github.com/mlcommons/ck/tree/dev/cm-mlops/script/prune-docker/_cm.json)

___
### Script output
`cmr "print hello-world hello world hello world native-script native script " [--input_flags] -j`
`cmr "prune docker " -j`
#### New environment keys (filter)

* `CM_ENV_TEST*`
#### New environment keys auto-detected from customize

0 comments on commit b5ea1e2

Please sign in to comment.