sbi
sbi copied to clipboard
Type 'potential_fn' properly, not 'Callable'
We currently type potential_fn only as Callable
https://github.com/sbi-dev/sbi/blob/bae69949df20f5616e2b4e9245579d079e09a9e8/sbi/utils/conditional_density_utils.py#L273-L276
despite implicitly requiring it to be a BasePotential to be able to call something like set_x:
https://github.com/sbi-dev/sbi/blob/bae69949df20f5616e2b4e9245579d079e09a9e8/sbi/utils/conditional_density_utils.py#L330
Changing the type to BasePotential will lead to other required changes down the line.