`produce_or_load` doesn't recognize change in the function producing the data.
Datseris opened this issue · 0 comments
Datseris commented
Given how produce_or_load
works, because it deduces the name solely on the config
argument, it doesn't care about the function f
. This means, that if I produce some data, then change f
, then the data will be loaded instead of re-produced.
This is not good, and we should probably change it. Question is, how? If the file is saved as .jld2
, then we can add an internal field like _drwatson_f_hash
that stores a "hash" of the function.
Now, how do you create a "hash" out of a function, in a way that makes sense?