Skip to content

Cannot save 3-dimensional outputs #168

@steipatr

Description

@steipatr

When using save_results to store the outputs of experiments on a ReplicatorModel, the following error appears:

ValueError: Must pass 2-d input. shape=(100, 3, 2)

The results are incompletely saved and cannot be loaded with load_results, although manual inspection shows that at least experiments.csv is tarballed correctly.

The shape of ReplicatorModel outputs is (n_experiments, n_replications, len_output). I imagine save_results is expecting only (n_experiments, len_output), so the added dimension of the replications throws it off.

I am using Workbench version 2.2 via Jupyter Lab.

I do not remember this being a problem previously, so it may be related to changes made in response to #94 ? We already had some discussions on making saving/loading results smoother back then.

I have attached a minimum working example:
3d save test.zip

Metadata

Metadata

Assignees

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions