EMAworkbench icon indicating copy to clipboard operation
EMAworkbench copied to clipboard

enable passing shape as keyword argument in outcomes

Open quaquel opened this issue 2 years ago • 0 comments

Currently, the callback sets up the data structures for storing results after the first experiment because only then the exact required shapes are known. By passing the shape as an optional keyword argument (for array and time series outcomes), it becomes possible to pre-allocate these before the first experiment. This also allows catching memory errors before the first run is even conducted. The basic machinery for this is already in place in both AbstractOutcome and the DefaultCallback, the feature, however, was never fully completed.

Thinking about this a bit more, I do believe you need to pass both shape and dtype in order to be able to setup the datastructure in advance.

quaquel avatar Sep 23 '22 08:09 quaquel