Closed dconathan closed 7 years ago
Another thought is to make memory
a property of Collection instead of Butler. So you'd do butler.experiment.memory.set()
instead of butler.memory.set()
... this way we could mirror the same "unique to experiment/unique to algorithm" data scheme.
I think memory should be a collection - for exactly the reasons you stated.
Cool. Just to clarify... do you mean "be a collection" or "be a property of collection", e.g. butler.experiment.memory
. I have a use case for this (i.e. some things need to exist in memory and be unique to experiment, some things unique to algorithm), so I'm going to work on this implementation.
I will leave butler.memory in place to not break existing things, and also there are possible use cases for having a "NEXT global memory" accessible by all experiments.
Thoughts on Butler.memory... the way it's implemented now, there's no sense of creating "buckets" for each experiment/algorithm, etc. So in my example my app stores a feature matrix under the key "features". If I run two instances of this experiment, the keys clash.
Butler should probably automatically (optionally?) prepend its memory keys with
exp_uid
and/oralg_label
, right? I mean, in theory we could leave it up to the user (in case they want to have multiple experiments share the same data... but this seems like a bad thing for the default behavior...)