pangolin 0.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (180) hide show
  1. pangolin-0.0.1/.github/workflows/deploy.yml +43 -0
  2. pangolin-0.0.1/.github/workflows/static.yml +43 -0
  3. pangolin-0.0.1/.gitignore +172 -0
  4. pangolin-0.0.1/8schools_plot.png +0 -0
  5. pangolin-0.0.1/CHANGELOG.md +33 -0
  6. pangolin-0.0.1/INSTALL.md +56 -0
  7. pangolin-0.0.1/LICENSE.txt +661 -0
  8. pangolin-0.0.1/PKG-INFO +15 -0
  9. pangolin-0.0.1/README.md +570 -0
  10. pangolin-0.0.1/TODO.md +68 -0
  11. pangolin-0.0.1/betabin_plot.png +0 -0
  12. pangolin-0.0.1/demos/1PL.ipynb +343 -0
  13. pangolin-0.0.1/demos/2PL.ipynb +369 -0
  14. pangolin-0.0.1/demos/8schools.ipynb +386 -0
  15. pangolin-0.0.1/demos/GP-regression.ipynb +174 -0
  16. pangolin-0.0.1/demos/beta-bernoulli-ppls.ipynb +407 -0
  17. pangolin-0.0.1/demos/calculator-ppls.ipynb +375 -0
  18. pangolin-0.0.1/demos/eight-schools-ppls.ipynb +465 -0
  19. pangolin-0.0.1/demos/experiments/IRT.ipynb +242 -0
  20. pangolin-0.0.1/demos/experiments/README.md +1 -0
  21. pangolin-0.0.1/demos/experiments/altair-test.ipynb +394 -0
  22. pangolin-0.0.1/demos/experiments/arviz-test.ipynb +1031 -0
  23. pangolin-0.0.1/demos/experiments/node_typing.py +45 -0
  24. pangolin-0.0.1/demos/experiments/node_typing_generic.py +47 -0
  25. pangolin-0.0.1/demos/experiments/node_typing_generic_312.py +43 -0
  26. pangolin-0.0.1/demos/experiments/numpyro-plate-test.ipynb +423 -0
  27. pangolin-0.0.1/demos/experiments/parse.ipynb +241 -0
  28. pangolin-0.0.1/demos/experiments/pymc-test.ipynb +142 -0
  29. pangolin-0.0.1/demos/experiments/understanding-numpyro-plates.ipynb +634 -0
  30. pangolin-0.0.1/demos/experiments/vfor.ipynb +1141 -0
  31. pangolin-0.0.1/demos/interface.ipynb +558 -0
  32. pangolin-0.0.1/demos/ir.ipynb +492 -0
  33. pangolin-0.0.1/demos/regression.ipynb +242 -0
  34. pangolin-0.0.1/demos/scan.ipynb +316 -0
  35. pangolin-0.0.1/demos/timeseries.ipynb +180 -0
  36. pangolin-0.0.1/docs/Makefile +20 -0
  37. pangolin-0.0.1/docs/make.bat +35 -0
  38. pangolin-0.0.1/docs/source/_static/pangolin-logo-small.png +0 -0
  39. pangolin-0.0.1/docs/source/blackjax.rst +6 -0
  40. pangolin-0.0.1/docs/source/conf.py +108 -0
  41. pangolin-0.0.1/docs/source/dag.rst +6 -0
  42. pangolin-0.0.1/docs/source/index.rst +20 -0
  43. pangolin-0.0.1/docs/source/interface.rst +27 -0
  44. pangolin-0.0.1/docs/source/ir.rst +7 -0
  45. pangolin-0.0.1/docs/source/jax_backend.bijectors.rst +7 -0
  46. pangolin-0.0.1/docs/source/jax_backend.rst +14 -0
  47. pangolin-0.0.1/docs/source/torch_backend.rst +6 -0
  48. pangolin-0.0.1/docs/source/util.rst +6 -0
  49. pangolin-0.0.1/hidden/demos/coins.ipynb +625 -0
  50. pangolin-0.0.1/hidden/demos/polling.ipynb +154 -0
  51. pangolin-0.0.1/hidden/demos/taxicab.ipynb +220 -0
  52. pangolin-0.0.1/hidden/pangolin/inference/__init__.py +2 -0
  53. pangolin-0.0.1/hidden/pangolin/inference/inference_util.py +188 -0
  54. pangolin-0.0.1/hidden/pangolin/inference/numpyro/__init__.py +23 -0
  55. pangolin-0.0.1/hidden/pangolin/inference/numpyro/autoregressive.py +176 -0
  56. pangolin-0.0.1/hidden/pangolin/inference/numpyro/handler_registry.py +10 -0
  57. pangolin-0.0.1/hidden/pangolin/inference/numpyro/handlers.py +186 -0
  58. pangolin-0.0.1/hidden/pangolin/inference/numpyro/model.py +148 -0
  59. pangolin-0.0.1/hidden/pangolin/inference/numpyro/sampling.py +235 -0
  60. pangolin-0.0.1/hidden/pangolin/inference/numpyro/support.py +38 -0
  61. pangolin-0.0.1/hidden/pangolin/inference/numpyro/util.py +40 -0
  62. pangolin-0.0.1/hidden/pangolin/inference/numpyro/vmap.py +358 -0
  63. pangolin-0.0.1/hidden/pangolin/interface/axes.py +503 -0
  64. pangolin-0.0.1/hidden/pangolin/interface/fields.py +824 -0
  65. pangolin-0.0.1/hidden/tests/test_003_interface/test_008_field.py +396 -0
  66. pangolin-0.0.1/hidden/tests/test_003_interface/test_009_axes.py +134 -0
  67. pangolin-0.0.1/hidden/tests/test_003_interface/test_009_axes_prelim.py +935 -0
  68. pangolin-0.0.1/hidden/tests/test_004_numpyro/test_000_pure_ir/__init__.py +0 -0
  69. pangolin-0.0.1/hidden/tests/test_004_numpyro/test_000_pure_ir/test_005_vmapping.py +61 -0
  70. pangolin-0.0.1/hidden/tests/test_004_numpyro/test_001_simple_interface/__init__.py +0 -0
  71. pangolin-0.0.1/hidden/tests/test_004_numpyro/test_001_simple_interface/test_005_indexing.py +282 -0
  72. pangolin-0.0.1/hidden/tests/test_004_numpyro/test_001_simple_interface/test_007_sampling.py +95 -0
  73. pangolin-0.0.1/models/posteriordb/READMD.md +3 -0
  74. pangolin-0.0.1/models/posteriordb/example_usage.ipynb +328 -0
  75. pangolin-0.0.1/models/posteriordb/models/arK.py +106 -0
  76. pangolin-0.0.1/models/posteriordb/models/dogs.py +36 -0
  77. pangolin-0.0.1/models/test_posteriordb/test_posteriordb.py +40 -0
  78. pangolin-0.0.1/pangolin/THOUGHTS.md +41 -0
  79. pangolin-0.0.1/pangolin/__init__.py +37 -0
  80. pangolin-0.0.1/pangolin/blackjax.py +404 -0
  81. pangolin-0.0.1/pangolin/dag.py +219 -0
  82. pangolin-0.0.1/pangolin/interface/__init__.py +220 -0
  83. pangolin-0.0.1/pangolin/interface/base.py +1673 -0
  84. pangolin-0.0.1/pangolin/interface/compositing.py +251 -0
  85. pangolin-0.0.1/pangolin/interface/indexing.py +264 -0
  86. pangolin-0.0.1/pangolin/interface/scanning.py +385 -0
  87. pangolin-0.0.1/pangolin/interface/transforming.py +752 -0
  88. pangolin-0.0.1/pangolin/interface/util.py +84 -0
  89. pangolin-0.0.1/pangolin/interface/vfor.py +734 -0
  90. pangolin-0.0.1/pangolin/interface/vmapping.py +595 -0
  91. pangolin-0.0.1/pangolin/ir.py +2163 -0
  92. pangolin-0.0.1/pangolin/jax_backend/__init__.py +1016 -0
  93. pangolin-0.0.1/pangolin/jax_backend/bijectors.py +863 -0
  94. pangolin-0.0.1/pangolin/testing/README.md +1 -0
  95. pangolin-0.0.1/pangolin/testing/backends/README.md +1 -0
  96. pangolin-0.0.1/pangolin/testing/backends/__init__.py +48 -0
  97. pangolin-0.0.1/pangolin/testing/backends/base.py +23 -0
  98. pangolin-0.0.1/pangolin/testing/backends/composite_tests.py +202 -0
  99. pangolin-0.0.1/pangolin/testing/backends/deterministic_tests.py +86 -0
  100. pangolin-0.0.1/pangolin/testing/backends/distribution_tests.py +176 -0
  101. pangolin-0.0.1/pangolin/testing/backends/transformation_tests.py +100 -0
  102. pangolin-0.0.1/pangolin/testing/inference/README.md +1 -0
  103. pangolin-0.0.1/pangolin/testing/inference/__init__.py +33 -0
  104. pangolin-0.0.1/pangolin/testing/inference/base.py +17 -0
  105. pangolin-0.0.1/pangolin/testing/inference/complex_tests.py +188 -0
  106. pangolin-0.0.1/pangolin/testing/inference/composite_tests.py +98 -0
  107. pangolin-0.0.1/pangolin/testing/inference/deterministic_tests.py +85 -0
  108. pangolin-0.0.1/pangolin/testing/inference/distribution_tests.py +151 -0
  109. pangolin-0.0.1/pangolin/testing/inference/scan_tests.py +282 -0
  110. pangolin-0.0.1/pangolin/testing/inference/simple_posterior_tests.py +103 -0
  111. pangolin-0.0.1/pangolin/testing/inference/transformation_tests.py +46 -0
  112. pangolin-0.0.1/pangolin/testing/inference/vmap_tests.py +529 -0
  113. pangolin-0.0.1/pangolin/testing/test_util.py +46 -0
  114. pangolin-0.0.1/pangolin/torch_backend.py +1090 -0
  115. pangolin-0.0.1/pangolin/util.py +899 -0
  116. pangolin-0.0.1/pangolin-jags/Example-GLM.ipynb +96 -0
  117. pangolin-0.0.1/pangolin-jags/Example-GP-regression.ipynb +122 -0
  118. pangolin-0.0.1/pangolin-jags/Example-Gaussian-Gaussian.ipynb +149 -0
  119. pangolin-0.0.1/pangolin-jags/Example-Hierarchical-Regression.ipynb +163 -0
  120. pangolin-0.0.1/pangolin-jags/Example-Indexing.ipynb +272 -0
  121. pangolin-0.0.1/pangolin-jags/Example-Matrix-multiplication-from-vmap.ipynb +269 -0
  122. pangolin-0.0.1/pangolin-jags/Example-Polynomial-Regression.ipynb +479 -0
  123. pangolin-0.0.1/pangolin-jags/Example-Simple-Regression.ipynb +75 -0
  124. pangolin-0.0.1/pangolin-jags/Example-Simulation-Based-Calibration.ipynb +256 -0
  125. pangolin-0.0.1/pangolin-jags/Example-Time-series.ipynb +126 -0
  126. pangolin-0.0.1/pangolin-jags/Example-Tutorial.ipynb +1969 -0
  127. pangolin-0.0.1/pangolin-jags/Example-Using-scan.ipynb +895 -0
  128. pangolin-0.0.1/pangolin-jags/Example-vmap.ipynb +320 -0
  129. pangolin-0.0.1/pangolin-jags/README.md +436 -0
  130. pangolin-0.0.1/pangolin-jags/pangolin.py +1972 -0
  131. pangolin-0.0.1/pangolin-jags/regression.png +0 -0
  132. pangolin-0.0.1/pangolin-jags/test_vmap_scan.py +469 -0
  133. pangolin-0.0.1/pangolin-logo.png +0 -0
  134. pangolin-0.0.1/pangolin.jpg +0 -0
  135. pangolin-0.0.1/pyproject.toml +66 -0
  136. pangolin-0.0.1/tests/test_000_util.py +181 -0
  137. pangolin-0.0.1/tests/test_001_dag.py +135 -0
  138. pangolin-0.0.1/tests/test_002_ir/test_composite_op.py +80 -0
  139. pangolin-0.0.1/tests/test_002_ir/test_constant.py +39 -0
  140. pangolin-0.0.1/tests/test_002_ir/test_dag_rvs.py +186 -0
  141. pangolin-0.0.1/tests/test_002_ir/test_index_op.py +181 -0
  142. pangolin-0.0.1/tests/test_002_ir/test_index_orthogonal.py +33 -0
  143. pangolin-0.0.1/tests/test_002_ir/test_ir.py +17 -0
  144. pangolin-0.0.1/tests/test_002_ir/test_multivariate_dists.py +64 -0
  145. pangolin-0.0.1/tests/test_002_ir/test_multivariate_funs.py +18 -0
  146. pangolin-0.0.1/tests/test_002_ir/test_ops_doctests.py +31 -0
  147. pangolin-0.0.1/tests/test_002_ir/test_scalar_ops.py +37 -0
  148. pangolin-0.0.1/tests/test_002_ir/test_scan_op.py +79 -0
  149. pangolin-0.0.1/tests/test_002_ir/test_typing.py +125 -0
  150. pangolin-0.0.1/tests/test_002_ir/test_vmap_op.py +142 -0
  151. pangolin-0.0.1/tests/test_003_interface/test_001_constant.py +45 -0
  152. pangolin-0.0.1/tests/test_003_interface/test_002_scalar_funs.py +106 -0
  153. pangolin-0.0.1/tests/test_003_interface/test_003_vmap/test_simple_convert_args.py +59 -0
  154. pangolin-0.0.1/tests/test_003_interface/test_003_vmap/test_simple_generated_nodes.py +220 -0
  155. pangolin-0.0.1/tests/test_003_interface/test_003_vmap/test_simple_vmap.py +347 -0
  156. pangolin-0.0.1/tests/test_003_interface/test_003_vmap/test_simple_vmap_dummy_args.py +50 -0
  157. pangolin-0.0.1/tests/test_003_interface/test_003_vmap/test_simple_vmap_eval_flat.py +217 -0
  158. pangolin-0.0.1/tests/test_003_interface/test_003_vmap/test_simple_vmap_flat.py +231 -0
  159. pangolin-0.0.1/tests/test_003_interface/test_003_vmap/test_simple_vmap_subgraph.py +135 -0
  160. pangolin-0.0.1/tests/test_003_interface/test_004_composite.py +400 -0
  161. pangolin-0.0.1/tests/test_003_interface/test_005_scan.py +327 -0
  162. pangolin-0.0.1/tests/test_003_interface/test_006_indexing.py +597 -0
  163. pangolin-0.0.1/tests/test_003_interface/test_007_broadcasting.py +281 -0
  164. pangolin-0.0.1/tests/test_004_jax_backend/test_000_unified_backend_tests.py +8 -0
  165. pangolin-0.0.1/tests/test_004_jax_backend/test_001_simple_handlers.py +71 -0
  166. pangolin-0.0.1/tests/test_004_jax_backend/test_002_deterministic_ops.py +73 -0
  167. pangolin-0.0.1/tests/test_004_jax_backend/test_003_composite.py +122 -0
  168. pangolin-0.0.1/tests/test_004_jax_backend/test_004_scan.py +284 -0
  169. pangolin-0.0.1/tests/test_004_jax_backend/test_005_vmap.py +116 -0
  170. pangolin-0.0.1/tests/test_004_jax_backend/test_006_fill_in.py +42 -0
  171. pangolin-0.0.1/tests/test_004_jax_backend/test_007_jax_bijectors.py +190 -0
  172. pangolin-0.0.1/tests/test_004_jax_backend/test_008_handlers_with_bijections.py +82 -0
  173. pangolin-0.0.1/tests/test_005_blackjax/test_000_unified_inference_tests.py +19 -0
  174. pangolin-0.0.1/tests/test_005_blackjax/test_001_basics.py +46 -0
  175. pangolin-0.0.1/tests/test_006_torch_backend/test_000_unified_backend_tests_torch.py +21 -0
  176. pangolin-0.0.1/tests/test_006_torch_backend/test_001_simple_torch_handlers.py +85 -0
  177. pangolin-0.0.1/tests/test_006_torch_backend/test_002_deterministic_torch_ops.py +70 -0
  178. pangolin-0.0.1/tests/test_006_torch_backend/test_003_composite_torch.py +112 -0
  179. pangolin-0.0.1/tests/test_006_torch_backend/test_004_scan_torch.py +285 -0
  180. pangolin-0.0.1/tests/test_006_torch_backend/test_005_vmap_torch.py +121 -0
@@ -0,0 +1,43 @@
1
+ name: website
2
+
3
+ # build the documentation whenever there are new commits on main
4
+ on:
5
+ push:
6
+ branches:
7
+ - main
8
+ # Alternative: only build for tags.
9
+ # tags:
10
+ # - '*'
11
+
12
+ # security: restrict permissions for CI jobs.
13
+ permissions:
14
+ contents: read
15
+
16
+ jobs:
17
+ build:
18
+ runs-on: ubuntu-latest
19
+ steps:
20
+ - uses: actions/checkout@v4
21
+ - uses: astral-sh/setup-uv@v4
22
+
23
+ - run: uv python install 3.12
24
+ - run: uv run --group docs --extra torch sphinx-build -M html docs/source docs/build
25
+
26
+ - uses: actions/upload-pages-artifact@v3
27
+ with:
28
+ path: docs/build/html
29
+
30
+ # Deploy the artifact to GitHub pages.
31
+ # This is a separate job so that only actions/deploy-pages has the necessary permissions.
32
+ deploy:
33
+ needs: build
34
+ runs-on: ubuntu-latest
35
+ permissions:
36
+ pages: write
37
+ id-token: write
38
+ environment:
39
+ name: github-pages
40
+ url: ${{ steps.deployment.outputs.page_url }}
41
+ steps:
42
+ - id: deployment
43
+ uses: actions/deploy-pages@v4
@@ -0,0 +1,43 @@
1
+ # Simple workflow for deploying static content to GitHub Pages
2
+ name: Deploy static content to Pages
3
+
4
+ on:
5
+ # Runs on pushes targeting the default branch
6
+ push:
7
+ branches: ["main"]
8
+
9
+ # Allows you to run this workflow manually from the Actions tab
10
+ workflow_dispatch:
11
+
12
+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
13
+ permissions:
14
+ contents: read
15
+ pages: write
16
+ id-token: write
17
+
18
+ # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
19
+ # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
20
+ concurrency:
21
+ group: "pages"
22
+ cancel-in-progress: false
23
+
24
+ jobs:
25
+ # Single deploy job since we're just deploying
26
+ deploy:
27
+ environment:
28
+ name: github-pages
29
+ url: ${{ steps.deployment.outputs.page_url }}
30
+ runs-on: ubuntu-latest
31
+ steps:
32
+ - name: Checkout
33
+ uses: actions/checkout@v4
34
+ - name: Setup Pages
35
+ uses: actions/configure-pages@v5
36
+ - name: Upload artifact
37
+ uses: actions/upload-pages-artifact@v3
38
+ with:
39
+ # Upload entire repository
40
+ path: '.'
41
+ - name: Deploy to GitHub Pages
42
+ id: deployment
43
+ uses: actions/deploy-pages@v4
@@ -0,0 +1,172 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ pip-wheel-metadata/
24
+ share/python-wheels/
25
+ *.egg-info/
26
+ .installed.cfg
27
+ *.egg
28
+ MANIFEST
29
+
30
+ # PyInstaller
31
+ # Usually these files are written by a python script from a template
32
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
33
+ *.manifest
34
+ *.spec
35
+
36
+ # Installer logs
37
+ pip-log.txt
38
+ pip-delete-this-directory.txt
39
+
40
+ # Unit test / coverage reports
41
+ htmlcov/
42
+ .tox/
43
+ .nox/
44
+ .coverage
45
+ .coverage.*
46
+ .cache
47
+ nosetests.xml
48
+ coverage.xml
49
+ *.cover
50
+ *.py,cover
51
+ .hypothesis/
52
+ .pytest_cache/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ target/
76
+
77
+ # Jupyter Notebook
78
+ .ipynb_checkpoints
79
+
80
+ # IPython
81
+ profile_default/
82
+ ipython_config.py
83
+
84
+ # pyenv
85
+ .python-version
86
+
87
+ # pipenv
88
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
89
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
90
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
91
+ # install all needed dependencies.
92
+ #Pipfile.lock
93
+
94
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
95
+ __pypackages__/
96
+
97
+ # Celery stuff
98
+ celerybeat-schedule
99
+ celerybeat.pid
100
+
101
+ # SageMath parsed files
102
+ *.sage.py
103
+
104
+ # Environments
105
+ .env
106
+ .venv
107
+ env/
108
+ venv/
109
+ ENV/
110
+ env.bak/
111
+ venv.bak/
112
+
113
+ # Spyder project settings
114
+ .spyderproject
115
+ .spyproject
116
+
117
+ # Rope project settings
118
+ .ropeproject
119
+
120
+ # mkdocs documentation
121
+ /site
122
+
123
+ # mypy
124
+ .mypy_cache/
125
+ .dmypy.json
126
+ dmypy.json
127
+
128
+ # Pyre type checker
129
+ .pyre/
130
+
131
+
132
+ /.idea/
133
+ .gitignore
134
+ /tests/CODAchain1.txt
135
+ /tests/CODAindex.txt
136
+ /tests/data.R
137
+ /tests/inits.R
138
+ /tests/model.bug
139
+ /tests/script.txt
140
+ /.testmondata
141
+ /.testmondata-shm
142
+ /.testmondata-wal
143
+
144
+ /.stan
145
+ /.jags
146
+ /tests/.jags
147
+ /tests/.stan
148
+ /CODAindex.txt
149
+ /CODAchain1.txt
150
+ /data.R
151
+ /inits.R
152
+ /model.bug
153
+ /script.txt
154
+ /tests/test_transforms/graph
155
+ /tests/test_transforms/graph.pdf
156
+
157
+ .pypirc
158
+ /models/posteriordb/posteriordb-master/
159
+ /models/posteriordb/posteriordb-old/
160
+ pangolin/.DS_Store
161
+ models/posteriordb/.DS_Store
162
+ .github/.DS_Store
163
+ uv.lock
164
+ .DS_Store
165
+ .vscode/settings.json
166
+ pangolin/MANIFESTO.md
167
+ JAX Vmap Syntax Improvements - Kagi Assistant.html
168
+ JAX Vmap Syntax Improvements - Kagi Assistant_files/assistant.bundle.js
169
+ JAX Vmap Syntax Improvements - Kagi Assistant_files/assistant.scss.css
170
+ JAX Vmap Syntax Improvements - Kagi Assistant_files/kagi_themes.scss.css
171
+ JAX Vmap Syntax Improvements - Kagi Assistant_files/main.scss.css
172
+ JAX Vmap Syntax Improvements - Kagi Assistant_files/tooltip_new.scss.css
Binary file
@@ -0,0 +1,33 @@
1
+ **2026.03.30:** Add `vfor` as an alternative to `vmap`.
2
+
3
+ **2026.03.17:** Jax backend and blackjax now support auto-constrained continuous variables
4
+
5
+ **2026.03.11:** Rename "autoregressive" to more sensible "scan".
6
+
7
+ **2026.01.06:** Bump Python requirement to 3.12, make VMap, Composite, Autoregressive generic for your OCD `x: RV[AutoRegressive[Composite[VMap[Normal]]]]` type-hinting pleasure.
8
+
9
+ **2025.12.22:** Much less magical scalar Op generation in IR and somewhat less magical scalar function generation in interface.
10
+
11
+ **2025.12.18:** Add Wishart
12
+
13
+ **2025.12.16:** Improve typing + API docs, clear interface+docs for user-configuration of broadcasting
14
+
15
+ **2025.12.12:** Update API docs to use Sphinx, be somewhat less chaotic.
16
+
17
+ **2025.12.05:** Update Pangolin logo (h/t Bob), update demos, update install instructions.
18
+
19
+ **2025.10.31:** Add experimental Torch backend
20
+
21
+ **2025.10.24:** Drop NumPyro (NumPyro is too unstable), replace with Blackjax backend. Create options for no / simple / numpy style broadcasting.
22
+
23
+ **2025.08.01:** Add notebooks demonstrating IR and interface.
24
+
25
+ **2025.07.31:** Various cleanup, improve printing.
26
+
27
+ **2024.10.25:** Deploy auto-generated API docs.
28
+
29
+ **2024.10.25:** Try to prevent users from using Loop variables are part of slices. (Throw a meaningful exception instead of just failing.)
30
+
31
+ **2024.10.16:** Fix bug introduced by previous update. (Old commit re-used plate names between different variables, which (apparently) has serious consequences in NumPyro.)
32
+
33
+ **2024.10.15:** Revamped NumPyro backend to try to deal better with discrete variables. Now, vmap uses `numpyro.plate` where possible. (Which it often isn't due to limitations in how NumPyro works.)
@@ -0,0 +1,56 @@
1
+ # How to install pangolin
2
+
3
+ These instructions will install pangolin and all dependencies in a local directory, using the [uv](https://docs.astral.sh/uv/) package manager.
4
+
5
+ ## Just want to test out pangolin?
6
+
7
+ Assuming you have [uv](https://docs.astral.sh/uv/) installed, you can download pangolin and start python with pangolin in a temporary environment with this one-liner:
8
+
9
+ ```shell
10
+ uv run --with git+https://github.com/justindomke/pangolin.git python
11
+ ```
12
+
13
+ ## Want to install it "properly"?
14
+
15
+ **Step 1** If you haven't installed [uv](https://docs.astral.sh/uv/), install it.
16
+
17
+ **Step 2** Download pangolin source code and extract it. You could do this in either of the following ways:
18
+
19
+ 1. Type the following at the command line (assumes you have `wget` and `unzip` installed):
20
+
21
+ ```
22
+ cd path/to/wherever/
23
+ wget https://github.com/justindomke/pangolin/archive/refs/heads/main.zip
24
+ unzip main.zip
25
+ ```
26
+
27
+ 2. Go to [`https://github.com/justindomke/pangolin`](https://github.com/justindomke/pangolin) in your browser, then click on "Code" and then "Download zip". Then double-click the file to extract it and past the contents wherever you want to store them.
28
+
29
+ **Step 3.** Go to the directory and install pangolin and all dependencies.
30
+
31
+ ```
32
+ uv sync
33
+ ```
34
+
35
+ Note that PyTorch is not installed by default. If you want to use the PyTorch backend, you can either use `uv sync —extra torch` to try to install torch automatically. Or, if that doesn't work for you for whatever reason, you can just do `uv sync` and then install pytorch locally with `uv pip install torch functorch`.
36
+
37
+ **Step 4.** Start Python make sure Pangolin works.
38
+
39
+ ```
40
+ % python
41
+ Python 3.12.4
42
+ Type "help", "copyright", "credits" or "license" for more information.
43
+ >>> from pangolin import interface as pi
44
+ >>> x = pi.normal(0,1)
45
+ >>> pi.print_upstream(x)
46
+ ```
47
+
48
+ You should see something like this:
49
+
50
+ ```
51
+ shape | statement
52
+ ----- | ---------
53
+ () | a = 0
54
+ () | b = 1
55
+ () | c ~ normal(a,b)
56
+ ```