WardBrian / pybind_expose_stan_fns

Exposing Stan functions in Python
BSD 3-Clause "New" or "Revised" License
7 stars 1 forks source link

Installing the Python library #4

Closed wellington36 closed 1 month ago

wellington36 commented 1 month ago

Hi, I would like to use the library, but I couldn't find any installation specifications, either here or at https://pypi.org.

Is there any way I could use it now?

WardBrian commented 1 month ago

You can install it from source by cloning the repository and installing it locally (pip install /path/to/local/clone) or directly from git using

pip install git+https://github.com/WardBrian/pybind_expose_stan_fns@main#egg=pybind_expose_stan_fns

I don't really have plans to release this on PyPI. Can I ask what you hope to use it for?

wellington36 commented 1 month ago

I'm working with @maxbiostat. Basically, I'm switching the language I'm using from Stan and R to python for numerical precision control. But one of my tests uses a brms function for Conway–Maxwell–Poisson distribution (implemented in stan) and the alternative in python would be to run an MCMC with the CmdStanModel from the cmdstanpy library.

To make it cleaner (alternative to R's expose_cmdstanr_functions), I used your library here (simplifying pybind_stan_fns to psf): com_Z_table_iterations.py#L61.

It worked very well. but it generated 3 extra files, I'll put them in .gitignore.