adrn / thejoker

A custom Monte Carlo sampler for the (gravitational) two-body problem
MIT License
30 stars 8 forks source link

These two lines will break in a next release of PyMC/PyTensor #134

Closed ricardoV94 closed 3 months ago

ricardoV94 commented 5 months ago

I noticed you're using owner.inputs[3:] to obtain the RandomVariable inputs in these lines:

https://github.com/adrn/thejoker/blob/101817aac68aceac1074fe54ee9c472ed340830c/thejoker/src/tests/py_likelihood.py#L147-L151

These line will not work after https://github.com/pymc-devs/pytensor/releases/tag/rel-2.23.0 gets pinned by PyMC. Looks like you're always accessing the last param? In that case you could do negative index [-1] or use the new owner.op.dist_params(owner) (although it's not available in the old format).

Sorry for the trouble and let me know if I can help

adrn commented 3 months ago

Thank you! I think I fixed this (and added a catch for past versions of pymc).