diff --git a/.github/workflows/Deploy.yml b/.github/workflows/Deploy.yml index 265a324..86a0105 100644 --- a/.github/workflows/Deploy.yml +++ b/.github/workflows/Deploy.yml @@ -2,7 +2,7 @@ name: Sap Change Model Deploy on: push: - branches: [ sap-dev, sap-prod, heat-dev, heat-prod, carbon-dev, carbon-prod] + branches: [ sap-dev, sap-prod, heat-dev, heat-prod, carbon-dev, carbon-prod, hotwater-dev, hotwater-prod ] jobs: deploy: diff --git a/.github/workflows/MLPipelinePostMerge.yml b/.github/workflows/MLPipelinePostMerge.yml index e4411b3..a80bb57 100644 --- a/.github/workflows/MLPipelinePostMerge.yml +++ b/.github/workflows/MLPipelinePostMerge.yml @@ -13,6 +13,7 @@ on: - "sap-dev" - "heat-dev" - "carbon-dev" + - "hotwater-dev" permissions: write-all diff --git a/.github/workflows/MLPipelinePullRequest.yml b/.github/workflows/MLPipelinePullRequest.yml index 451b0a8..2232e34 100644 --- a/.github/workflows/MLPipelinePullRequest.yml +++ b/.github/workflows/MLPipelinePullRequest.yml @@ -5,7 +5,7 @@ on: # branches: # - "model-**" pull_request: - branches: ["sap-dev", "heat-dev", "carbon-dev"] + branches: ["sap-dev", "heat-dev", "carbon-dev", "hotwater-dev"] label: types: ["created", "edited"] diff --git a/modules/ml-pipeline/src/pipeline/configs/post_prediction_logic.py b/modules/ml-pipeline/src/pipeline/configs/post_prediction_logic.py index 643231a..7a05958 100644 --- a/modules/ml-pipeline/src/pipeline/configs/post_prediction_logic.py +++ b/modules/ml-pipeline/src/pipeline/configs/post_prediction_logic.py @@ -30,6 +30,6 @@ def clip_predictions_to_minimum_value( post_prediction_logic = { - "clip_predictions_to_minimum_value": clip_predictions_to_minimum_value, + # "clip_predictions_to_minimum_value": clip_predictions_to_minimum_value, # "round_predictions": round_predictions } diff --git a/modules/ml-pipeline/src/pipeline/configs/scenarios.yaml b/modules/ml-pipeline/src/pipeline/configs/scenarios.yaml index 0d4ee07..dd146eb 100644 --- a/modules/ml-pipeline/src/pipeline/configs/scenarios.yaml +++ b/modules/ml-pipeline/src/pipeline/configs/scenarios.yaml @@ -8,6 +8,6 @@ default: # - s3://retrofit-data-dev/scenario_data/27-03-2024-11-38-15/recommendations_scoring_data.parquet # - s3://retrofit-data-dev/scenario_data/26-05-2024-08-47-45/recommendations_scoring_data.parquet # - s3://retrofit-data-dev/scenario_data/26-05-2024-10-44-53/recommendations_scoring_data.parquet - - s3://retrofit-data-dev/scenario_data/28-05-2024-19-22-41/recommendations_scoring_data.parquet + # - s3://retrofit-data-dev/scenario_data/28-05-2024-19-22-41/recommendations_scoring_data.parquet comparison_output_filepath: ./metrics/scenario_table.md metrics_output_filepath: ./metrics/scenario_metrics.md diff --git a/modules/ml-pipeline/src/pipeline/configs/settings.yaml b/modules/ml-pipeline/src/pipeline/configs/settings.yaml index 838e9a9..80ad400 100644 --- a/modules/ml-pipeline/src/pipeline/configs/settings.yaml +++ b/modules/ml-pipeline/src/pipeline/configs/settings.yaml @@ -21,7 +21,8 @@ default: # data_filepath: s3://retrofit-data-dev/sap_change_model/2024-03-22-18-56-53/dataset_rooms.parquet # data_filepath: s3://retrofit-data-dev/sap_change_model/2024-05-25-08-36-36/dataset_rooms.parquet # data_filepath: s3://retrofit-data-dev/sap_change_model/2024-05-26-10-31-39/dataset_rooms.parquet - data_filepath: s3://retrofit-data-dev/sap_change_model/2024-05-28-19-08-25/dataset_rooms.parquet + # data_filepath: s3://retrofit-data-dev/sap_change_model/2024-05-28-19-08-25/dataset_rooms.parquet + data_filepath: s3://retrofit-data-dev/sap_change_model/2024-07-03-23-11-39/dataset_rooms.parquet train_proportion: 0.9 output_train_filepath: ./data/prepared_data/train.parquet output_test_filepath: ./data/prepared_data/test.parquet @@ -31,11 +32,13 @@ default: feature_processor_config: subsample_amount: null subsample_seed: 0 - target: sap_ending + target: hot_water_cost_ending identifier_columns: ["uprn"] # drop_columns: ["heat_demand_change", "carbon_change", "rdsap_change", "heat_demand_ending", "carbon_ending", "days_to_starting", "days_to_ending"] drop_columns: [ - "heat_demand_change", "carbon_change", "rdsap_change", "heat_demand_ending", "carbon_ending", "days_to_starting", "days_to_ending", + "sap_ending", "heat_demand_change", "carbon_change", "rdsap_change", "heat_demand_ending", "carbon_ending", + "lighting_cost_ending", "heating_cost_ending", + # "days_to_starting", "days_to_ending", 'number_habitable_rooms_starting', 'number_habitable_rooms_ending', 'number_heated_rooms_starting', 'number_heated_rooms_ending', 'number_habitable_rooms', 'number_heated_rooms'] retain_features: null diff --git a/modules/ml-pipeline/src/pipeline/dvc.lock b/modules/ml-pipeline/src/pipeline/dvc.lock index 31315db..3fe8e87 100644 --- a/modules/ml-pipeline/src/pipeline/dvc.lock +++ b/modules/ml-pipeline/src/pipeline/dvc.lock @@ -21,13 +21,14 @@ stages: params: configs/settings.yaml: default.feature_processor.feature_processor_config.drop_columns: + - sap_ending - heat_demand_change - carbon_change - rdsap_change - heat_demand_ending - carbon_ending - - days_to_starting - - days_to_ending + - lighting_cost_ending + - heating_cost_ending - number_habitable_rooms_starting - number_habitable_rooms_ending - number_heated_rooms_starting @@ -37,10 +38,10 @@ stages: default.feature_processor.feature_processor_config.retain_features: default.feature_processor.feature_processor_config.subsample_amount: default.feature_processor.feature_processor_config.subsample_seed: 0 - default.feature_processor.feature_processor_config.target: sap_ending + default.feature_processor.feature_processor_config.target: hot_water_cost_ending default.feature_processor.feature_processor_type: dataframe - default.prepare_data.data_filepath: - s3://retrofit-data-dev/sap_change_model/2024-05-28-19-08-25/dataset_rooms.parquet + default.prepare_data.data_filepath: + s3://retrofit-data-dev/sap_change_model/2024-07-03-23-11-39/dataset_rooms.parquet default.prepare_data.input_dataclient_type: aws-s3 default.prepare_data.output_dataclient_type: local default.prepare_data.output_test_filepath: ./data/prepared_data/test.parquet @@ -49,8 +50,8 @@ stages: outs: - path: data/prepared_data/ hash: md5 - md5: 80c9e138146a1d96b9d16091c207e2e8.dir - size: 45056059 + md5: 782e258411cf655c0a5c8437c20459d9.dir + size: 49160755 nfiles: 2 build_model: cmd: python 2_build_model.py @@ -61,8 +62,8 @@ stages: size: 4820 - path: data/prepared_data hash: md5 - md5: 80c9e138146a1d96b9d16091c207e2e8.dir - size: 45056059 + md5: 782e258411cf655c0a5c8437c20459d9.dir + size: 49160755 nfiles: 2 params: configs/build_model.yaml: @@ -94,18 +95,18 @@ stages: outs: - path: data/fit_predictions/ hash: md5 - md5: d9c9afc05e8780db47c0548b19bf7d19.dir - size: 3349989 + md5: f292cc6ddbe9c8f1efea8107a776ce16.dir + size: 3444061 nfiles: 1 - path: data/model/ hash: md5 - md5: 13c3100e1486c27a83a8a47491077842.dir - size: 773523079 - nfiles: 36 + md5: 48cfeca19c3d7ac956704abb425bb2ab.dir + size: 729294819 + nfiles: 35 - path: metrics/fit_metrics.json hash: md5 - md5: 2ff70a2a45813e1bcdf2ea3aa8e07d4a - size: 224 + md5: 2e253c8b9ffc101aad95fc09fb4586c2 + size: 222 generate_predictions: cmd: python 3_generate_predictions.py deps: @@ -115,13 +116,13 @@ stages: size: 2464 - path: data/model hash: md5 - md5: 13c3100e1486c27a83a8a47491077842.dir - size: 773523079 - nfiles: 36 + md5: 48cfeca19c3d7ac956704abb425bb2ab.dir + size: 729294819 + nfiles: 35 - path: data/prepared_data hash: md5 - md5: 80c9e138146a1d96b9d16091c207e2e8.dir - size: 45056059 + md5: 782e258411cf655c0a5c8437c20459d9.dir + size: 49160755 nfiles: 2 params: configs/settings.yaml: @@ -133,8 +134,8 @@ stages: outs: - path: data/predictions/ hash: md5 - md5: 5d07bcebf3160a72bb18dfd79106e85c.dir - size: 463197 + md5: bdb3afe72fa8ad9e56997f7da659778e.dir + size: 480363 nfiles: 1 generate_metrics: cmd: python 4_generate_metrics.py @@ -145,13 +146,13 @@ stages: size: 3484 - path: data/predictions hash: md5 - md5: 5d07bcebf3160a72bb18dfd79106e85c.dir - size: 463197 + md5: bdb3afe72fa8ad9e56997f7da659778e.dir + size: 480363 nfiles: 1 - path: data/prepared_data hash: md5 - md5: 80c9e138146a1d96b9d16091c207e2e8.dir - size: 45056059 + md5: 782e258411cf655c0a5c8437c20459d9.dir + size: 49160755 nfiles: 2 params: configs/settings.yaml: @@ -161,8 +162,8 @@ stages: outs: - path: metrics/metrics.json hash: md5 - md5: 3e08df02fd5c5d094bcf936e1338d596 - size: 223 + md5: fb65d79e41782ebc1f616fa6e0e8bec1 + size: 220 generate_scenerio_metrics: cmd: python 5_generate_scenarios.py deps: @@ -176,15 +177,14 @@ stages: input_dataclient_type: aws-s3 output_dataclient_type: local scenario_data_filepaths: - - s3://retrofit-data-dev/scenario_data/28-05-2024-19-22-41/recommendations_scoring_data.parquet comparison_output_filepath: ./metrics/scenario_table.md metrics_output_filepath: ./metrics/scenario_metrics.md outs: - path: metrics/scenario_metrics.md hash: md5 - md5: fa4d6d7bbd7818613800da5f8f37ea96 - size: 363 + md5: d41d8cd98f00b204e9800998ecf8427e + size: 0 - path: metrics/scenario_table.md hash: md5 - md5: d6baf100a1623cc2467c2f8221d314c9 - size: 2133 + md5: d41d8cd98f00b204e9800998ecf8427e + size: 0