pymc-devs/pymc

Check idata dims/coords for consistency before sampling begins

Open

#7.891 geöffnet am 8. Aug. 2025

Auf GitHub ansehen
 (11 Kommentare) (1 Reaktion) (0 zugewiesene Personen)Python (1.902 Forks)batch import
beginner friendlyhackathonhelp wantedmaintenanceshape problem

Repository-Metriken

Stars
 (7.926 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 11T 6h) (12 gemergte PRs in 30 T)

Beschreibung

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.

Contributor Guide