mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
minor logging improvement
This commit is contained in:
parent
bf7f05108d
commit
8b7c6086ae
1 changed files with 3 additions and 4 deletions
|
|
@ -567,7 +567,6 @@ def db_read_session():
|
|||
async def model_engine(body: PlanTriggerRequest):
|
||||
logger.info("Model Engine triggered with body: %s", json.loads(body.model_dump_json()))
|
||||
|
||||
logger.info("Connecting to db")
|
||||
created_at = datetime.now().isoformat()
|
||||
start_ms = int(time.time() * 1000)
|
||||
|
||||
|
|
@ -1330,8 +1329,9 @@ async def model_engine(body: PlanTriggerRequest):
|
|||
)
|
||||
scenario_id = engine_scenario.id
|
||||
|
||||
new_epc_bands = {}
|
||||
for i in range(0, len(input_properties), BATCH_SIZE):
|
||||
for i in tqdm(
|
||||
range(0, len(input_properties), BATCH_SIZE), total=int(np.ceil(len(input_properties) / BATCH_SIZE))
|
||||
):
|
||||
try:
|
||||
# Take a slice of the input_properties list to make a batch
|
||||
batch_properties = input_properties[i:i + BATCH_SIZE]
|
||||
|
|
@ -1342,7 +1342,6 @@ async def model_engine(body: PlanTriggerRequest):
|
|||
total_sap_points = sum([r["sap_points"] for r in default_recommendations])
|
||||
new_sap_points = float(p.data["current-energy-efficiency"]) + total_sap_points
|
||||
new_epc = sap_to_epc(new_sap_points)
|
||||
new_epc_bands[p.id] = new_epc
|
||||
|
||||
total_cost = sum([r["total"] for r in default_recommendations])
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue