mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +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
|
||||
|
||||
def get_components(
|
||||
def set_features(
|
||||
self,
|
||||
cleaned,
|
||||
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)
|
||||
|
||||
kwh_predictions = model_api.predict_all(
|
||||
kwh_preds = model_api.predict_all(
|
||||
df=epcs_for_scoring,
|
||||
bucket=get_settings().DATA_BUCKET,
|
||||
prediction_buckets=get_prediction_buckets(),
|
||||
|
|
@ -449,11 +449,8 @@ async def trigger_plan(body: PlanTriggerRequest):
|
|||
logger.info("Getting spatial data")
|
||||
input_properties = OpenUprnClient.set_spatial_data(input_properties, bucket_name=get_settings().DATA_BUCKET)
|
||||
|
||||
logger.info("Setting property components")
|
||||
for p in tqdm(input_properties):
|
||||
p.get_components(
|
||||
cleaned=cleaned, kwh_client=kwh_client, kwh_predictions=kwh_predictions
|
||||
)
|
||||
logger.info("Setting property features")
|
||||
[p.set_features(cleaned=cleaned, kwh_client=kwh_client, kwh_predictions=kwh_preds) for p in input_properties]
|
||||
|
||||
logger.info("Performing solar analysis")
|
||||
# TODO: Tidy this up
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue