switching off rebaselining temp

This commit is contained in:
Khalim Conn-Kowlessar 2026-04-10 15:15:39 +01:00
parent 025b18a29c
commit 67df3a810a
2 changed files with 18 additions and 2 deletions

View file

@ -652,7 +652,8 @@ async def model_engine(body: PlanTriggerRequest):
epc_records["original_epc"]["estimated"] = False
prepared_epc = EPCRecord(
epc_records=epc_records, run_mode="newdata", cleaning_data=cleaning_data, address_metadata=addr
epc_records=epc_records, run_mode="newdata", cleaning_data=cleaning_data,
# address_metadata=addr Switched off to remove injecting landlord inputs
)
input_properties.append(

View file

@ -580,7 +580,22 @@ class EPCRecord:
if existing is not None and v is not None and abs(existing - v) > 1: # 1m tolerance
self.landlord_differences[k] = v
else:
if v != self._prepared_epc.get(k) and (not pd.isnull(v)) and (not pd.isnull(self._prepared_epc.get(k))):
# Check if something has been cleaned. We want to avoid triggering re-baselining if we cleaned
# a value. In the address meta, it will possibly contain the original value, so we'd pick up a
# diference if the original value was something to be cleaned, we clean that value and then end up
# comparing the original value to the new clean one
cleaned_value = self._prepared_epc.get(k)
original_value = self.original_epc.get(k.replace("_", "-"))
# We check if the value has been cleaned
if cleaned_value != original_value:
# The thing we want to compare against, is the original value
compare_to = original_value
else:
compare_to = cleaned_value
if v != compare_to and (not pd.isnull(v)) and (not pd.isnull(self._prepared_epc.get(k))):
self.landlord_differences[k] = v
self._prepared_epc.update(self.landlord_differences)