Is there an existing method to save the state of replicator?
For example, OgnSampleUniform has an internal_state method that is returns rep.rng.ReplicatorRNG which wraps numpy rng. I’d like to get the current state of all of these and save them out so I can later restore them to continue generating where I left off.
While Replicator gnerations can be reproduced deterministically, we don’t currently have the functionality to resume. This is a great feature request however and we will add it to the roadmap. Thank you for the suggestion!
@jlafleche Thanks for the reply! I went ahead and created a method for getting and setting the replicator state. This simply finds the state of the rngs and returns them. Can check it out here. Any feedback on my implementation is appreciated.
Thanks for the suggestion @josiah7 ! That’s an interesting approach! The downside is that the node state may hold data that is no longer corresponding to the state of the scene, but otherwise it seems to me like it should work. One note of caution is where these states are saved - if done within a writer, they’ll be out of sync with the frame being written, as writers are executed asynchronously from the simulation execution.