Introduction to Pyro
Pyro is a versatile and scalable deep probabilistic programming library that is built on top of PyTorch. Its creation was guided by four key principles: universality, scalability, minimalism, and flexibility. Originally developed at Uber AI, it now enjoys active maintenance from a widespread community, including the dedicated team at the Broad Institute. In 2019, Pyro became a project under the Linux Foundation, which supports collaboration on open source software and standards.
Key Principles
- Universal: Pyro stands out as a universal probabilistic programming language (PPL), capable of representing any computable probability distribution.
- Scalable: Designed to handle large datasets efficiently, Pyro offers scalability with minimal overhead compared to customized code.
- Minimal: The library is implemented with a core of powerful, composable abstractions, ensuring it remains agile and maintainable.
- Flexible: Pyro provides high-level abstractions for automation but also allows experts to tailor inference models easily when needed, balancing automation with control.
Community and Development
Since its inception, Pyro has seen contributions from a vibrant community, fostering a collaborative approach to its development and improvement. With the Linux Foundation's support since 2019, it benefits from a neutral environment for innovation and open-source development.
Installation
Stable Release
For stable releases, users can install Pyro via pip:
pip install pyro-ppl
Alternatively, they can install from source by cloning the Pyro repository:
git clone [email protected]:pyro-ppl/pyro.git
cd pyro
git checkout master
pip install .
For additional dependencies required to run probabilistic models, users can opt for:
pip install pyro-ppl[extras]
Development Version
For the latest features under development, Pyro can be installed directly from the source:
pip install git+https://github.com/pyro-ppl/pyro.git
Optionally, with extra dependencies:
pip install git+https://github.com/pyro-ppl/pyro.git#egg=project[extras]
Running in a Docker Container
For those interested in using Docker, Pyro provides dedicated instructions to guide users through setting up and running it in a Docker container.
Conclusion
By following these guidelines, Pyro ensures that both newcomers and seasoned experts can efficiently leverage its functionalities for implementing and experimenting with probabilistic programming models. Whether utilized in academia or industry, Pyro’s contributions to statistical modeling and machine learning are making significant impacts. If you find Pyro helpful in your projects, consider citing their work to acknowledge the developers’ contributions to the field.