pymc-devs / pymc

Bayesian Modeling and Probabilistic Programming in Python
https://docs.pymc.io/
Other
8.47k stars 1.97k forks source link

Problematic casting of integers in `convert_observed_data` #7331

Open ricardoV94 opened 1 month ago

ricardoV94 commented 1 month ago

Description

When we use pytensor.config.floatX=="float32", integer data is downcast to "int16" which has a pretty limited range of 32k. For count-based likelihoods this is way too narrow. I am not sure we should be doing anything with integers to begin with. Why are PyTensor casting rules (and customization flags) not sufficient?