probml / JSL

Jax SSM Library
MIT License
50 stars 13 forks source link

Celluloid based animation #21 #32

Closed maheswarantp closed 2 years ago

maheswarantp commented 2 years ago

Description

Updated the code to utilize celluloid for animation of ekf_mlp_ani.py

Issue

21

Figures

https://user-images.githubusercontent.com/58566451/163026177-23a3ff4b-1f2d-49a5-b432-3a6f46f9454d.mp4

Steps

Checklist

maheswarantp commented 2 years ago

Celluloid uses matplotlib.ArtisticAnimation for animation as compared to matplotlib.FuncAnimation in the earlier version. Necessary changes have been made in this PR to use Celluloid instead.

The issue that @murphyk mentioned /opt/anaconda3/lib/libopenh264.5.dylib' (no such file) may be fixed by the use of celluloid, not 100% sure, as it is built on matplotlib. Performance issues has reduced with celluloid based ekf_mlp. It has been tested on CPU as well as GPU on colab and it takes 4 minutes and 9 minutes respectively (not sure why GPU is slow) for 200 frames. Not sure of the priority, if this is important, I can do more deeper dive and profile the code.

murphyk commented 2 years ago

Sorry for the delay. Please can you add a global variable that lets the user choose if they want to use Celluloid or the old method. Also, 4 minutes is crazy slow! How long does it take if you don't save the animation? ie is the bottleneck in the EKF code or the visualization? If the former, is jit being used properly (eg with static argnums)?

gerdm commented 2 years ago

Since celluloid still uses matplotlib, I'm not sure using this library (and adding it as a dependency) will help us avoid the error.

gerdm commented 2 years ago

Hi @maheswarantp,

We'll close this issue. We don't think we need to add a dependency on celluloid at this point.