openghg / openghg_inversions

University of Bristol Atmospheric Chemistry Research Group RHIME Inversion code (with openghg dependency)
MIT License
5 stars 0 forks source link

Dodgy import in `inversion_pymc.py` #175

Closed qq23840 closed 1 month ago

qq23840 commented 3 months ago

Line 18 of inversion_pymc.py imports the TensorVariable type, and currently reads

from pytensor.tensor.variable import TensorVariable

For me this throws an error, which I can fix by just changing to

from pytensor.tensor import TensorVariable

Is this an issue with my pytensor install? Or something everyone is getting?

qq23840 commented 3 months ago

Applicable to people currently running inversions I suppose @brendan-m-murphy @hdelongueville @alexdanjou

brendan-m-murphy commented 3 months ago

It hasn't caused me problems as far as I know. It looks like pytensor.tensor's init file imports TensorVariable from pytensor.tensor.variable, so importing from pytensor.tensor will work.

brendan-m-murphy commented 1 month ago

Looks like this has been fixed in some previous PR