Closed jeremymanning closed 3 years ago
hey @jeremymanning can you post some code to reproduce this? I can't get it to happen on my end with either the main plot function or the DataGeometry.plot
method. There's definitely something fishy is going on if you're getting duplicate outputs... especially because the plot function is never actually cached.
the issue seems to be related to our caching not properly handling keyword arguments. we "stringify" data and some arguments, but keyword arguments passed to functions aren't properly converted into strings, nor are complex data structures like nested dictionaries. therefore multiply calls to the same function with the same data (but different arguments) can result in the cached results being returned, effectively ignoring changed arguments.
let's get rid of caching...too many problems to justify keeping this feature
Caching is really useful when the goal is to re-run the same line of code multiple times (it makes subsequent runs faster). But the current implementation of caching seems to be ignoring some parameters. For example, calling
plot
with thereduce
flag returns aDataGeometry
object (as expected). However, subsequent calls to plot using the same dataset (but a differentreduce
argument) seem to return the same object, rather than callingreduce
again with the new argument.Ideas:
cache
flag to specify whether or not to cache a particular function call. Whencache==False
, this could force a "refresh" of whatever function was being called, as a sort of hack to fix the undesired behaviorPlan: