I am really liking the work going on in discrete models and the extensions to einsum. It’s really a beautiful way to think about discrete graphical models, particularly the multi-expression right-hand side syntax.
Any chance you would consider forking it out to a separate project as with distributions? We have a lot of uses for it independent of Pyro, where I am hesitant to want a full Pyro dependency.
Hi @srush, glad you find ubersum() useful! It was originally Eli’s idea to think of discrete graphical models this way.
Yes we plan to push the implementation upstream to opt_einsum once it is correct (I’m working on fixing the last known bug today). We’ve already pushed the sharing logic upstream, so if you just need multiple outputs you can write a simple wrapper. The remaining work beyond that simple wrapper is to query batches of local variables that communicate through a global variable.