deepskies / DeepDiagnostics

Inference diagnostics for mostly SBI
MIT License
1 stars 0 forks source link

Variable Reuse via global var store #45

Open voetberg opened 8 months ago

voetberg commented 8 months ago

Certainly metrics will use the same data/inference over and over again. The modular approach in PR #43 will mean that calculations are probably going to be replicated.

Should we implement some sort of global variable store (something akin to a light-weight sql db) to avoid repeat work?

voetberg commented 8 months ago

Shelve Probably does what we need. Some care will need to be taken to make sure everything is serializable but that's not a huge barrier.

bnord commented 8 months ago

I suspect that global variable usage will be low risk in this app because people won't be using this with new variables to write new code. they'll just be hitting go and get things out of it.

bnord commented 8 months ago

shelf (as a dictionary-like thing) looks better (less complicated?) than a db.

bnord commented 8 months ago

I think the only variables that people may want to change will be plot formatting parameters; maybe those shouldn't be globalized?

voetberg commented 8 months ago

I was thinking more about how calculating metrics would be horribly inefficient to re-do for multiple calculations. So storing them in that shelf-like lookup table would help reduce redundancy internally, the users wouldn't interact with it at all.

bnord commented 7 months ago

agree. the shelf dilly looks baller.