pymc-devs/pymc

Check idata dims/coords for consistency before sampling begins

Open

#7891 aperta il 8 ago 2025

Vedi su GitHub
 (11 commenti) (1 reazione) (0 assegnatari)Python (1902 fork)batch import
beginner friendlyhackathonhelp wantedmaintenanceshape problem

Metriche repository

Star
 (7926 star)
Metriche merge PR
 (Merge medio 11g 6h) (12 PR mergiate in 30 g)

Descrizione

Description

This is a painful gotcha I get hit by once in a while. If you have inconsistencies between the model coords and variable shapes, PyMC will still happy sample (often for hours, ask me how I know), then error out when it gets to the final step of building the idata.

I don't think there needs to be complex logic to validate static shapes etc, I'm thinking we could do a smoke test on the model initial point (or a single prior draw) to make sure it can be converted to an idata, and raise before sampling if not.

Guida contributor