This is a regression introduced by #70 -- randomized deformers now have a random state field (deformer.rng) which is of type RandomState. This type is not JSON-serializable. When we go to save the output of a deformation (via JAMS), the encoder fails.
The easiest fix here is probably something like the following:
Move all rng fields to _rng so that JAMS skips them during serialization
Persist the random seeds in deformers as a separate field rng that is serialized. Raise a warning about serialization if the input is not serializable.
Since this breaks the object model a little bit, we'll need to bump the version number.
This is a regression introduced by #70 -- randomized deformers now have a random state field (
deformer.rng
) which is of typeRandomState
. This type is not JSON-serializable. When we go to save the output of a deformation (via JAMS), the encoder fails.The easiest fix here is probably something like the following:
rng
fields to_rng
so that JAMS skips them during serializationrng
that is serialized. Raise a warning about serialization if the input is not serializable.Since this breaks the object model a little bit, we'll need to bump the version number.