nutpie
nutpie copied to clipboard
Better error message for missing optional dependencies
If you enable the normalizing flow adaptation, but don't have the required dependencies installed, the error only shows up once it tries to sample in one of the child processes:
RuntimeError: All initialization points failed
Caused by:
Could not initialize state because of bad initial gradient: Anyhow(ImportError: The 'flowjax' package is required to use normalizing flow adaptation.)
We should check this earlier.