mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-12 13:29:04 +00:00
renamed set_features
This commit is contained in:
parent
f3c53847bf
commit
fe80fa3036
2 changed files with 4 additions and 7 deletions
|
|
@ -582,7 +582,7 @@ class Property:
|
||||||
|
|
||||||
return output
|
return output
|
||||||
|
|
||||||
def get_components(
|
def set_features(
|
||||||
self,
|
self,
|
||||||
cleaned,
|
cleaned,
|
||||||
kwh_client,
|
kwh_client,
|
||||||
|
|
|
||||||
|
|
@ -437,7 +437,7 @@ async def trigger_plan(body: PlanTriggerRequest):
|
||||||
|
|
||||||
epcs_for_scoring = kwh_client.transform(data=kwh_client.prepare_epc(input_properties), cleaned=cleaned)
|
epcs_for_scoring = kwh_client.transform(data=kwh_client.prepare_epc(input_properties), cleaned=cleaned)
|
||||||
|
|
||||||
kwh_predictions = model_api.predict_all(
|
kwh_preds = model_api.predict_all(
|
||||||
df=epcs_for_scoring,
|
df=epcs_for_scoring,
|
||||||
bucket=get_settings().DATA_BUCKET,
|
bucket=get_settings().DATA_BUCKET,
|
||||||
prediction_buckets=get_prediction_buckets(),
|
prediction_buckets=get_prediction_buckets(),
|
||||||
|
|
@ -449,11 +449,8 @@ async def trigger_plan(body: PlanTriggerRequest):
|
||||||
logger.info("Getting spatial data")
|
logger.info("Getting spatial data")
|
||||||
input_properties = OpenUprnClient.set_spatial_data(input_properties, bucket_name=get_settings().DATA_BUCKET)
|
input_properties = OpenUprnClient.set_spatial_data(input_properties, bucket_name=get_settings().DATA_BUCKET)
|
||||||
|
|
||||||
logger.info("Setting property components")
|
logger.info("Setting property features")
|
||||||
for p in tqdm(input_properties):
|
[p.set_features(cleaned=cleaned, kwh_client=kwh_client, kwh_predictions=kwh_preds) for p in input_properties]
|
||||||
p.get_components(
|
|
||||||
cleaned=cleaned, kwh_client=kwh_client, kwh_predictions=kwh_predictions
|
|
||||||
)
|
|
||||||
|
|
||||||
logger.info("Performing solar analysis")
|
logger.info("Performing solar analysis")
|
||||||
# TODO: Tidy this up
|
# TODO: Tidy this up
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue