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
+14-16Lines changed: 14 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,12 +2,11 @@
2
2
3
3
In this tutorial we're going to use the [Boston Housing Dataset](https://www.cs.toronto.edu/~delve/data/boston/bostonDetail.html). We'll take an existing implementation, create the needed files to pack it into MLCube and execute all tasks.
4
4
5
-
6
5
## Original project code
7
6
8
7
At fist we have only 4 files, one for package dependencies and 3 scripts for each task: download data, preprocess data and train.
9
8
10
-
```
9
+
```bash
11
10
├── project
12
11
├── 01_download_dataset.py
13
12
├── 02_preprocess_dataset.py
@@ -30,12 +29,11 @@ The most important thing that we need to remember about these scripts are the in
30
29
**--dataset_file_path** : Processed dataset file path. Note: this is the full path to the csv file.
31
30
**--n_estimators** : Number of boosting stages to perform. In this case we're using a gradient boosting regressor.
32
31
33
-
34
32
## MLCube scructure
35
33
36
34
We'll need a couple of files for MLCube, first we'll need to create a folder called **mlcube** in the same path from as project folder. We'll need to create the following structure (for this tutorial the files are already in place)
37
35
38
-
```
36
+
```bash
39
37
├── mlcube
40
38
│ ├── mlcube.yaml
41
39
│ ├── mlcube_cli.py
@@ -103,7 +101,6 @@ process.wait()
103
101
104
102
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.
105
103
106
-
107
104
### MLCube Python CLI file
108
105
109
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:
@@ -115,11 +112,10 @@ The **mlcube/mlcube_cli.py** file simulates MLCube CLI. It is temporary stored h
115
112
116
113
Example:
117
114
118
-
```
115
+
```bash
119
116
python mlcube_cli.py run --mlcube ./ --task train --platform docker
120
117
```
121
118
122
-
123
119
### MLCube Python entrypoint file
124
120
125
121
At this point we know how to execute the tasks sripts from Python code, now we can create a file that contains the definition on how to run each task.
@@ -142,7 +138,7 @@ Keep in mind the tag that we just described.
142
138
143
139
At this point our solution folder structure should look like this:
144
140
145
-
```
141
+
```bash
146
142
├── mlcube
147
143
│ ├── mlcube.yaml
148
144
│ ├── mlcube_cli.py
@@ -158,7 +154,6 @@ At this point our solution folder structure should look like this:
158
154
└── run_and_time.sh
159
155
```
160
156
161
-
162
157
### Define MLCube files
163
158
164
159
Inside the mlcube folder we'll need to define the following files.
@@ -181,15 +176,17 @@ This file is already provided, please take a look and study its content.
181
176
182
177
With this file we have finished the packing of the project into MLCube! Now we can setup the project and run all the tasks.
0 commit comments