MansMeg / bayesbenchr

A bayesbench R package for quick posterior analysis
0 stars 0 forks source link

Running inference methods that are specific to a language #6

Open eerolinna opened 4 years ago

eerolinna commented 4 years ago

With our current approach an inference method is essentially any function that satisfies the input/output requirements, so for example stan_vb or stan_sampling.

A problematic situation is calling a python-only library from R (for example PyMC). Lets say a user wants to run the inference task

{
"inference_method": "pymc_nuts",
"posterior": "eight_schools_centered"
}

Current situation

Desired situation, either

One solution would be that inference method is not just an function but also some additional data, in this case the data would include "language": "python"

eerolinna commented 4 years ago

Any comments?

MansMeg commented 4 years ago

Note yet. posteriordb needs to be done with the prototype first.

eerolinna commented 4 years ago

Can you take a look at these now (so this issue and others in this repo)? It's been almost 2 months.

I think this particular issue is also somewhat relevant for https://github.com/MansMeg/posteriordb/issues/117

MansMeg commented 4 years ago

Yes. Ill see exactly how to solve it later. I guess Ill implement som running function in posteriordb first to get it to work. I guess Ill run Python from R.

eerolinna commented 4 years ago

I feel like just implementing something is not the best way to go about this. If you can write what you intend to roughly do it will be easier to spot any potential shortcomings before having to spend the effort to actually implement it.