Fix corpsepose clipping error in interacted labor model (remove cache-order dependency)#6
Fix corpsepose clipping error in interacted labor model (remove cache-order dependency)#6
Conversation
|
@marinecdf Can you also put the config you're using here? |
|
I think the solution here is just to force The nicest way to do this is to build a dependency tree and then execute it. That might be overkill, but it would make for a nice user interface. |
|
There are a few reasons why we don't want this to be a permanent fix, but unfortunately I think it might be producing bad results already. You have to be very careful calling a Have you tested your change with an existing model and made sure that it produces identical results? You could do that by creating a copy of I will try to find time to implement a permanent fix here, but I don't know if I can do it this week. |
|
Thinking about this more, I think your general approach is likely fine and we can turn it into a permanent fix with a couple changes. The extra calls to curvegen are totally appropriate. I just want you to check with a test like I describe above, because we have had problems with this in the past. |
Summary
This updates the
corpsepose/plankposeclipping path ininterpret/specification.pyso transform(...) receives the clip-model reference curve directly, instead of reading it fromothermodels[clipmodel].current_curves[region].transform(...) now accepts two curves for
corpsepose/plankpose:minlost_lo)minlost_hi)and
TransformCurveGeneratoris wired to pass both curves into transform(...) when those clipping modes are used.This is intended as a targeted temporary fix to remove the cache-order dependency in the case of
corpseposeclipping (it was sufficient to complete both single and median interacted labor model projection runs in the current setup).Why
The previous implementation depended on
clip_curve = othermodels[specconf.get('clip-model')].current_curves[region]already being populated whentransform(...)handled thecorpsepose/plankposeclipping case.That created an implicit cache-order dependency: if
minlost_hiwas evaluated beforeminlost_lofor a region, the cache entry (for the clip model i.e.minlost_lo) could be missing and the run would fail with error below.This was the failure observed in the interacted labor projection (single run using this config file):
What Changed
transform(...)increate_curvegen(...)now accepts one or more curves (*curves) instead of always a single curve.corpsepose/plankpose, the transform now expects:current_curves[region]was removed from thecorpsepose/plankposeclipping block.TransformCurveGenerator(...)is now passed both curve generators forcorpsepose/plankpose, so the reference curve is supplied directly at transform time.