sppl icon indicating copy to clipboard operation
sppl copied to clipboard

Implement command line interface?

Open fsaad opened this issue 3 years ago • 0 comments

It could be useful to have a Python command-line interface for SPPL, i.e.,

$ pyhton -m sppl compile <model.py> # produces model.spe
$ python -m sppl logprob <model.spe> <expression>
$ python -m sppl condition <model.spe> <expression>
$ python -m sppl logpdf <model.spe> <dict>
$ python -m sppl constrain <model.spe> <dict>

One downside is that the SPE does not remain in memory, negating the benefits of computation reuse and closue under conditioning.

A parallel option is to provide a simple API for the Python shell in sppl.__init__.py, analogously to the one used in magics.py.

fsaad avatar Mar 30 '21 21:03 fsaad