mirror of
https://github.com/Hestia-Homes/ML.git
synced 2026-06-08 11:17:25 +00:00
Compare commits
1 commit
sap@v0.15.
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b8dcf626b2 |
5 changed files with 40 additions and 50 deletions
|
|
@ -13,11 +13,7 @@ RUN yum install -y gcc python3-devel gcc-c++
|
||||||
|
|
||||||
# Install python packages
|
# Install python packages
|
||||||
COPY modules/ml-pipeline/src/pipeline/requirements/predictions/requirements.txt ./requirements.txt
|
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 the project code
|
||||||
COPY modules/ml-pipeline/src/pipeline ./pipeline
|
COPY modules/ml-pipeline/src/pipeline ./pipeline
|
||||||
|
|
|
||||||
|
|
@ -6,12 +6,7 @@ RUN apt-get update && apt-get install -y libgomp1 gcc python3-dev
|
||||||
COPY pipeline/requirements/predictions/requirements.txt requirements.txt
|
COPY pipeline/requirements/predictions/requirements.txt requirements.txt
|
||||||
|
|
||||||
RUN pip install --upgrade pip
|
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
|
# 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/
|
COPY pipeline/ /home/pipeline/
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,11 @@ default:
|
||||||
input_dataclient_type: aws-s3
|
input_dataclient_type: aws-s3
|
||||||
output_dataclient_type: local
|
output_dataclient_type: local
|
||||||
scenario_data_filepaths:
|
scenario_data_filepaths:
|
||||||
# - s3://retrofit-data-dev/scenario_data/28-05-2024-19-22-41/recommendations_scoring_data.parquet
|
# - s3://retrofit-data-dev/scenario_data/22-03-2024-19-20-09/recommendations_scoring_data.parquet
|
||||||
# - s3://retrofit-data-dev/scenario_data/07-10-2024-16-26-06/recommendations_scoring_data.parquet
|
# - s3://retrofit-data-dev/scenario_data/24-03-2024-20-23-25/recommendations_scoring_data.parquet
|
||||||
- s3://retrofit-data-dev/scenario_data/08-10-2024-15-07-33/recommendations_scoring_data.parquet
|
# - 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
|
||||||
comparison_output_filepath: ./metrics/scenario_table.md
|
comparison_output_filepath: ./metrics/scenario_table.md
|
||||||
metrics_output_filepath: ./metrics/scenario_metrics.md
|
metrics_output_filepath: ./metrics/scenario_metrics.md
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,10 @@ default:
|
||||||
prepare_data:
|
prepare_data:
|
||||||
input_dataclient_type: aws-s3
|
input_dataclient_type: aws-s3
|
||||||
output_dataclient_type: local
|
output_dataclient_type: local
|
||||||
# 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-03-22-18-56-53/dataset_rooms.parquet
|
||||||
data_filepath: s3://retrofit-data-dev/sap_change_model/2024-10-03-22-57-23/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
|
||||||
train_proportion: 0.9
|
train_proportion: 0.9
|
||||||
output_train_filepath: ./data/prepared_data/train.parquet
|
output_train_filepath: ./data/prepared_data/train.parquet
|
||||||
output_test_filepath: ./data/prepared_data/test.parquet
|
output_test_filepath: ./data/prepared_data/test.parquet
|
||||||
|
|
@ -35,7 +37,7 @@ default:
|
||||||
drop_columns: [
|
drop_columns: [
|
||||||
"heat_demand_change", "carbon_change", "rdsap_change", "heat_demand_ending", "carbon_ending", "days_to_starting", "days_to_ending",
|
"heat_demand_change", "carbon_change", "rdsap_change", "heat_demand_ending", "carbon_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_starting', 'number_habitable_rooms_ending', 'number_heated_rooms_starting', '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',]
|
'number_habitable_rooms', 'number_heated_rooms']
|
||||||
retain_features: null
|
retain_features: null
|
||||||
# retain_features: ['uprn', 'sap_starting', 'hot_water_energy_eff_ending',
|
# retain_features: ['uprn', 'sap_starting', 'hot_water_energy_eff_ending',
|
||||||
# 'mainheat_energy_eff_ending', 'constituency', 'roof_energy_eff_ending',
|
# 'mainheat_energy_eff_ending', 'constituency', 'roof_energy_eff_ending',
|
||||||
|
|
|
||||||
|
|
@ -34,19 +34,13 @@ stages:
|
||||||
- number_heated_rooms_ending
|
- number_heated_rooms_ending
|
||||||
- number_habitable_rooms
|
- number_habitable_rooms
|
||||||
- number_heated_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.retain_features:
|
||||||
default.feature_processor.feature_processor_config.subsample_amount:
|
default.feature_processor.feature_processor_config.subsample_amount:
|
||||||
default.feature_processor.feature_processor_config.subsample_seed: 0
|
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: sap_ending
|
||||||
default.feature_processor.feature_processor_type: dataframe
|
default.feature_processor.feature_processor_type: dataframe
|
||||||
default.prepare_data.data_filepath:
|
default.prepare_data.data_filepath:
|
||||||
s3://retrofit-data-dev/sap_change_model/2024-10-03-22-57-23/dataset_rooms.parquet
|
s3://retrofit-data-dev/sap_change_model/2024-05-28-19-08-25/dataset_rooms.parquet
|
||||||
default.prepare_data.input_dataclient_type: aws-s3
|
default.prepare_data.input_dataclient_type: aws-s3
|
||||||
default.prepare_data.output_dataclient_type: local
|
default.prepare_data.output_dataclient_type: local
|
||||||
default.prepare_data.output_test_filepath: ./data/prepared_data/test.parquet
|
default.prepare_data.output_test_filepath: ./data/prepared_data/test.parquet
|
||||||
|
|
@ -55,8 +49,8 @@ stages:
|
||||||
outs:
|
outs:
|
||||||
- path: data/prepared_data/
|
- path: data/prepared_data/
|
||||||
hash: md5
|
hash: md5
|
||||||
md5: 8ce9c629a531d54fa9b0bfc305391400.dir
|
md5: 80c9e138146a1d96b9d16091c207e2e8.dir
|
||||||
size: 49665833
|
size: 45056059
|
||||||
nfiles: 2
|
nfiles: 2
|
||||||
build_model:
|
build_model:
|
||||||
cmd: python 2_build_model.py
|
cmd: python 2_build_model.py
|
||||||
|
|
@ -67,8 +61,8 @@ stages:
|
||||||
size: 4820
|
size: 4820
|
||||||
- path: data/prepared_data
|
- path: data/prepared_data
|
||||||
hash: md5
|
hash: md5
|
||||||
md5: 8ce9c629a531d54fa9b0bfc305391400.dir
|
md5: 80c9e138146a1d96b9d16091c207e2e8.dir
|
||||||
size: 49665833
|
size: 45056059
|
||||||
nfiles: 2
|
nfiles: 2
|
||||||
params:
|
params:
|
||||||
configs/build_model.yaml:
|
configs/build_model.yaml:
|
||||||
|
|
@ -100,18 +94,18 @@ stages:
|
||||||
outs:
|
outs:
|
||||||
- path: data/fit_predictions/
|
- path: data/fit_predictions/
|
||||||
hash: md5
|
hash: md5
|
||||||
md5: 9dafd875d76676a06890af9be8778567.dir
|
md5: d9c9afc05e8780db47c0548b19bf7d19.dir
|
||||||
size: 3617506
|
size: 3349989
|
||||||
nfiles: 1
|
nfiles: 1
|
||||||
- path: data/model/
|
- path: data/model/
|
||||||
hash: md5
|
hash: md5
|
||||||
md5: 36fb8323508e968a297d650954ccbc58.dir
|
md5: 13c3100e1486c27a83a8a47491077842.dir
|
||||||
size: 800833479
|
size: 773523079
|
||||||
nfiles: 36
|
nfiles: 36
|
||||||
- path: metrics/fit_metrics.json
|
- path: metrics/fit_metrics.json
|
||||||
hash: md5
|
hash: md5
|
||||||
md5: e2bc34ae26afbb854f0b021d12b1b569
|
md5: 2ff70a2a45813e1bcdf2ea3aa8e07d4a
|
||||||
size: 223
|
size: 224
|
||||||
generate_predictions:
|
generate_predictions:
|
||||||
cmd: python 3_generate_predictions.py
|
cmd: python 3_generate_predictions.py
|
||||||
deps:
|
deps:
|
||||||
|
|
@ -121,13 +115,13 @@ stages:
|
||||||
size: 2464
|
size: 2464
|
||||||
- path: data/model
|
- path: data/model
|
||||||
hash: md5
|
hash: md5
|
||||||
md5: 36fb8323508e968a297d650954ccbc58.dir
|
md5: 13c3100e1486c27a83a8a47491077842.dir
|
||||||
size: 800833479
|
size: 773523079
|
||||||
nfiles: 36
|
nfiles: 36
|
||||||
- path: data/prepared_data
|
- path: data/prepared_data
|
||||||
hash: md5
|
hash: md5
|
||||||
md5: 8ce9c629a531d54fa9b0bfc305391400.dir
|
md5: 80c9e138146a1d96b9d16091c207e2e8.dir
|
||||||
size: 49665833
|
size: 45056059
|
||||||
nfiles: 2
|
nfiles: 2
|
||||||
params:
|
params:
|
||||||
configs/settings.yaml:
|
configs/settings.yaml:
|
||||||
|
|
@ -139,8 +133,8 @@ stages:
|
||||||
outs:
|
outs:
|
||||||
- path: data/predictions/
|
- path: data/predictions/
|
||||||
hash: md5
|
hash: md5
|
||||||
md5: 8f4de36de171006cb6d9eacff7718ba3.dir
|
md5: 5d07bcebf3160a72bb18dfd79106e85c.dir
|
||||||
size: 508400
|
size: 463197
|
||||||
nfiles: 1
|
nfiles: 1
|
||||||
generate_metrics:
|
generate_metrics:
|
||||||
cmd: python 4_generate_metrics.py
|
cmd: python 4_generate_metrics.py
|
||||||
|
|
@ -151,13 +145,13 @@ stages:
|
||||||
size: 3484
|
size: 3484
|
||||||
- path: data/predictions
|
- path: data/predictions
|
||||||
hash: md5
|
hash: md5
|
||||||
md5: 8f4de36de171006cb6d9eacff7718ba3.dir
|
md5: 5d07bcebf3160a72bb18dfd79106e85c.dir
|
||||||
size: 508400
|
size: 463197
|
||||||
nfiles: 1
|
nfiles: 1
|
||||||
- path: data/prepared_data
|
- path: data/prepared_data
|
||||||
hash: md5
|
hash: md5
|
||||||
md5: 8ce9c629a531d54fa9b0bfc305391400.dir
|
md5: 80c9e138146a1d96b9d16091c207e2e8.dir
|
||||||
size: 49665833
|
size: 45056059
|
||||||
nfiles: 2
|
nfiles: 2
|
||||||
params:
|
params:
|
||||||
configs/settings.yaml:
|
configs/settings.yaml:
|
||||||
|
|
@ -167,8 +161,8 @@ stages:
|
||||||
outs:
|
outs:
|
||||||
- path: metrics/metrics.json
|
- path: metrics/metrics.json
|
||||||
hash: md5
|
hash: md5
|
||||||
md5: 58e25eb5e1699dbb33e78af9ba4c2964
|
md5: 3e08df02fd5c5d094bcf936e1338d596
|
||||||
size: 222
|
size: 223
|
||||||
generate_scenerio_metrics:
|
generate_scenerio_metrics:
|
||||||
cmd: python 5_generate_scenarios.py
|
cmd: python 5_generate_scenarios.py
|
||||||
deps:
|
deps:
|
||||||
|
|
@ -182,15 +176,15 @@ stages:
|
||||||
input_dataclient_type: aws-s3
|
input_dataclient_type: aws-s3
|
||||||
output_dataclient_type: local
|
output_dataclient_type: local
|
||||||
scenario_data_filepaths:
|
scenario_data_filepaths:
|
||||||
- s3://retrofit-data-dev/scenario_data/08-10-2024-15-07-33/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
|
comparison_output_filepath: ./metrics/scenario_table.md
|
||||||
metrics_output_filepath: ./metrics/scenario_metrics.md
|
metrics_output_filepath: ./metrics/scenario_metrics.md
|
||||||
outs:
|
outs:
|
||||||
- path: metrics/scenario_metrics.md
|
- path: metrics/scenario_metrics.md
|
||||||
hash: md5
|
hash: md5
|
||||||
md5: 746ffa7d10fcdceaf2330d07c7ee623b
|
md5: fa4d6d7bbd7818613800da5f8f37ea96
|
||||||
size: 363
|
size: 363
|
||||||
- path: metrics/scenario_table.md
|
- path: metrics/scenario_table.md
|
||||||
hash: md5
|
hash: md5
|
||||||
md5: 3b7dfc36054bce065f849423abf31a5d
|
md5: d6baf100a1623cc2467c2f8221d314c9
|
||||||
size: 969
|
size: 2133
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue