Open renecotyfanboy opened 1 year ago
After some tryouts, I figured out a nice code architecture which doesn't rely on weird metaclass as it is done right now. Equinox modules are great and can be instantiated unlike haiku modules. However I can't get it to work right now since I'm not familiar yet with this library.
UML diagram
Here, the natural model building SpectralModel = Phabs() * ( Powerlaw() + Blackbody()) is handled by the compositions defined in the Spectral model class. Individual components are built with a single node graph in the ModelComponent class constructor. I'll dive into this later!
I recently came across this library. I'd love to see Equinox used as the backend :)
Wow, hi Patrick, I am very honoured to see you there. This project has been in the pipeline for a while, I've been playing around with equinox
some time ago and it clearly seems feasible to transpose the internal logic of model building based on it. I just need to practise with it a bit more to get used to it, and that should be no problem!
haiku won't be improved in the future, but will be maintained to be compatible with newer JAX releases. It would be great to consider switching to equinox as a backend for JAXspec, since it is much lighter and would lead to less spaghetti code in the engine.