You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@michaelosthege and I found out that the latest changes create issues when using pm.ConstantData (or pm.Data) and setting a dtype explicitly. We don't understand why because pytensor.shared has no problem with the dtype argument.
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
File "C:\Users\osthege\AppData\Local\mambaforge\envs\dibecs_6.13.0\lib\site-packages\pymc\data.py", line 420, in Data
x = pytensor.shared(arr, name, **kwargs)
File "C:\Users\osthege\AppData\Local\mambaforge\envs\dibecs_6.13.0\lib\site-packages\pytensor\compile\sharedvalue.py", line 202, in shared
var = shared_constructor(
File "C:\Users\osthege\AppData\Local\mambaforge\envs\dibecs_6.13.0\lib\functools.py", line 889, in wrapper
return dispatch(args[0].__class__)(*args, **kw)
TypeError: tensor_constructor() got an unexpected keyword argument 'dtype'
Do you have any idea why this is happening? Thanks in advance for your help!
Adding a convert_observed_data(value, dtype: Optional=None) option which gets priority would allow the line linked above to enforce the type and thereby avoid the casting.
@michaelosthege and I found out that the latest changes create issues when using
pm.ConstantData
(orpm.Data
) and setting a dtype explicitly. We don't understand why becausepytensor.shared
has no problem with the dtype argument.Here is an example:
Do you have any idea why this is happening? Thanks in advance for your help!
Originally posted by @lhelleckes in #7047 (comment)
The text was updated successfully, but these errors were encountered: