Week #9: CI failure on Python3.7-dbg

Published: 08/09/2021

What did you do this week?

I addressed more reviews this week and added pickling support to all the generators. Most of the changes focused on the documentation, tutorials, and the UI. We removed the params keyword (used to pass positional arguments to the passed callable) from the method constructor and had a discussion on renaming the seed parameter to something like numpy_rng. I also added some histogram plots to the docs and tutorials. Lastly, as all the generators are Cython extensions classes with a non-trivial __cinit__ method, Cython was not able to generate code to pickle object automatically. Hence, I added a rudimentary __reduce__ method which enables pickling support. Relevant tests have also been added.

What is coming up next?

We need to finalize renaming seed to something more apposite like rng or numpy_rng. All other blocking comments have been addressed, except a recent failure on CI. I will investigate the cause of the failure and try to resolve it by the end of this week. As the GSoC deadline is imminent, I hope to complete that by next week so we could merge the PR.

Did you get stuck anywhere?

I noticed a few failures on the linux workflows on Python3.7-dbg build. For some reason, Python crashes when TransformedDensityRejection is called with a invalid PDF. It seems like there is some internal logic error in the C/Cython code. As this is not a Python error with a proper traceback, it makes it very difficult to even locate the error, let alone solving it! I am thankfully able to replicate it locally and hope to figure out the failures as soon as possible.