You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: boston_housing/README.md
+22-13Lines changed: 22 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,6 @@ We'll need a couple of files for MLCube, first we'll need to create a folder cal
36
36
```bash
37
37
├── mlcube
38
38
│ ├── mlcube.yaml
39
-
│ ├── mlcube_cli.py
40
39
│ └── workspace
41
40
│ └── parameters.yaml
42
41
└── project
@@ -101,19 +100,30 @@ process.wait()
101
100
102
101
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.
103
102
104
-
### MLCube Python CLI file
103
+
### MLCube Command
105
104
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:
107
106
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
+
```
112
122
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:
114
124
115
125
```bash
116
-
python mlcube_cli.py run --mlcube ./ --tasktrain --platform docker
126
+
mlcube run --task=train --workspace=absolute_path_to_custom_dir parameters_file=$(pwd)/workspace/parameters.yaml
117
127
```
118
128
119
129
### MLCube Python entrypoint file
@@ -141,7 +151,6 @@ At this point our solution folder structure should look like this:
141
151
```bash
142
152
├── mlcube
143
153
│ ├── mlcube.yaml
144
-
│ ├── mlcube_cli.py
145
154
│ └── workspace
146
155
│ └── parameters.yaml
147
156
└── project
@@ -209,13 +218,13 @@ The [Boston Housing Dataset](https://www.cs.toronto.edu/~delve/data/boston/bosto
209
218
```bash
210
219
# Download Boston housing dataset. Default path = /workspace/data
211
220
# To override it, use --data_dir=DATA_DIR
212
-
python mlcube_cli.py run --task download_data
221
+
mlcube run --task download_data
213
222
214
223
# Preprocess Boston housing dataset, this will convert raw .txt data to .csv format
215
224
# 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
217
226
218
227
# Run training.
219
228
# Parameters to override: --dataset_file_path=DATASET_FILE_PATH --parameters_file=PATH_TO_TRAINING_PARAMS
0 commit comments