pyro-ppl / numpyro

Probabilistic programming with NumPy powered by JAX for autograd and JIT compilation to GPU/TPU/CPU.
https://num.pyro.ai
Apache License 2.0
2.1k stars 227 forks source link

fixing nested_sampling.py #1738

Closed renecotyfanboy closed 5 months ago

renecotyfanboy commented 5 months ago

I did a small fix for the nested sampling contributed code so that it works with jaxns 2.4.8 It tested it by running the gaussian shell example, which leads to similar results as what we would have expected before

Capture d’écran 2024-02-19 à 13 53 40

renecotyfanboy commented 5 months ago

Sorry, I didn't check that there was already an open PR for this task #1727. I added a commit for bumping the jaxns version to the latest, and will close my PR if required

fehiepsi commented 5 months ago

Thanks, @renecotyfanboy! Could you run make format and make lint to fix the lint issue?

renecotyfanboy commented 5 months ago

I manually linted the file with ruff, the make lint and make format tools fails locally due to the header script :

python scripts/update_headers.py
Traceback (most recent call last):
  File "/Users/sdupourque/PycharmProjects/numpyro/scripts/update_headers.py", line 45, in <module>
    while lines[lineno].startswith(comment.format("Copyright")):
IndexError: list index out of range
fehiepsi commented 5 months ago

Seems like there is a python file which has conflict format in your folder. CI works btw. :)