Skip to content

Commit 9a6a739

Browse files
committed
Update Readme
1 parent 4210f50 commit 9a6a739

File tree

1 file changed

+22
-13
lines changed

1 file changed

+22
-13
lines changed

boston_housing/README.md

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ We'll need a couple of files for MLCube, first we'll need to create a folder cal
3636
```bash
3737
├── mlcube
3838
│   ├── mlcube.yaml
39-
│   ├── mlcube_cli.py
4039
│   └── workspace
4140
│   └── parameters.yaml
4241
└── project
@@ -101,19 +100,30 @@ process.wait()
101100

102101
In this tutorial we already have a shell script containing the steps to run the train task, the file is: **project/run_and_time.sh**, please take a look and study its content.
103102

104-
### MLCube Python CLI file
103+
### MLCube Command
105104

106-
The **mlcube/mlcube_cli.py** file simulates MLCube CLI. It is temporary stored here, and is part of MLCube library. The only command avaibale to execute is `run`, and the possible arguments are:
105+
We are targeting pull-type installation, so MLCube images should be available on docker hub. If not, try this:
107106

108-
--mlcube TEXT Path to MLCube directory, default is current.
109-
--platform TEXT Platform to run MLCube, default is docker/podman.
110-
--task TEXT MLCube task name to run, default is `main`.
111-
--workspace TEXT Workspace path, default is `workspace` within MLCube folder
107+
```bash
108+
mlcube run ... -Pdocker.build_strategy=auto
109+
```
110+
111+
Parameters defined in mlcube.yaml can be overridden using: param=input, example:
112+
113+
```bash
114+
mlcube run --task=download_data data_dir=absolute_path_to_custom_dir
115+
```
116+
117+
Also, users can override the workspace directory by using:
118+
119+
```bash
120+
mlcube run --task=download_data --workspace=absolute_path_to_custom_dir
121+
```
112122

113-
Example:
123+
Note: Sometimes, overriding the workspace path could fail for some task, this is because the input parameter parameters_file should be specified, to solve this use:
114124

115125
```bash
116-
python mlcube_cli.py run --mlcube ./ --task train --platform docker
126+
mlcube run --task=train --workspace=absolute_path_to_custom_dir parameters_file=$(pwd)/workspace/parameters.yaml
117127
```
118128

119129
### MLCube Python entrypoint file
@@ -141,7 +151,6 @@ At this point our solution folder structure should look like this:
141151
```bash
142152
├── mlcube
143153
│   ├── mlcube.yaml
144-
│   ├── mlcube_cli.py
145154
│   └── workspace
146155
│   └── parameters.yaml
147156
└── project
@@ -209,13 +218,13 @@ The [Boston Housing Dataset](https://www.cs.toronto.edu/~delve/data/boston/bosto
209218
```bash
210219
# Download Boston housing dataset. Default path = /workspace/data
211220
# To override it, use --data_dir=DATA_DIR
212-
python mlcube_cli.py run --task download_data
221+
mlcube run --task download_data
213222

214223
# Preprocess Boston housing dataset, this will convert raw .txt data to .csv format
215224
# It will use the DATA_DIR path defined in the previous step
216-
python mlcube_cli.py run --task preprocess_data
225+
mlcube run --task preprocess_data
217226

218227
# Run training.
219228
# Parameters to override: --dataset_file_path=DATASET_FILE_PATH --parameters_file=PATH_TO_TRAINING_PARAMS
220-
python mlcube_cli.py run --task train
229+
mlcube run --task train
221230
```

0 commit comments

Comments
 (0)