Closed nbren12 closed 3 years ago
@brianhenn What was the motivation for the DiagnosticFile.set_monitor
method? It looks like an implementation of Java's builder design pattern, but one could use keyword arguments to accomplish the same thing. Is it no longer possible for the DiagnosticFile to make it's own ZarrMonitor?
Also DiagnosticFile._name
seems like it is only used for the default_diagnostics configurations, and no longer plays an direct role in making a zarr with that name.
I think I get it now. I guess you wanted to remove the I/O from the init of the DiagnosticFile so it would be appropriate as a config object?
Closed by #907
Requirements
DiagnosticsFile
in backwards compatible way.Implementation
What is the best approach to average python-based outputs in time? Naturally, this functionality could be implemented in one of many places
Option 1 cannot satisfy Requirement No 3 easily, therefore we choose to implement it on the DiagnosticFile. The separation of time and state in
.observe(time, data)
seems like a more appropriate interface here than the ZarrMonitors.store
method, so 2a is out.DiagnosticFile
takes time as an attribute, but averaging fundamentally changes what time is, so this doesn't seem appropriate.