Closed maxentile closed 2 years ago
WIP fix in https://github.com/proteneer/timemachine/pull/707 avoids the spurious calls, and collapses multiple calls: https://gist.github.com/maxentile/1463655fea7900317e7c0bc62c154a46 . ~(However, there's a remaining issue with param packing / unpacking that affects the SummedPotential version when du_dp is requested...)~
Due to inefficient choices I made way back in https://github.com/proteneer/timemachine/pull/429 https://github.com/proteneer/timemachine/blob/836aeac2aa1a3eac244682cb603cdc7f38fd66a3/timemachine/fe/functional.py#L15-L43
impl.execute_selective
whenever at least one derivative is neededimpl.execute_selective
See this notebook for details: https://gist.github.com/maxentile/0759c025f9d141060741c7520c54d960
Note: this is a source of inefficiency in both the Python loop version
construct_differentiable_interface
and theSummedPotential
versionconstruct_differentiable_interface_fast
. (In the Python loop version, the total number of calls is multiplied bylen(unbound_potentials)
.)