Vladyslav Bondarenko
08/19/2025, 10:43 AMlegacy_cashflow_computation into 3 sub results using @extract_fields, it looks like all of them are being picked up from cache correctly, however it seems like we still re-run legacy_cashflow_computation
I understand that the reason we are re-running right now is because we have not handled pd.DataFrame and pydantic.BaseModel hashing properly using fingerprinting yet
However, I would have expected it to understand that given we picked up all 3 outputs of a node from cache, it should stop traversing the graph further. Am I understanding the intended behaviour incorrectly or could this be a bug?
Appreciate any help on this!Stefan Krawczyk
08/19/2025, 6:39 PMThierry Jean
08/19/2025, 6:57 PMopex_growth_detail is retrieved from cache; then, I know
◦ the code for opex_growth_detail was previously run (fact 1)
◦ with the same upstream values (it only depends on legacy_cashflow_computation fact 2)
• if legacy_result_ordered is retreived from cache; then, I know
◦ the code for legacy_result_ordered was previously run (fact 1)
◦ with the same upstream values (it only depends on `legacy_cashflow_computation`; fact 2)
• etc.
## The surprise
Now, regarding the "surprising result", why is legacy_cashflow_computation executed?
• fact 1: did the same code run previously?
• fact 2: with the upstream values (project, yearly_inflation_rpi, opex_costs, yearly_inflation, cpi_rpi_indexes, custom_growth_rate_overwrite, tenants_df, multiyear_assumptions, user_context, cashflow_growth_profile_mapping)
◦ this requires having stable fingerprints for all these classes objects
## Debugging
The inputs to legacy_cashflow_computation seems very complex. See the end of the tutorial notebook to learn how to inspect your cache keys. You should be able to decode something like this:
{
'node_name': 'legacy_cashflow_computation',
'code_version': 'c2ccafa54280fbc969870b6baa445211277d7e8cfa98a0821836c175603ffda2',
'dependencies_data_versions': {
'project': 'WgV5-4SfdKTfUY66x-msj_xXsKNPNTP2guRhfw==',
'yearly_inflation_rpi': ...,
...,
}
}
This will allow you to pin point what data_version is causing the cache misses. Then, you can fix your inputs to be stable (order matters for opex_costs since it's a `list`; if order doesn't matter, use a set) or implement a custom fingerprinting functionVladyslav Bondarenko
08/20/2025, 7:24 AMStefan Krawczyk
08/20/2025, 5:45 PMThierry Jean
08/20/2025, 5:50 PM