sbi icon indicating copy to clipboard operation
sbi copied to clipboard

Type 'potential_fn' properly, not 'Callable'

Open Baschdl opened this issue 1 year ago • 0 comments

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.

Baschdl avatar Mar 20 '24 13:03 Baschdl