Skip to content

Commit db88c49

Browse files
4
1 parent 2987ce5 commit db88c49

File tree

21 files changed

+295
-279
lines changed

21 files changed

+295
-279
lines changed

Diff for: .gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ docker-compose.override.yml
1313
logs/
1414
mage-ai.db
1515
mage_data/
16+
mlruns
1617
secrets/
1718
titanic_clean.csv
18-
mlruns

Diff for: Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM mageai/mageai:alpha
22

33
ARG PROJECT_NAME=mlops
4-
ARG MAGE_CODE_PATH=/home/mage_code
4+
ARG MAGE_CODE_PATH=/home/src
55
ARG USER_CODE_PATH=${MAGE_CODE_PATH}/${PROJECT_NAME}
66

77
WORKDIR ${MAGE_CODE_PATH}

Diff for: OLD/custom/inference.py

-78
This file was deleted.

Diff for: docker-compose.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ services:
88
ports:
99
- 6789:6789
1010
volumes:
11-
- .:/$MAGE_CODE_PATH
11+
- .:/$MAGE_CODE_PATH # /home/src by default
12+
# Store the data output on local machine to easily debug
13+
- ~/.mage_data:/$MAGE_CODE_PATH/mage_data # /home/src/mage_data by default
1214
restart: on-failure:5
1315
networks:
1416
- app-network

Diff for: mlops/settings.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ projects:
33
unit_1_data_preparation: {}
44
unit_2_training: {}
55
unit_3_observability: {}
6-
unit_4_running: {}
6+
unit_4_triggering: {}
77
unit_5_deploying: {}
Original file line numberDiff line numberDiff line change
@@ -1,87 +1,92 @@
11
blocks:
2-
- all_upstream_blocks_executed: true
3-
color: null
4-
configuration:
5-
global_data_product:
6-
uuid: training_set
7-
downstream_blocks: []
8-
executor_config: null
9-
executor_type: local_python
10-
has_callback: false
11-
language: python
12-
name: Training set
13-
retry_config: null
14-
status: executed
15-
timeout: null
16-
type: global_data_product
17-
upstream_blocks: []
18-
uuid: training_set
19-
- all_upstream_blocks_executed: true
20-
color: null
21-
configuration:
22-
file_source:
23-
path: null
24-
downstream_blocks:
25-
- xgboost
26-
- dashboard_data_source
27-
executor_config: null
28-
executor_type: local_python
29-
has_callback: false
30-
language: python
31-
name: xgboost Hyperparameter tuning
32-
retry_config: null
33-
status: executed
34-
timeout: null
35-
type: transformer
36-
upstream_blocks:
37-
- training_set
38-
uuid: hyperparameter_tuning/xgboost
39-
- all_upstream_blocks_executed: true
40-
color: null
41-
configuration:
42-
file_source:
43-
path: null
44-
downstream_blocks:
45-
- dashboard_data_source
46-
executor_config: null
47-
executor_type: local_python
48-
has_callback: false
49-
language: python
50-
name: XGBoost
51-
retry_config: null
52-
status: executed
53-
timeout: null
54-
type: data_exporter
55-
upstream_blocks:
56-
- hyperparameter_tuning/xgboost
57-
uuid: xgboost
58-
- all_upstream_blocks_executed: true
59-
color: pink
60-
configuration:
61-
file_source:
62-
path: null
63-
downstream_blocks: []
64-
executor_config: null
65-
executor_type: local_python
66-
has_callback: false
67-
language: python
68-
name: Dashboard data source
69-
retry_config: null
70-
status: executed
71-
timeout: null
72-
type: custom
73-
upstream_blocks:
74-
- hyperparameter_tuning/xgboost
75-
- xgboost
76-
uuid: dashboard_data_source
2+
- all_upstream_blocks_executed: true
3+
color: null
4+
configuration:
5+
global_data_product:
6+
uuid: training_set
7+
downstream_blocks:
8+
- xgboost
9+
executor_config: null
10+
executor_type: local_python
11+
has_callback: false
12+
language: python
13+
name: Training set
14+
retry_config: null
15+
status: executed
16+
timeout: null
17+
type: global_data_product
18+
upstream_blocks: []
19+
uuid: training_set
20+
- all_upstream_blocks_executed: true
21+
color: null
22+
configuration:
23+
file_path: unit_2_training/transformers/hyperparameter_tuning/xgboost.py
24+
file_source:
25+
path: unit_2_training/transformers/hyperparameter_tuning/xgboost.py
26+
downstream_blocks:
27+
- xgboost
28+
- dashboard_data_source
29+
executor_config: null
30+
executor_type: local_python
31+
has_callback: false
32+
language: python
33+
name: xgboost Hyperparameter tuning
34+
retry_config: null
35+
status: executed
36+
timeout: null
37+
type: transformer
38+
upstream_blocks:
39+
- training_set
40+
uuid: hyperparameter_tuning/xgboost
41+
- all_upstream_blocks_executed: true
42+
color: null
43+
configuration:
44+
file_path: unit_2_training/data_exporters/xgboost.py
45+
file_source:
46+
path: unit_2_training/data_exporters/xgboost.py
47+
downstream_blocks:
48+
- dashboard_data_source
49+
executor_config: null
50+
executor_type: local_python
51+
has_callback: false
52+
language: python
53+
name: XGBoost
54+
retry_config: null
55+
status: executed
56+
timeout: null
57+
type: data_exporter
58+
upstream_blocks:
59+
- training_set
60+
- hyperparameter_tuning/xgboost
61+
uuid: xgboost
62+
- all_upstream_blocks_executed: true
63+
color: pink
64+
configuration:
65+
file_path: unit_2_training/custom/dashboard_data_source.py
66+
file_source:
67+
path: unit_2_training/custom/dashboard_data_source.py
68+
downstream_blocks: []
69+
executor_config: null
70+
executor_type: local_python
71+
has_callback: false
72+
language: python
73+
name: Dashboard data source
74+
retry_config: null
75+
status: executed
76+
timeout: null
77+
type: custom
78+
upstream_blocks:
79+
- xgboost
80+
- hyperparameter_tuning/xgboost
81+
uuid: dashboard_data_source
7782
cache_block_output_in_memory: false
7883
callbacks: []
7984
concurrency_config: {}
8085
conditionals: []
81-
created_at: '2024-05-07 18:27:34.902705+00:00'
86+
created_at: "2024-05-07 18:27:34.902705+00:00"
8287
data_integration: null
83-
description: 'XGBoost is a scalable and efficient implementation of gradient boosted
84-
decision trees, a powerful ensemble machine learning technique. '
88+
description: "XGBoost is a scalable and efficient implementation of gradient boosted
89+
decision trees, a powerful ensemble machine learning technique. "
8590
executor_config: {}
8691
executor_count: 1
8792
executor_type: null
@@ -101,5 +106,5 @@ variables:
101106
early_stopping_rounds: 1
102107
max_depth: 1
103108
max_evaluations: 1
104-
variables_dir: /home/src/mage_data/unit_2_training
109+
variables_dir: /home/src/mage_data/unit_4_triggering
105110
widgets: []

Diff for: mlops/unit_3_observability/pipelines/xgboost_training/metadata.yaml

+11-5
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ blocks:
44
configuration:
55
global_data_product:
66
uuid: training_set
7-
downstream_blocks: []
7+
downstream_blocks:
8+
- xgboost
89
executor_config: null
910
executor_type: local_python
1011
has_callback: false
@@ -19,8 +20,9 @@ blocks:
1920
- all_upstream_blocks_executed: true
2021
color: null
2122
configuration:
23+
file_path: unit_2_training/transformers/hyperparameter_tuning/xgboost.py
2224
file_source:
23-
path: null
25+
path: unit_2_training/transformers/hyperparameter_tuning/xgboost.py
2426
downstream_blocks:
2527
- xgboost
2628
- dashboard_data_source
@@ -39,8 +41,9 @@ blocks:
3941
- all_upstream_blocks_executed: true
4042
color: null
4143
configuration:
44+
file_path: unit_2_training/data_exporters/xgboost.py
4245
file_source:
43-
path: null
46+
path: unit_2_training/data_exporters/xgboost.py
4447
downstream_blocks:
4548
- dashboard_data_source
4649
executor_config: null
@@ -53,13 +56,15 @@ blocks:
5356
timeout: null
5457
type: data_exporter
5558
upstream_blocks:
59+
- training_set
5660
- hyperparameter_tuning/xgboost
5761
uuid: xgboost
5862
- all_upstream_blocks_executed: true
5963
color: pink
6064
configuration:
65+
file_path: unit_2_training/custom/dashboard_data_source.py
6166
file_source:
62-
path: null
67+
path: unit_2_training/custom/dashboard_data_source.py
6368
downstream_blocks: []
6469
executor_config: null
6570
executor_type: local_python
@@ -71,8 +76,8 @@ blocks:
7176
timeout: null
7277
type: custom
7378
upstream_blocks:
74-
- hyperparameter_tuning/xgboost
7579
- xgboost
80+
- hyperparameter_tuning/xgboost
7681
uuid: dashboard_data_source
7782
cache_block_output_in_memory: false
7883
callbacks: []
@@ -101,4 +106,5 @@ variables:
101106
early_stopping_rounds: 1
102107
max_depth: 1
103108
max_evaluations: 1
109+
variables_dir: /home/src/mage_data/unit_4_triggering
104110
widgets: []

Diff for: mlops/unit_4_triggering/custom/dashboard_data_source.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010

1111
@custom
1212
def source(
13+
model: Booster,
1314
settings: Tuple[
1415
Dict[str, Union[bool, float, int, str]],
1516
csr_matrix,
1617
Series,
1718
],
18-
model: Booster,
1919
**kwargs,
2020
) -> Tuple[Booster, csr_matrix, csr_matrix]:
2121
_, X_train, y_train = settings

0 commit comments

Comments
 (0)