Skip to content

Commit

Permalink
added MLFlow
Browse files Browse the repository at this point in the history
  • Loading branch information
abhijitpaul0212 committed Nov 19, 2023
1 parent e5aed31 commit f883fca
Show file tree
Hide file tree
Showing 89 changed files with 193,665 additions and 193,209 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,21 @@ pip install -r requirement.txt
* Data Transformation (Feature Engineering, Data Preprocessing)
* Model Builing (Create a model using the processed data)

## MLFlow & DagsHub
Copy the values from DagsHub > Repo > Remote > Experiments

```bash
set MLFLOW_TRACKING_URI=<>
set MLFLOW_TRACKING_USERNAME=<>
set MLFLOW_TRACKING_PASSWORD<>
```
If the above are not set, then ML Experiments gets registered in local system else gets published to DagsHub

#### Command to train the pipeline
```bash
python src\GemstonePricePrediction\pipelines\training_pipeline.py
```

### Prediction Pipeline
* Two types of prediction pipeline
* Single record prediction
Expand Down
Binary file modified artifacts/explainer.joblib
Binary file not shown.
Binary file modified artifacts/model.pkl
Binary file not shown.
Binary file modified artifacts/model_report.pkl
Binary file not shown.
Binary file modified artifacts/preprocessor.pkl
Binary file not shown.
96,572 changes: 48,286 additions & 48,286 deletions artifacts/test.csv

Large diffs are not rendered by default.

289,828 changes: 144,914 additions & 144,914 deletions artifacts/train.csv

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions mlruns/0/385b51ccb8444a008c4377014ed9bf89/artifacts/model/MLmodel
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
run_id: 385b51ccb8444a008c4377014ed9bf89
artifact_path: model
utc_time_created: '2023-11-19 08:11:59.247602'
flavors:
python_function:
model_path: model.pkl
predict_fn: predict
loader_module: mlflow.sklearn
python_version: 3.9.0
env:
conda: conda.yaml
virtualenv: python_env.yaml
sklearn:
pickled_model: model.pkl
sklearn_version: 1.3.2
serialization_format: cloudpickle
code: null
model_uuid: d9fc9af67691406eb91023576a0d8566
mlflow_version: 2.8.1
model_size_bytes: 728
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: mlflow-env
channels:
- conda-forge
dependencies:
- python=3.9.0
- pip<=23.3
- pip:
- mlflow==2.8.1
- cloudpickle==2.2.1
- numpy==1.24.4
- packaging==23.2
- psutil==5.9.6
- pyyaml==6.0.1
- scikit-learn==1.3.2
- scipy==1.11.4
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
python: 3.9.0
build_dependencies:
- pip==23.3
- setuptools
- wheel==0.41.2
dependencies:
- -r requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
mlflow==2.8.1
cloudpickle==2.2.1
numpy==1.24.4
packaging==23.2
psutil==5.9.6
pyyaml==6.0.1
scikit-learn==1.3.2
scipy==1.11.4
15 changes: 15 additions & 0 deletions mlruns/0/385b51ccb8444a008c4377014ed9bf89/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
artifact_uri: file:///C:/Users/abpaul/Documents/Learnings/iNeuron/MLProjects/GemstonePricePrediction/mlruns/0/385b51ccb8444a008c4377014ed9bf89/artifacts
end_time: 1700381524935
experiment_id: '0'
lifecycle_stage: active
run_id: 385b51ccb8444a008c4377014ed9bf89
run_name: bustling-cub-607
run_uuid: 385b51ccb8444a008c4377014ed9bf89
start_time: 1700381519164
status: 3
user_id: abpaul
tags: []
source_type: 4
source_name: ''
entry_point_name: ''
source_version: ''
1 change: 1 addition & 0 deletions mlruns/0/385b51ccb8444a008c4377014ed9bf89/metrics/mae
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1700381519232 679.4576654440706 0
1 change: 1 addition & 0 deletions mlruns/0/385b51ccb8444a008c4377014ed9bf89/metrics/r2
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1700381519238 0.9364142719458204 0
1 change: 1 addition & 0 deletions mlruns/0/385b51ccb8444a008c4377014ed9bf89/metrics/rmse
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1700381519225 1018.9563461861268 0
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"run_id": "385b51ccb8444a008c4377014ed9bf89", "artifact_path": "model", "utc_time_created": "2023-11-19 08:11:59.247602", "flavors": {"python_function": {"model_path": "model.pkl", "predict_fn": "predict", "loader_module": "mlflow.sklearn", "python_version": "3.9.0", "env": {"conda": "conda.yaml", "virtualenv": "python_env.yaml"}}, "sklearn": {"pickled_model": "model.pkl", "sklearn_version": "1.3.2", "serialization_format": "cloudpickle", "code": null}}, "model_uuid": "d9fc9af67691406eb91023576a0d8566", "mlflow_version": "2.8.1", "model_size_bytes": 728}]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bustling-cub-607
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
e5aed3161769b01d93b425a7da547154e9006b86
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
c:/Users/abpaul/Documents/Learnings/iNeuron/MLProjects/GemstonePricePrediction/src/GemstonePricePrediction/pipelines/training_pipeline.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
LOCAL
1 change: 1 addition & 0 deletions mlruns/0/385b51ccb8444a008c4377014ed9bf89/tags/mlflow.user
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
abpaul
20 changes: 20 additions & 0 deletions mlruns/0/68c6b1d75e9f4530b2e4e336e0edd612/artifacts/model/MLmodel
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
run_id: 68c6b1d75e9f4530b2e4e336e0edd612
artifact_path: model
utc_time_created: '2023-11-19 10:19:35.324656'
flavors:
python_function:
model_path: model.pkl
predict_fn: predict
loader_module: mlflow.sklearn
python_version: 3.9.0
env:
conda: conda.yaml
virtualenv: python_env.yaml
sklearn:
pickled_model: model.pkl
sklearn_version: 1.3.2
serialization_format: cloudpickle
code: null
model_uuid: eb4a793abca244c58dce3cc791be3038
mlflow_version: 2.8.1
model_size_bytes: 728
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: mlflow-env
channels:
- conda-forge
dependencies:
- python=3.9.0
- pip<=23.3
- pip:
- mlflow==2.8.1
- cloudpickle==2.2.1
- numpy==1.24.4
- packaging==23.2
- psutil==5.9.6
- pyyaml==6.0.1
- scikit-learn==1.3.2
- scipy==1.11.4
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
python: 3.9.0
build_dependencies:
- pip==23.3
- setuptools
- wheel==0.41.2
dependencies:
- -r requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
mlflow==2.8.1
cloudpickle==2.2.1
numpy==1.24.4
packaging==23.2
psutil==5.9.6
pyyaml==6.0.1
scikit-learn==1.3.2
scipy==1.11.4
15 changes: 15 additions & 0 deletions mlruns/0/68c6b1d75e9f4530b2e4e336e0edd612/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
artifact_uri: file:///C:/Users/abpaul/Documents/Learnings/iNeuron/MLProjects/GemstonePricePrediction/mlruns/0/68c6b1d75e9f4530b2e4e336e0edd612/artifacts
end_time: 1700389180773
experiment_id: '0'
lifecycle_stage: active
run_id: 68c6b1d75e9f4530b2e4e336e0edd612
run_name: abrasive-frog-952
run_uuid: 68c6b1d75e9f4530b2e4e336e0edd612
start_time: 1700389175251
status: 3
user_id: abpaul
tags: []
source_type: 4
source_name: ''
entry_point_name: ''
source_version: ''
1 change: 1 addition & 0 deletions mlruns/0/68c6b1d75e9f4530b2e4e336e0edd612/metrics/mae
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1700389175313 675.4174025987501 0
1 change: 1 addition & 0 deletions mlruns/0/68c6b1d75e9f4530b2e4e336e0edd612/metrics/r2
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1700389175317 0.9375814851967132 0
1 change: 1 addition & 0 deletions mlruns/0/68c6b1d75e9f4530b2e4e336e0edd612/metrics/rmse
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1700389175308 1011.1797262324923 0
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"run_id": "68c6b1d75e9f4530b2e4e336e0edd612", "artifact_path": "model", "utc_time_created": "2023-11-19 10:19:35.324656", "flavors": {"python_function": {"model_path": "model.pkl", "predict_fn": "predict", "loader_module": "mlflow.sklearn", "python_version": "3.9.0", "env": {"conda": "conda.yaml", "virtualenv": "python_env.yaml"}}, "sklearn": {"pickled_model": "model.pkl", "sklearn_version": "1.3.2", "serialization_format": "cloudpickle", "code": null}}, "model_uuid": "eb4a793abca244c58dce3cc791be3038", "mlflow_version": "2.8.1", "model_size_bytes": 728}]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
abrasive-frog-952
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
e5aed3161769b01d93b425a7da547154e9006b86
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
c:/Users/abpaul/Documents/Learnings/iNeuron/MLProjects/GemstonePricePrediction/src/GemstonePricePrediction/pipelines/training_pipeline.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
LOCAL
1 change: 1 addition & 0 deletions mlruns/0/68c6b1d75e9f4530b2e4e336e0edd612/tags/mlflow.user
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
abpaul
20 changes: 20 additions & 0 deletions mlruns/0/716ba66c871c49efa5cc5aa5937468d4/artifacts/model/MLmodel
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
run_id: 716ba66c871c49efa5cc5aa5937468d4
artifact_path: model
utc_time_created: '2023-11-19 08:56:58.318461'
flavors:
python_function:
model_path: model.pkl
predict_fn: predict
loader_module: mlflow.sklearn
python_version: 3.9.0
env:
conda: conda.yaml
virtualenv: python_env.yaml
sklearn:
pickled_model: model.pkl
sklearn_version: 1.3.2
serialization_format: cloudpickle
code: null
model_uuid: 847efeac6824431ea39e3deabe099219
mlflow_version: 2.8.1
model_size_bytes: 772
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: mlflow-env
channels:
- conda-forge
dependencies:
- python=3.9.0
- pip<=23.3
- pip:
- mlflow==2.8.1
- cloudpickle==2.2.1
- numpy==1.24.4
- packaging==23.2
- psutil==5.9.6
- pyyaml==6.0.1
- scikit-learn==1.3.2
- scipy==1.11.4
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
python: 3.9.0
build_dependencies:
- pip==23.3
- setuptools
- wheel==0.41.2
dependencies:
- -r requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
mlflow==2.8.1
cloudpickle==2.2.1
numpy==1.24.4
packaging==23.2
psutil==5.9.6
pyyaml==6.0.1
scikit-learn==1.3.2
scipy==1.11.4
15 changes: 15 additions & 0 deletions mlruns/0/716ba66c871c49efa5cc5aa5937468d4/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
artifact_uri: file:///C:/Users/abpaul/Documents/Learnings/iNeuron/MLProjects/GemstonePricePrediction/mlruns/0/716ba66c871c49efa5cc5aa5937468d4/artifacts
end_time: 1700384222928
experiment_id: '0'
lifecycle_stage: active
run_id: 716ba66c871c49efa5cc5aa5937468d4
run_name: mercurial-koi-248
run_uuid: 716ba66c871c49efa5cc5aa5937468d4
start_time: 1700384218252
status: 3
user_id: abpaul
tags: []
source_type: 4
source_name: ''
entry_point_name: ''
source_version: ''
1 change: 1 addition & 0 deletions mlruns/0/716ba66c871c49efa5cc5aa5937468d4/metrics/mae
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1700384218306 677.221106162069 0
1 change: 1 addition & 0 deletions mlruns/0/716ba66c871c49efa5cc5aa5937468d4/metrics/r2
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1700384218311 0.9361708346006393 0
1 change: 1 addition & 0 deletions mlruns/0/716ba66c871c49efa5cc5aa5937468d4/metrics/rmse
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1700384218302 1017.2590700767196 0
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"run_id": "716ba66c871c49efa5cc5aa5937468d4", "artifact_path": "model", "utc_time_created": "2023-11-19 08:56:58.318461", "flavors": {"python_function": {"model_path": "model.pkl", "predict_fn": "predict", "loader_module": "mlflow.sklearn", "python_version": "3.9.0", "env": {"conda": "conda.yaml", "virtualenv": "python_env.yaml"}}, "sklearn": {"pickled_model": "model.pkl", "sklearn_version": "1.3.2", "serialization_format": "cloudpickle", "code": null}}, "model_uuid": "847efeac6824431ea39e3deabe099219", "mlflow_version": "2.8.1", "model_size_bytes": 772}]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mercurial-koi-248
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
e5aed3161769b01d93b425a7da547154e9006b86
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
c:/Users/abpaul/Documents/Learnings/iNeuron/MLProjects/GemstonePricePrediction/src/GemstonePricePrediction/pipelines/training_pipeline.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
LOCAL
1 change: 1 addition & 0 deletions mlruns/0/716ba66c871c49efa5cc5aa5937468d4/tags/mlflow.user
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
abpaul
20 changes: 20 additions & 0 deletions mlruns/0/d3a7752167834979b60913f393574749/artifacts/model/MLmodel
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
run_id: d3a7752167834979b60913f393574749
artifact_path: model
utc_time_created: '2023-11-19 10:32:12.446790'
flavors:
python_function:
model_path: model.pkl
predict_fn: predict
loader_module: mlflow.sklearn
python_version: 3.9.0
env:
conda: conda.yaml
virtualenv: python_env.yaml
sklearn:
pickled_model: model.pkl
sklearn_version: 1.3.2
serialization_format: cloudpickle
code: null
model_uuid: 9f14f76510164b2091f6112205c8061c
mlflow_version: 2.8.1
model_size_bytes: 671
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: mlflow-env
channels:
- conda-forge
dependencies:
- python=3.9.0
- pip<=23.3
- pip:
- mlflow==2.8.1
- cloudpickle==2.2.1
- numpy==1.24.4
- packaging==23.2
- psutil==5.9.6
- pyyaml==6.0.1
- scikit-learn==1.3.2
- scipy==1.11.4
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
python: 3.9.0
build_dependencies:
- pip==23.3
- setuptools
- wheel==0.41.2
dependencies:
- -r requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
mlflow==2.8.1
cloudpickle==2.2.1
numpy==1.24.4
packaging==23.2
psutil==5.9.6
pyyaml==6.0.1
scikit-learn==1.3.2
scipy==1.11.4
15 changes: 15 additions & 0 deletions mlruns/0/d3a7752167834979b60913f393574749/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
artifact_uri: file:///C:/Users/abpaul/Documents/Learnings/iNeuron/MLProjects/GemstonePricePrediction/mlruns/0/d3a7752167834979b60913f393574749/artifacts
end_time: 1700389938123
experiment_id: '0'
lifecycle_stage: active
run_id: d3a7752167834979b60913f393574749
run_name: stylish-owl-464
run_uuid: d3a7752167834979b60913f393574749
start_time: 1700389932383
status: 3
user_id: abpaul
tags: []
source_type: 4
source_name: ''
entry_point_name: ''
source_version: ''
1 change: 1 addition & 0 deletions mlruns/0/d3a7752167834979b60913f393574749/metrics/mae
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1700389932435 677.9065769688996 0
1 change: 1 addition & 0 deletions mlruns/0/d3a7752167834979b60913f393574749/metrics/r2
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1700389932439 0.9363211379354268 0
1 change: 1 addition & 0 deletions mlruns/0/d3a7752167834979b60913f393574749/metrics/rmse
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1700389932430 1017.6145004061026 0
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"run_id": "d3a7752167834979b60913f393574749", "artifact_path": "model", "utc_time_created": "2023-11-19 10:32:12.446790", "flavors": {"python_function": {"model_path": "model.pkl", "predict_fn": "predict", "loader_module": "mlflow.sklearn", "python_version": "3.9.0", "env": {"conda": "conda.yaml", "virtualenv": "python_env.yaml"}}, "sklearn": {"pickled_model": "model.pkl", "sklearn_version": "1.3.2", "serialization_format": "cloudpickle", "code": null}}, "model_uuid": "9f14f76510164b2091f6112205c8061c", "mlflow_version": "2.8.1", "model_size_bytes": 671}]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
stylish-owl-464
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
e5aed3161769b01d93b425a7da547154e9006b86
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
src\GemstonePricePrediction\pipelines\training_pipeline.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
LOCAL
Loading

0 comments on commit f883fca

Please sign in to comment.