mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-30 13:10:47 +00:00
Merge pull request #648 from Hestia-Homes/portfolio-diagnostics
Portfolio diagnostics - attempt to increase engine lambda to 4gb memory
This commit is contained in:
commit
9863e187ea
3 changed files with 5 additions and 4 deletions
|
|
@ -703,7 +703,8 @@ async def model_engine(body: PlanTriggerRequest):
|
||||||
property_lookup[("uprn", uprn)] = prop_id
|
property_lookup[("uprn", uprn)] = prop_id
|
||||||
if landlord_property_id:
|
if landlord_property_id:
|
||||||
property_lookup[("landlord_property_id", landlord_property_id)] = prop_id
|
property_lookup[("landlord_property_id", landlord_property_id)] = prop_id
|
||||||
|
|
||||||
|
logger.info("Processing each property for model input preparation")
|
||||||
input_properties, inspections_map, eco_packages, epc_upserts = [], {}, {}, []
|
input_properties, inspections_map, eco_packages, epc_upserts = [], {}, {}, []
|
||||||
for addr, config in tqdm(
|
for addr, config in tqdm(
|
||||||
zip(addresses, plan_input),
|
zip(addresses, plan_input),
|
||||||
|
|
|
||||||
|
|
@ -75,8 +75,8 @@ df = df.sort_values("property_id", ascending=True)
|
||||||
|
|
||||||
agg = df.groupby("property_id").size().reset_index(name="n_plans")
|
agg = df.groupby("property_id").size().reset_index(name="n_plans")
|
||||||
agg = agg.sort_values("n_plans", ascending=True)
|
agg = agg.sort_values("n_plans", ascending=True)
|
||||||
agg[agg["n_plans"] != 2]
|
agg[agg["n_plans"] != 3]
|
||||||
assert all(agg["n_plans"] == 2)
|
assert all(agg["n_plans"] == 3)
|
||||||
|
|
||||||
|
|
||||||
def delete_plan_batch(session: Session, plan_ids: list[int]):
|
def delete_plan_batch(session: Session, plan_ids: list[int]):
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ functions:
|
||||||
image:
|
image:
|
||||||
uri: ${env:ECR_URI}:${env:GITHUB_SHA}
|
uri: ${env:ECR_URI}:${env:GITHUB_SHA}
|
||||||
timeout: 900
|
timeout: 900
|
||||||
memorySize: 3008
|
memorySize: 4096
|
||||||
role: EngineLambdaRole
|
role: EngineLambdaRole
|
||||||
events:
|
events:
|
||||||
- sqs:
|
- sqs:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue