BasisResearch / chirho

An experimental language for causal reasoning
https://basisresearch.github.io/chirho/getting_started.html
Apache License 2.0
172 stars 12 forks source link

automated_dr_learner.ipynb produces wrong results #571

Open dimkab opened 1 month ago

dimkab commented 1 month ago

Running automated_dr_learner.ipynb notebook from the main branch produces the following figures, which are different from what's saved in the notebook itself. image image

eb8680 commented 1 month ago

I just ran the version on master unmodified on my machine and I can't reproduce this - I get correct figures that look pretty much the same as the ones in the notebook now. Did you change the notebook in any way before you ran it? It looks to me like the data underlying the "DR-Monte Carlo" line could have been accidentally overwritten somehow with more draws from the "Plug-in" distribution.

Also, what versions of Pyro and PyTorch are you using?

dimkab commented 1 month ago

I've ran it unmodified both on my macbook and also made a clean checkout on a remote linux machine, installed with pip install -e ".[test]". Same result as before. Attaching the conda env files.

For the linux machine:

name: chirho2
channels:
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=conda_forge
  - _openmp_mutex=4.5=2_gnu
  - bzip2=1.0.8=h4bc722e_7
  - ca-certificates=2024.8.30=hbcca054_0
  - ld_impl_linux-64=2.43=h712a8e2_1
  - libexpat=2.6.3=h5888daf_0
  - libffi=3.4.2=h7f98852_5
  - libgcc=14.2.0=h77fa898_1
  - libgcc-ng=14.2.0=h69a702a_1
  - libgomp=14.2.0=h77fa898_1
  - libnsl=2.0.1=hd590300_0
  - libsqlite=3.46.1=hadc24fc_0
  - libuuid=2.38.1=h0b41bf4_0
  - libxcrypt=4.4.36=hd590300_1
  - libzlib=1.3.1=hb9d3cd8_2
  - ncurses=6.5=he02047a_1
  - openssl=3.3.2=hb9d3cd8_0
  - pip=24.2=pyh8b19718_1
  - python=3.11.10=hc5c86c4_3_cpython
  - readline=8.2=h8228510_1
  - setuptools=75.1.0=pyhd8ed1ab_0
  - tk=8.6.13=noxft_h4845f30_101
  - wheel=0.44.0=pyhd8ed1ab_0
  - xz=5.2.6=h166bdaf_0
  - pip:
      - absl-py==2.1.0
      - aiohappyeyeballs==2.4.3
      - aiohttp==3.10.10
      - aiosignal==1.3.1
      - alabaster==0.7.16
      - anyio==4.6.2.post1
      - argon2-cffi==23.1.0
      - argon2-cffi-bindings==21.2.0
      - arrow==1.3.0
      - asttokens==2.4.1
      - async-lru==2.0.4
      - attrs==24.2.0
      - autopep8==2.3.1
      - babel==2.16.0
      - beautifulsoup4==4.12.3
      - black==24.10.0
      - bleach==6.1.0
      - certifi==2024.8.30
      - cffi==1.17.1
      - charset-normalizer==3.4.0
      - click==8.1.7
      - comm==0.2.2
      - contourpy==1.3.0
      - coverage==7.6.3
      - cycler==0.12.1
      - debugpy==1.8.7
      - decorator==5.1.1
      - defusedxml==0.7.1
      - docutils==0.18.1
      - execnet==2.1.1
      - executing==2.1.0
      - fastjsonschema==2.20.0
      - filelock==3.16.1
      - flake8==7.1.1
      - fonttools==4.54.1
      - fqdn==1.5.1
      - frozenlist==1.4.1
      - fsspec==2024.9.0
      - grpcio==1.67.0
      - h11==0.14.0
      - httpcore==1.0.6
      - httpx==0.27.2
      - idna==3.10
      - imageio==2.36.0
      - imagesize==1.4.1
      - iniconfig==2.0.0
      - ipykernel==6.29.5
      - ipython==8.28.0
      - ipywidgets==8.1.5
      - isoduration==20.11.0
      - isort==5.13.2
      - jedi==0.19.1
      - jinja2==3.1.4
      - json5==0.9.25
      - jsonpointer==3.0.0
      - jsonschema==4.23.0
      - jsonschema-specifications==2024.10.1
      - jupyter==1.1.1
      - jupyter-client==8.6.3
      - jupyter-console==6.6.3
      - jupyter-core==5.7.2
      - jupyter-events==0.10.0
      - jupyter-lsp==2.2.5
      - jupyter-server==2.14.2
      - jupyter-server-terminals==0.5.3
      - jupyterlab==4.2.5
      - jupyterlab-pygments==0.3.0
      - jupyterlab-server==2.27.3
      - jupyterlab-widgets==3.0.13
      - kiwisolver==1.4.7
      - latexcodec==3.0.0
      - lazy-loader==0.4
      - lightning-utilities==0.11.8
      - markdown==3.7
      - markdown-it-py==3.0.0
      - markupsafe==3.0.2
      - matplotlib==3.9.2
      - matplotlib-inline==0.1.7
      - mccabe==0.7.0
      - mdit-py-plugins==0.4.2
      - mdurl==0.1.2
      - mistune==3.0.2
      - mpmath==1.3.0
      - multidict==6.1.0
      - mypy==1.10.0
      - mypy-extensions==1.0.0
      - myst-parser==3.0.1
      - nbclient==0.10.0
      - nbconvert==7.16.4
      - nbformat==5.10.4
      - nbqa==1.9.0
      - nbsphinx==0.9.5
      - nbval==0.11.0
      - nest-asyncio==1.6.0
      - networkx==3.4.1
      - notebook==7.2.2
      - notebook-shim==0.2.4
      - numpy==1.26.4
      - nvidia-cublas-cu12==12.4.5.8
      - nvidia-cuda-cupti-cu12==12.4.127
      - nvidia-cuda-nvrtc-cu12==12.4.127
      - nvidia-cuda-runtime-cu12==12.4.127
      - nvidia-cudnn-cu12==9.1.0.70
      - nvidia-cufft-cu12==11.2.1.3
      - nvidia-curand-cu12==10.3.5.147
      - nvidia-cusolver-cu12==11.6.1.9
      - nvidia-cusparse-cu12==12.3.1.170
      - nvidia-nccl-cu12==2.21.5
      - nvidia-nvjitlink-cu12==12.4.127
      - nvidia-nvtx-cu12==12.4.127
      - opt-einsum==3.4.0
      - overrides==7.7.0
      - packaging==24.1
      - pandas==2.2.3
      - pandocfilters==1.5.1
      - parso==0.8.4
      - pathspec==0.12.1
      - pexpect==4.9.0
      - pillow==11.0.0
      - platformdirs==4.3.6
      - pluggy==1.5.0
      - prometheus-client==0.21.0
      - prompt-toolkit==3.0.48
      - propcache==0.2.0
      - protobuf==5.28.2
      - psutil==6.1.0
      - ptyprocess==0.7.0
      - pure-eval==0.2.3
      - pybtex==0.24.0
      - pybtex-docutils==1.0.3
      - pycodestyle==2.12.1
      - pycparser==2.22
      - pyflakes==3.2.0
      - pygments==2.18.0
      - pyparsing==3.2.0
      - pyro-api==0.1.2
      - pyro-ppl==1.8.6
      - pytest==8.3.3
      - pytest-cov==5.0.0
      - pytest-xdist==3.6.1
      - python-dateutil==2.9.0.post0
      - python-graphviz==0.20.3
      - python-json-logger==2.0.7
      - pytorch-lightning==2.4.0
      - pytz==2024.2
      - pyyaml==6.0.2
      - pyzmq==26.2.0
      - referencing==0.35.1
      - requests==2.32.3
      - rfc3339-validator==0.1.4
      - rfc3986-validator==0.1.1
      - rpds-py==0.20.0
      - scikit-image==0.24.0
      - scipy==1.14.1
      - seaborn==0.13.2
      - send2trash==1.8.3
      - six==1.16.0
      - sniffio==1.3.1
      - snowballstemmer==2.2.0
      - soupsieve==2.6
      - sphinx==7.1.2
      - sphinx-rtd-theme==1.3.0
      - sphinxcontrib-applehelp==2.0.0
      - sphinxcontrib-bibtex==2.5.0
      - sphinxcontrib-devhelp==2.0.0
      - sphinxcontrib-htmlhelp==2.1.0
      - sphinxcontrib-jquery==4.1
      - sphinxcontrib-jsmath==1.0.1
      - sphinxcontrib-qthelp==2.0.0
      - sphinxcontrib-serializinghtml==2.0.0
      - stack-data==0.6.3
      - sympy==1.13.1
      - tensorboard==2.18.0
      - tensorboard-data-server==0.7.2
      - terminado==0.18.1
      - tifffile==2024.9.20
      - tinycss2==1.3.0
      - tokenize-rt==6.0.0
      - tomli==2.0.2
      - torch==2.5.0
      - torchdiffeq==0.2.4
      - torchmetrics==1.5.0
      - tornado==6.4.1
      - tqdm==4.66.5
      - traitlets==5.14.3
      - triton==3.1.0
      - types-python-dateutil==2.9.0.20241003
      - typing-extensions==4.12.2
      - tzdata==2024.2
      - uri-template==1.3.0
      - urllib3==2.2.3
      - wcwidth==0.2.13
      - webcolors==24.8.0
      - webencodings==0.5.1
      - websocket-client==1.8.0
      - werkzeug==3.0.4
      - widgetsnbextension==4.0.13
      - yarl==1.15.5
prefix: /opt/conda/envs/chirho2

For the mac machine:

name: /Users/dima/git/chirho/.conda
channels:
  - defaults
dependencies:
  - bzip2=1.0.8=h80987f9_6
  - ca-certificates=2024.7.2=hca03da5_0
  - libffi=3.4.4=hca03da5_1
  - ncurses=6.4=h313beb8_0
  - openssl=3.0.14=h80987f9_0
  - pip=24.0=py311hca03da5_0
  - python=3.11.9=hb885b13_0
  - readline=8.2=h1a28f6b_0
  - setuptools=69.5.1=py311hca03da5_0
  - sqlite=3.45.3=h80987f9_0
  - tk=8.6.14=h6ba3021_0
  - wheel=0.43.0=py311hca03da5_0
  - xz=5.4.6=h80987f9_1
  - zlib=1.2.13=h18a0788_1
  - pip:
      - absl-py==2.1.0
      - aiohttp==3.9.5
      - aiosignal==1.3.1
      - alabaster==0.7.16
      - anyio==4.4.0
      - appnope==0.1.4
      - argon2-cffi==23.1.0
      - argon2-cffi-bindings==21.2.0
      - arrow==1.3.0
      - asttokens==2.4.1
      - async-lru==2.0.4
      - attrs==23.2.0
      - autopep8==2.3.1
      - babel==2.15.0
      - beautifulsoup4==4.12.3
      - black==24.4.2
      - bleach==6.1.0
      - cattrs==23.2.3
      - certifi==2024.7.4
      - cffi==1.16.0
      - charset-normalizer==3.3.2
      - click==8.1.7
      - comm==0.2.2
      - contourpy==1.2.1
      - coverage==7.6.0
      - cycler==0.12.1
      - debugpy==1.8.2
      - decorator==5.1.1
      - defusedxml==0.7.1
      - docutils==0.18.1
      - esbonio==0.16.4
      - execnet==2.1.1
      - executing==2.0.1
      - fastjsonschema==2.20.0
      - filelock==3.15.4
      - flake8==7.1.0
      - fonttools==4.53.1
      - fqdn==1.5.1
      - frozenlist==1.4.1
      - fsspec==2024.6.1
      - grpcio==1.65.0
      - h11==0.14.0
      - httpcore==1.0.5
      - httpx==0.27.0
      - idna==3.7
      - imageio==2.34.2
      - imagesize==1.4.1
      - iniconfig==2.0.0
      - ipykernel==6.29.5
      - ipython==8.26.0
      - ipywidgets==8.1.3
      - isoduration==20.11.0
      - isort==5.13.2
      - jedi==0.19.1
      - jinja2==3.1.4
      - json5==0.9.25
      - jsonpointer==3.0.0
      - jsonschema==4.23.0
      - jsonschema-specifications==2023.12.1
      - jupyter==1.0.0
      - jupyter-client==8.6.2
      - jupyter-console==6.6.3
      - jupyter-core==5.7.2
      - jupyter-events==0.10.0
      - jupyter-lsp==2.2.5
      - jupyter-server==2.14.1
      - jupyter-server-terminals==0.5.3
      - jupyterlab==4.2.3
      - jupyterlab-pygments==0.3.0
      - jupyterlab-server==2.27.2
      - jupyterlab-widgets==3.0.11
      - kiwisolver==1.4.5
      - latexcodec==3.0.0
      - lazy-loader==0.4
      - lightning-utilities==0.11.3.post0
      - lsprotocol==2023.0.1
      - markdown==3.6
      - markdown-it-py==3.0.0
      - markupsafe==2.1.5
      - matplotlib==3.9.1
      - matplotlib-inline==0.1.7
      - mccabe==0.7.0
      - mdit-py-plugins==0.4.1
      - mdurl==0.1.2
      - mistune==3.0.2
      - mpmath==1.3.0
      - multidict==6.0.5
      - mypy==1.10.1
      - mypy-extensions==1.0.0
      - myst-parser==3.0.1
      - nbclient==0.10.0
      - nbconvert==7.16.4
      - nbformat==5.10.4
      - nbqa==1.8.5
      - nbsphinx==0.9.4
      - nbval==0.11.0
      - nest-asyncio==1.6.0
      - networkx==3.3
      - notebook==7.2.1
      - notebook-shim==0.2.4
      - numpy==2.0.0
      - opt-einsum==3.3.0
      - optree==0.12.1
      - overrides==7.7.0
      - packaging==24.1
      - pandas==2.2.2
      - pandocfilters==1.5.1
      - parso==0.8.4
      - pathspec==0.12.1
      - pexpect==4.9.0
      - pillow==10.4.0
      - platformdirs==4.2.2
      - pluggy==1.5.0
      - prometheus-client==0.20.0
      - prompt-toolkit==3.0.47
      - protobuf==4.25.3
      - psutil==6.0.0
      - ptyprocess==0.7.0
      - pure-eval==0.2.2
      - pybtex==0.24.0
      - pybtex-docutils==1.0.3
      - pycodestyle==2.12.0
      - pycparser==2.22
      - pyflakes==3.2.0
      - pygls==1.3.1
      - pygments==2.18.0
      - pyparsing==3.1.2
      - pyro-api==0.1.2
      - pyro-ppl==1.8.6
      - pyspellchecker==0.8.1
      - pytest==8.2.2
      - pytest-cov==5.0.0
      - pytest-xdist==3.6.1
      - python-dateutil==2.9.0.post0
      - python-graphviz==0.20.3
      - python-json-logger==2.0.7
      - pytorch-lightning==2.3.3
      - pytz==2024.1
      - pyyaml==6.0.1
      - pyzmq==26.0.3
      - qtconsole==5.5.2
      - qtpy==2.4.1
      - referencing==0.35.1
      - requests==2.32.3
      - rfc3339-validator==0.1.4
      - rfc3986-validator==0.1.1
      - rpds-py==0.19.0
      - scikit-image==0.24.0
      - scipy==1.14.0
      - seaborn==0.13.2
      - send2trash==1.8.3
      - six==1.16.0
      - sniffio==1.3.1
      - snowballstemmer==2.2.0
      - soupsieve==2.5
      - sphinx==7.1.2
      - sphinx-rtd-theme==1.3.0
      - sphinxcontrib-applehelp==1.0.8
      - sphinxcontrib-bibtex==2.5.0
      - sphinxcontrib-devhelp==1.0.6
      - sphinxcontrib-htmlhelp==2.0.5
      - sphinxcontrib-jquery==4.1
      - sphinxcontrib-jsmath==1.0.1
      - sphinxcontrib-qthelp==1.0.7
      - sphinxcontrib-serializinghtml==1.1.10
      - stack-data==0.6.3
      - sympy==1.13.0
      - tb-nightly==2.18.0a20240724
      - tensorboard-data-server==0.7.2
      - terminado==0.18.1
      - tifffile==2024.7.2
      - tinycss2==1.3.0
      - tokenize-rt==5.2.0
      - tomli==2.0.1
      - torch==2.3.1
      - torchdiffeq==0.2.4
      - torchmetrics==1.4.0.post0
      - torchopt==0.7.3
      - torchvision==0.18.1
      - tornado==6.4.1
      - tqdm==4.66.4
      - traitlets==5.14.3
      - types-python-dateutil==2.9.0.20240316
      - typing-extensions==4.12.2
      - tzdata==2024.1
      - uri-template==1.3.0
      - urllib3==2.2.2
      - wcwidth==0.2.13
      - webcolors==24.6.0
      - webencodings==0.5.1
      - websocket-client==1.8.0
      - werkzeug==3.0.3
      - widgetsnbextension==4.0.11
      - yarl==1.9.4
prefix: /Users/dima/git/chirho/.conda
eb8680 commented 1 month ago

I'd be surprised if this was the issue, but can you try installing the latest version of Pyro (pyro-ppl==1.9.1) and running it again from scratch? Pyro is pinned to pyro-ppl<1.9 in the ChiRho dependencies but that's mainly for type-checking reasons - I believe it should work fine with pyro-ppl>=1.9.1 at runtime.

eb8680 commented 1 month ago

And can you also try with PyTorch pinned to torch==2.4.1? chirho.robust makes use of PyTorch features that (shouldn't in principle, but do in reality) change and often break in undocumented and unpredictable ways from release to release.

dimkab commented 1 month ago

Setting both pyro-ppl==1.9.1 and torch==2.4.1 did it!

qinqian commented 1 month ago

I could test this as well.

It seems the library with pyro-ppl==1.9.1 and python==3.9 cannot run the notebook.

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[1], line 14
     11 import pyro
     12 import pyro.distributions as dist
---> 14 from chirho.counterfactual.handlers import MultiWorldCounterfactual
     15 from chirho.indexed.ops import IndexSet, gather
     16 from chirho.interventional.handlers import do

File /opt/homebrew/Caskroom/miniconda/base/envs/chirho/lib/python3.9/site-packages/chirho/counterfactual/handlers/__init__.py:1
----> 1 from .counterfactual import (  # noqa: F401
      2     MultiWorldCounterfactual,
      3     SingleWorldCounterfactual,
      4     SingleWorldFactual,
      5     TwinWorldCounterfactual,
      6 )

File /opt/homebrew/Caskroom/miniconda/base/envs/chirho/lib/python3.9/site-packages/chirho/counterfactual/handlers/counterfactual.py:9
      6 import torch
      8 from chirho.counterfactual.handlers.ambiguity import FactualConditioningMessenger
----> 9 from chirho.counterfactual.ops import preempt, split
     10 from chirho.indexed.handlers import IndexPlatesMessenger
     11 from chirho.indexed.ops import get_index_plates

File /opt/homebrew/Caskroom/miniconda/base/envs/chirho/lib/python3.9/site-packages/chirho/counterfactual/ops.py:9
      6 import pyro
      8 from chirho.indexed.ops import IndexSet, cond_n, scatter_n
----> 9 from chirho.interventional.ops import Intervention, intervene
     11 S = TypeVar("S")
     12 T = TypeVar("T")

File /opt/homebrew/Caskroom/miniconda/base/envs/chirho/lib/python3.9/site-packages/chirho/interventional/__init__.py:1
----> 1 from . import handlers  # noqa: F401

File /opt/homebrew/Caskroom/miniconda/base/envs/chirho/lib/python3.9/site-packages/chirho/interventional/handlers.py:121
    111             return
    113         msg["value"] = intervene(
    114             msg["value"],
    115             self.actions[msg["name"]],
    116             event_dim=len(msg["fn"].event_shape),
    117             name=msg["name"],
    118         )
--> 121 do = pyro.poutine.handlers._make_handler(Interventions)[1]

TypeError: 'function' object is not subscriptable
eb8680 commented 1 month ago

@qinqian that error is in the latest release of ChiRho (chirho==0.2.0), which is significantly behind the master branch and is not compatible with the notebook in question.

qinqian commented 1 month ago

Thanks @eb8680 ! I reinstall with pip install . using the master branch, now it can be run

eb8680 commented 1 month ago

Setting both pyro-ppl==1.9.1 and torch==2.4.1 did it!

@dimkab I see, good to know. We should probably cut a new ChiRho release at some point that drops backward compatibility with pyro-ppl<=1.9.0 and torch<=2.4.0.

I would guess master still works with torch==2.5.0, which I believe was released quite recently, but maybe we should add CI build stages for each version of PyTorch we support.

qinqian commented 1 month ago

I could reproduce the figures from @dimkab with pyro-ppl==1.9.1 and torch==2.4.1

eb8680 commented 1 month ago

@qinqian can you please provide more detail? Do you mean the correct figures in the notebook now on master, or the incorrect figures in the first post of this issue? Are you sure you're running the unmodified notebook in a fresh kernel/environment with the correct versions of ChiRho (the current master branch, unmodified) and its dependencies (particularly torch==2.4.1 and pyro-ppl==1.9.1) installed? What OS are you using, and what packages are installed in your Conda/pip environment?

qinqian commented 1 month ago

@eb8680 I mean the incorrect figures in the first post of this issue as in (https://github.com/BasisResearch/chirho/issues/571#issue-2600688567). I am running the unmodified notebook in a fresh environment (the current master branch).

I am running on macOS Sonoma with PyTorch 2.4.1.post2 and Pyro-ppl 1.8.6, pip install . actually downgrade my pyro-ppl==1.9.1 to pyro-ppl 1.8.6.

Here are the packages I installed in a condo environment:

# Name                    Version                   Build  Channel
absl-py                   2.1.0                    pypi_0    pypi
aiohappyeyeballs          2.4.3                    pypi_0    pypi
aiohttp                   3.10.10                  pypi_0    pypi
aiosignal                 1.3.1                    pypi_0    pypi
anyio                     4.6.2.post1              pypi_0    pypi
appnope                   0.1.4                    pypi_0    pypi
argon2-cffi               23.1.0                   pypi_0    pypi
argon2-cffi-bindings      21.2.0                   pypi_0    pypi
arrow                     1.3.0                    pypi_0    pypi
asttokens                 2.4.1                    pypi_0    pypi
async-lru                 2.0.4                    pypi_0    pypi
async-timeout             4.0.3                    pypi_0    pypi
attrs                     24.2.0                   pypi_0    pypi
babel                     2.16.0                   pypi_0    pypi
beautifulsoup4            4.12.3                   pypi_0    pypi
bleach                    6.1.0                    pypi_0    pypi
bzip2                     1.0.8                h99b78c6_7    conda-forge
ca-certificates           2024.8.30            hf0a4a13_0    conda-forge
certifi                   2024.8.30                pypi_0    pypi
cffi                      1.17.1                   pypi_0    pypi
charset-normalizer        3.4.0                    pypi_0    pypi
chirho                    0.2.0                    pypi_0    pypi
colorama                  0.4.6              pyhd8ed1ab_0    conda-forge
comm                      0.2.2                    pypi_0    pypi
contourpy                 1.3.0                    pypi_0    pypi
cycler                    0.12.1                   pypi_0    pypi
debugpy                   1.8.7                    pypi_0    pypi
decorator                 5.1.1                    pypi_0    pypi
defusedxml                0.7.1                    pypi_0    pypi
exceptiongroup            1.2.2                    pypi_0    pypi
executing                 2.1.0                    pypi_0    pypi
fastjsonschema            2.20.0                   pypi_0    pypi
filelock                  3.16.1             pyhd8ed1ab_0    conda-forge
fonttools                 4.54.1                   pypi_0    pypi
fqdn                      1.5.1                    pypi_0    pypi
frozenlist                1.4.1                    pypi_0    pypi
fsspec                    2024.9.0           pyhff2d567_0    conda-forge
gmp                       6.3.0                h7bae524_2    conda-forge
gmpy2                     2.1.5           py310heb17c8b_2    conda-forge
grpcio                    1.67.0                   pypi_0    pypi
h11                       0.14.0                   pypi_0    pypi
httpcore                  1.0.6                    pypi_0    pypi
httpx                     0.27.2                   pypi_0    pypi
idna                      3.10                     pypi_0    pypi
imageio                   2.36.0                   pypi_0    pypi
ipykernel                 6.29.5                   pypi_0    pypi
ipython                   8.28.0                   pypi_0    pypi
ipywidgets                8.1.5                    pypi_0    pypi
isoduration               20.11.0                  pypi_0    pypi
jedi                      0.19.1                   pypi_0    pypi
jinja2                    3.1.4              pyhd8ed1ab_0    conda-forge
json5                     0.9.25                   pypi_0    pypi
jsonpointer               3.0.0                    pypi_0    pypi
jsonschema                4.23.0                   pypi_0    pypi
jsonschema-specifications 2024.10.1                pypi_0    pypi
jupyter                   1.1.1                    pypi_0    pypi
jupyter-client            8.6.3                    pypi_0    pypi
jupyter-console           6.6.3                    pypi_0    pypi
jupyter-core              5.7.2                    pypi_0    pypi
jupyter-events            0.10.0                   pypi_0    pypi
jupyter-lsp               2.2.5                    pypi_0    pypi
jupyter-server            2.14.2                   pypi_0    pypi
jupyter-server-terminals  0.5.3                    pypi_0    pypi
jupyterlab                4.2.5                    pypi_0    pypi
jupyterlab-pygments       0.3.0                    pypi_0    pypi
jupyterlab-server         2.27.3                   pypi_0    pypi
jupyterlab-widgets        3.0.13                   pypi_0    pypi
kiwisolver                1.4.7                    pypi_0    pypi
lazy-loader               0.4                      pypi_0    pypi
libabseil                 20240722.0      cxx17_hf9b8971_1    conda-forge
libblas                   3.9.0           24_osxarm64_openblas    conda-forge
libcblas                  3.9.0           24_osxarm64_openblas    conda-forge
libcxx                    19.1.2               ha82da77_0    conda-forge
libffi                    3.4.2                h3422bc3_5    conda-forge
libgfortran               5.0.0           13_2_0_hd922786_3    conda-forge
libgfortran5              13.2.0               hf226fd6_3    conda-forge
liblapack                 3.9.0           24_osxarm64_openblas    conda-forge
libopenblas               0.3.27          openmp_h517c56d_1    conda-forge
libprotobuf               5.27.5               h53f8970_2    conda-forge
libsqlite                 3.46.1               hc14010f_0    conda-forge
libtorch                  2.4.1           cpu_generic_h465ebda_2    conda-forge
libuv                     1.49.2               h7ab814d_0    conda-forge
libzlib                   1.3.1                h8359307_2    conda-forge
lightning-utilities       0.11.8                   pypi_0    pypi
llvm-openmp               19.1.2               hb52a8e5_0    conda-forge
markdown                  3.7                      pypi_0    pypi
markupsafe                3.0.2           py310h5799be4_0    conda-forge
matplotlib                3.9.2                    pypi_0    pypi
matplotlib-inline         0.1.7                    pypi_0    pypi
mistune                   3.0.2                    pypi_0    pypi
mpc                       1.3.1                h8f1351a_1    conda-forge
mpfr                      4.2.1                hb693164_3    conda-forge
mpmath                    1.3.0              pyhd8ed1ab_0    conda-forge
multidict                 6.1.0                    pypi_0    pypi
nbclient                  0.10.0                   pypi_0    pypi
nbconvert                 7.16.4                   pypi_0    pypi
nbformat                  5.10.4                   pypi_0    pypi
ncurses                   6.5                  h7bae524_1    conda-forge
nest-asyncio              1.6.0                    pypi_0    pypi
networkx                  3.4.1              pyhd8ed1ab_0    conda-forge
nomkl                     1.0                  h5ca1d4c_0    conda-forge
notebook                  7.2.2                    pypi_0    pypi
notebook-shim             0.2.4                    pypi_0    pypi
numpy                     1.26.4                   pypi_0    pypi
openssl                   3.3.2                h8359307_0    conda-forge
opt_einsum                3.4.0              pyhd8ed1ab_0    conda-forge
overrides                 7.7.0                    pypi_0    pypi
packaging                 24.1                     pypi_0    pypi
pandas                    2.2.3                    pypi_0    pypi
pandocfilters             1.5.1                    pypi_0    pypi
parso                     0.8.4                    pypi_0    pypi
pexpect                   4.9.0                    pypi_0    pypi
pillow                    11.0.0                   pypi_0    pypi
pip                       24.2               pyh8b19718_1    conda-forge
platformdirs              4.3.6                    pypi_0    pypi
prometheus-client         0.21.0                   pypi_0    pypi
prompt-toolkit            3.0.48                   pypi_0    pypi
propcache                 0.2.0                    pypi_0    pypi
protobuf                  5.28.2                   pypi_0    pypi
psutil                    6.1.0                    pypi_0    pypi
ptyprocess                0.7.0                    pypi_0    pypi
pure-eval                 0.2.3                    pypi_0    pypi
pycparser                 2.22                     pypi_0    pypi
pygments                  2.18.0                   pypi_0    pypi
pyparsing                 3.2.0                    pypi_0    pypi
pyro-api                  0.1.2              pyhd8ed1ab_0    conda-forge
pyro-ppl                  1.8.6                    pypi_0    pypi
python                    3.10.0          h43b31ca_3_cpython    conda-forge
python-dateutil           2.9.0.post0              pypi_0    pypi
python-graphviz           0.20.3                   pypi_0    pypi
python-json-logger        2.0.7                    pypi_0    pypi
python_abi                3.10                    5_cp310    conda-forge
pytorch                   2.4.1           cpu_generic_py310h8f0a05a_2    conda-forge
pytorch-lightning         2.4.0                    pypi_0    pypi
pytz                      2024.2                   pypi_0    pypi
pyyaml                    6.0.2                    pypi_0    pypi
pyzmq                     26.2.0                   pypi_0    pypi
readline                  8.2                  h92ec313_1    conda-forge
referencing               0.35.1                   pypi_0    pypi
requests                  2.32.3                   pypi_0    pypi
rfc3339-validator         0.1.4                    pypi_0    pypi
rfc3986-validator         0.1.1                    pypi_0    pypi
rpds-py                   0.20.0                   pypi_0    pypi
scikit-image              0.24.0                   pypi_0    pypi
scipy                     1.14.1                   pypi_0    pypi
seaborn                   0.13.2                   pypi_0    pypi
send2trash                1.8.3                    pypi_0    pypi
setuptools                75.1.0             pyhd8ed1ab_0    conda-forge
six                       1.16.0                   pypi_0    pypi
sleef                     3.7                  h7783ee8_0    conda-forge
sniffio                   1.3.1                    pypi_0    pypi
soupsieve                 2.6                      pypi_0    pypi
sqlite                    3.46.1               h3b4c4e4_0    conda-forge
stack-data                0.6.3                    pypi_0    pypi
sympy                     1.13.3          pypyh2585a3b_103    conda-forge
tensorboard               2.18.0                   pypi_0    pypi
tensorboard-data-server   0.7.2                    pypi_0    pypi
terminado                 0.18.1                   pypi_0    pypi
tifffile                  2024.9.20                pypi_0    pypi
tinycss2                  1.3.0                    pypi_0    pypi
tk                        8.6.13               h5083fa2_1    conda-forge
tomli                     2.0.2                    pypi_0    pypi
torchmetrics              1.5.0                    pypi_0    pypi
tornado                   6.4.1                    pypi_0    pypi
tqdm                      4.66.5             pyhd8ed1ab_0    conda-forge
traitlets                 5.14.3                   pypi_0    pypi
types-python-dateutil     2.9.0.20241003           pypi_0    pypi
typing_extensions         4.12.2             pyha770c72_0    conda-forge
tzdata                    2024.2                   pypi_0    pypi
uri-template              1.3.0                    pypi_0    pypi
urllib3                   2.2.3                    pypi_0    pypi
wcwidth                   0.2.13                   pypi_0    pypi
webcolors                 24.8.0                   pypi_0    pypi
webencodings              0.5.1                    pypi_0    pypi
websocket-client          1.8.0                    pypi_0    pypi
werkzeug                  3.0.4                    pypi_0    pypi
wheel                     0.44.0             pyhd8ed1ab_0    conda-forge
widgetsnbextension        4.0.13                   pypi_0    pypi
xz                        5.2.6                h57fd34a_0    conda-forge
yarl                      1.15.5                   pypi_0    pypi
eb8680 commented 1 month ago

@qinqian can you try installing pyro-ppl==1.9.1 after you install ChiRho but before you run the notebook?

qinqian commented 1 month ago

Yes, @eb8680 I tried this version and it fixed the issue above. Below are the figures I reproduced as the original notebook:

image image

What's the key difference between two versions?