It looks like the definition of CategoricalCPD was changed in 065a6bc from having a flat list of distributions to have a multidimensional array such that indexing it is more convenient. This is not compatible with the current definition of fit, and build does not pass.