new carbon model with september data

This commit is contained in:
Michael Duong 2024-10-06 15:50:00 +01:00
parent eb4efdbb2a
commit 2fa6a51c98
4 changed files with 41 additions and 30 deletions

View file

@ -13,7 +13,11 @@ RUN yum install -y gcc python3-devel gcc-c++
# Install python packages
COPY modules/ml-pipeline/src/pipeline/requirements/predictions/requirements.txt ./requirements.txt
RUN pip install --no-cache-dir -r ./requirements.txt
RUN pip install uv
RUN uv pip install -r requirements.txt --system
# RUN pip install --no-cache-dir -r ./requirements.txt
# Copy the project code
COPY modules/ml-pipeline/src/pipeline ./pipeline

View file

@ -5,8 +5,11 @@ RUN apt-get update && apt-get install -y libgomp1 gcc python3-dev
COPY pipeline/requirements/predictions/requirements.txt requirements.txt
RUN pip install --upgrade pip
RUN pip install -r requirements.txt
RUN pip install uv
RUN uv pip install -r requirements.txt --system
# RUN pip install -r requirements.txt
# Assuming in the CI/CD step, there will be a dvc pull step to get data and model, so will just need to run a single script
COPY pipeline/ /home/pipeline/

View file

@ -18,10 +18,8 @@ default:
prepare_data:
input_dataclient_type: aws-s3
output_dataclient_type: local
# 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-10-03-22-57-23/dataset_rooms.parquet
train_proportion: 0.9
output_train_filepath: ./data/prepared_data/train.parquet
output_test_filepath: ./data/prepared_data/test.parquet
@ -37,7 +35,7 @@ default:
drop_columns: [
"heat_demand_change", "carbon_change", "rdsap_change", "heat_demand_ending", "sap_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']
'number_habitable_rooms', 'number_heated_rooms', 'lighting_cost_starting', 'lighting_cost_ending', 'heating_cost_starting', 'heating_cost_ending', 'hot_water_cost_starting', 'hot_water_cost_ending',]
# retain_features: ["SAP_STARTING", "TOTAL_FLOOR_AREA_DIFF"]
retain_features: null
# retain_features: ['uprn', 'sap_starting', 'hot_water_energy_eff_ending',

View file

@ -34,13 +34,19 @@ stages:
- number_heated_rooms_ending
- number_habitable_rooms
- number_heated_rooms
- lighting_cost_starting
- lighting_cost_ending
- heating_cost_starting
- heating_cost_ending
- hot_water_cost_starting
- hot_water_cost_ending
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: carbon_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
s3://retrofit-data-dev/sap_change_model/2024-10-03-22-57-23/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 +55,8 @@ stages:
outs:
- path: data/prepared_data/
hash: md5
md5: e2efac20634b919381adfb962a42d40a.dir
size: 36961727
md5: f96aaa1181655a1bef313542f037b346.dir
size: 40772097
nfiles: 2
build_model:
cmd: python 2_build_model.py
@ -61,8 +67,8 @@ stages:
size: 4820
- path: data/prepared_data
hash: md5
md5: e2efac20634b919381adfb962a42d40a.dir
size: 36961727
md5: f96aaa1181655a1bef313542f037b346.dir
size: 40772097
nfiles: 2
params:
configs/build_model.yaml:
@ -94,17 +100,17 @@ stages:
outs:
- path: data/fit_predictions/
hash: md5
md5: d2568a3244df4d3444b6190599f74b96.dir
size: 3661106
md5: 821aace9a1dfb8b2adb507f4d7e6b36b.dir
size: 3995384
nfiles: 1
- path: data/model/
hash: md5
md5: 756100e033e0bd4445a437e43f4c53af.dir
size: 730442848
md5: fde129c8b8610bdaecc3d28f4cfc6608.dir
size: 751284807
nfiles: 36
- path: metrics/fit_metrics.json
hash: md5
md5: 3bcb3b9728521cd341eb71af109ca778
md5: 471606cbb7d4f3e62fb94b493d3ec858
size: 227
generate_predictions:
cmd: python 3_generate_predictions.py
@ -115,13 +121,13 @@ stages:
size: 2464
- path: data/model
hash: md5
md5: 756100e033e0bd4445a437e43f4c53af.dir
size: 730442848
md5: fde129c8b8610bdaecc3d28f4cfc6608.dir
size: 751284807
nfiles: 36
- path: data/prepared_data
hash: md5
md5: e2efac20634b919381adfb962a42d40a.dir
size: 36961727
md5: f96aaa1181655a1bef313542f037b346.dir
size: 40772097
nfiles: 2
params:
configs/settings.yaml:
@ -133,8 +139,8 @@ stages:
outs:
- path: data/predictions/
hash: md5
md5: 09f3584d6fbd447dd2714eb2774139d5.dir
size: 499683
md5: 985d380681ab1f7645015a67b695b633.dir
size: 557231
nfiles: 1
generate_metrics:
cmd: python 4_generate_metrics.py
@ -145,13 +151,13 @@ stages:
size: 3484
- path: data/predictions
hash: md5
md5: 09f3584d6fbd447dd2714eb2774139d5.dir
size: 499683
md5: 985d380681ab1f7645015a67b695b633.dir
size: 557231
nfiles: 1
- path: data/prepared_data
hash: md5
md5: e2efac20634b919381adfb962a42d40a.dir
size: 36961727
md5: f96aaa1181655a1bef313542f037b346.dir
size: 40772097
nfiles: 2
params:
configs/settings.yaml:
@ -161,8 +167,8 @@ stages:
outs:
- path: metrics/metrics.json
hash: md5
md5: abf8720d06f073f47501aa1172527e9e
size: 225
md5: 9cc5f3a42681b321c26c414589ba561e
size: 226
generate_scenerio_metrics:
cmd: python 5_generate_scenarios.py
deps: