rerun-io / rerun

Visualize streams of multimodal data. Fast, easy to use, and simple to integrate. Built in Rust using egui.
https://rerun.io/
Apache License 2.0
5.74k stars 259 forks source link

Periodic calls to rr.save() is not saving anything #6685

Closed vmayoral closed 1 week ago

vmayoral commented 1 week ago

Since my test setup logs quite a bit of information, i started testing out periodic saves implemented as:


rr.init()
rr.serve()
while True:
  # do some stuff
  rr.save()
  rr.serve()  

The resulting saved files contain nothing useful:


-rw-rw-r-- 1 victor victor 279 Jul  1 07:28 _20240701_072815.rrd
-rw-rw-r-- 1 victor victor 279 Jul  1 07:28 _20240701_072825.rrd
-rw-rw-r-- 1 victor victor 279 Jul  1 07:28 _20240701_072835.rrd
-rw-rw-r-- 1 victor victor 279 Jul  1 07:28 _20240701_072845.rrd
teh-cmc commented 1 week ago

You cannot serve and save at the same time since these are both stateful operations that swap the underlying sink.

I have never tried it, but doing periodic calls to save with different filepaths without serve calls intersperse inbetween should actually work, I think? Curious to hear back from you on that one.

The ability to log data to multiple sinks at once is on our roadmap but I don't have an ETA quite yet:

vmayoral commented 1 week ago

I have never tried it, but doing periodic calls to save with different filepaths without serve calls intersperse inbetween should actually work, I think? Curious to hear back from you on that one.

Thanks for the answer. I can confirm that this works out. Commenting out the serve() and keeping the periodic save calls works fine. Then, all files can be loaded with rerun /path/to/files/*.rrd. Will continue keeping an eye on https://github.com/rerun-io/rerun/issues/1790 to do things programatically then.

Will also be keeping an eye on https://github.com/rerun-io/rerun/issues/1998.