Closed
Description
Description
I could be wrong, but when working on #6072, it seemed that the order of the rewrites in the database is only respected when using the kwarg position
. Otherwise it seems to be ignored, and only the order of definition matters.
So:
pymc/pymc/logprob/rewriting.py
Line 263 in e0d25c8
Should be:
logprob_rewrites_db.register(
"measurable_ir_rewrites", measurable_ir_rewrites_db, "basic", position=-10,
)
We should probably also leave an offset between pre-canonicalize
and measurable_ir_rewrites
(both are supposed to be at -10) in case anyone wants to introduce rewrites between those two phases.