log the underlying ImportError when bayesian deps fail to import

Swallowing the exception made it impossible to tell which of
jax/numpyro/stan actually failed in CI.
This commit is contained in:
Alejandro Moreo Fernandez 2026-07-17 17:06:33 +02:00
parent 48a5240a6e
commit 6e83bbef67
1 changed files with 2 additions and 1 deletions

View File

@ -35,7 +35,8 @@ try:
import stan.common
DEPENDENCIES_INSTALLED = True
except ImportError:
except ImportError as e:
logging.getLogger(__name__).warning(f'Bayesian dependencies failed to import: {e!r}')
jax = None
jnp = None
jrandom = None