QInfer / python-qinfer

Library for Bayesian inference via sequential Monte Carlo for quantum parameter estimation.
BSD 3-Clause "New" or "Revised" License
92 stars 31 forks source link

Rewrote bayes_risk to allow multiple expparams #134

Closed ihincks closed 6 years ago

ihincks commented 7 years ago

It would be nice for bayes_risk to vectorize over inputs to make use of any speed-ups that the likelihood might have along its expparams axis. This PR is a stab at that. It seems to be working for the model I am working on, but needs a bit more testing.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.07%) to 74.114% when pulling 78db6694edbcf1bd7db802877dbc06a27dede8b4 on ihincks:upgrade-vectorized-risk into 41ddbad11fdd4b4cca9348072b4cbfb6cdd20cbd on QInfer:master.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.2%) to 74.014% when pulling fe5a158d854e1d70796b204d26381efa3dd397fb on ihincks:upgrade-vectorized-risk into 41ddbad11fdd4b4cca9348072b4cbfb6cdd20cbd on QInfer:master.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.2%) to 74.014% when pulling fe5a158d854e1d70796b204d26381efa3dd397fb on ihincks:upgrade-vectorized-risk into 41ddbad11fdd4b4cca9348072b4cbfb6cdd20cbd on QInfer:master.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.2%) to 74.014% when pulling fe5a158d854e1d70796b204d26381efa3dd397fb on ihincks:upgrade-vectorized-risk into 41ddbad11fdd4b4cca9348072b4cbfb6cdd20cbd on QInfer:master.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.2%) to 74.014% when pulling fe5a158d854e1d70796b204d26381efa3dd397fb on ihincks:upgrade-vectorized-risk into 41ddbad11fdd4b4cca9348072b4cbfb6cdd20cbd on QInfer:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+1.0%) to 75.157% when pulling add8e739f8e9367ba2ee6a058fc0586added77b6 on ihincks:upgrade-vectorized-risk into 41ddbad11fdd4b4cca9348072b4cbfb6cdd20cbd on QInfer:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+1.0%) to 75.157% when pulling add8e739f8e9367ba2ee6a058fc0586added77b6 on ihincks:upgrade-vectorized-risk into 41ddbad11fdd4b4cca9348072b4cbfb6cdd20cbd on QInfer:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+1.0%) to 75.157% when pulling add8e739f8e9367ba2ee6a058fc0586added77b6 on ihincks:upgrade-vectorized-risk into 41ddbad11fdd4b4cca9348072b4cbfb6cdd20cbd on QInfer:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+1.0%) to 75.157% when pulling add8e739f8e9367ba2ee6a058fc0586added77b6 on ihincks:upgrade-vectorized-risk into 41ddbad11fdd4b4cca9348072b4cbfb6cdd20cbd on QInfer:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+1.0%) to 75.157% when pulling add8e739f8e9367ba2ee6a058fc0586added77b6 on ihincks:upgrade-vectorized-risk into 41ddbad11fdd4b4cca9348072b4cbfb6cdd20cbd on QInfer:master.

ihincks commented 7 years ago

I'm done with what I wanted to do in this PR (aside from doc build error fix). Thanks to @whitewhim2718 and his feature-generalized-outcomes branch from which I copied some ideas and code.

As usual, I find the doc error messages pretty cryptic, and don't know where to start at the moment.

scasagrande commented 7 years ago

I took a look at your error log. All the red lines seem to be warnings. I'm pretty sure the error failing the build is make[1]: latexmk: Command not found on line 1564 (https://travis-ci.org/QInfer/python-qinfer/jobs/242525398#L1564).

scasagrande commented 7 years ago

The last master build does this:

Running LaTeX files through pdflatex...
$ make -C _build/latex all-pdf
make[1]: Entering directory `/home/travis/build/QInfer/python-qinfer/doc/_build/latex'
$ pdflatex  'QInfer.tex'

And your build is doing this:

Running LaTeX files through pdflatex...
$ make -C _build/latex all-pdf
make[1]: Entering directory `/home/travis/build/QInfer/python-qinfer/doc/_build/latex'
$ latexmk -pdf -dvi- -ps-  'QInfer.tex'

Taking a look at the installed dependencies, I see master installed sphinx==1.5.6 and your build installed sphinx==1.6.2, which might be responsible.

ihincks commented 7 years ago

Thanks for looking into this, @scasagrande . It seems that they switched to latexmk recently: https://github.com/sphinx-doc/sphinx/issues/3543

ihincks commented 7 years ago

Bah, need to somehow turn off interactive mode in latexmk, the build has stalled. Either that, or revert to an older version of sphinx, which is probably not a great idea.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+1.0%) to 75.157% when pulling 00e83667174ddcd96f7a5591f6a0e9c7e1ae00a5 on ihincks:upgrade-vectorized-risk into 41ddbad11fdd4b4cca9348072b4cbfb6cdd20cbd on QInfer:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+1.0%) to 75.157% when pulling 00e83667174ddcd96f7a5591f6a0e9c7e1ae00a5 on ihincks:upgrade-vectorized-risk into 41ddbad11fdd4b4cca9348072b4cbfb6cdd20cbd on QInfer:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+1.0%) to 75.157% when pulling 7fcc27917e295afeb199b2aec1d6a6b68898ba77 on ihincks:upgrade-vectorized-risk into 41ddbad11fdd4b4cca9348072b4cbfb6cdd20cbd on QInfer:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+1.0%) to 75.157% when pulling 7fcc27917e295afeb199b2aec1d6a6b68898ba77 on ihincks:upgrade-vectorized-risk into 41ddbad11fdd4b4cca9348072b4cbfb6cdd20cbd on QInfer:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+1.0%) to 75.157% when pulling 7fcc27917e295afeb199b2aec1d6a6b68898ba77 on ihincks:upgrade-vectorized-risk into 41ddbad11fdd4b4cca9348072b4cbfb6cdd20cbd on QInfer:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+5.4%) to 79.905% when pulling b9bd357974342f70d1b00eecd6e2be3e8a55b56c on ihincks:upgrade-vectorized-risk into 3c9cc7e0194a92c6563392979d4d9cb693fb9eef on QInfer:master.

scasagrande commented 7 years ago

I'd lock it to the older version for now, and then make it a separate PR to update to the latest.

cgranade commented 7 years ago

Looking at the Travis build failures, it seems as though the latex_preamble Sphinx configuration key is not being propagated correctly in the newest version. It appears that the key is now latex_elements["preamble"] as of 1.5.1, so it might work to provide the preamble in both forms. I'll try that and PR it now.

cgranade commented 6 years ago

This should now work with #135 merged in. Resolved conflicts and re-ran tests.