Skip to content

Commit

Permalink
ruff formatting version change
Browse files Browse the repository at this point in the history
  • Loading branch information
gmoss13 committed Jan 18, 2025
1 parent 0b49bf3 commit 1cd1464
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions sbi/inference/potentials/score_based_potential.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ def set_x(
x_density_estimator = reshape_to_batch_event(
self.x_o, event_shape=self.score_estimator.condition_shape
)
assert (
x_density_estimator.shape[0] == 1
), "PosteriorScoreBasedPotential supports only x batchsize of 1`."
assert x_density_estimator.shape[0] == 1, (
"PosteriorScoreBasedPotential supports only x batchsize of 1`."
)
# For large number of evals, we want a high-tolerance flow.
# This flow will be used mainly for MAP calculations, hence we want to save
# it instead of rebuilding it every time.
Expand Down Expand Up @@ -128,9 +128,9 @@ def __call__(
x_density_estimator = reshape_to_batch_event(
self.x_o, event_shape=self.score_estimator.condition_shape
)
assert (
x_density_estimator.shape[0] == 1
), "PosteriorScoreBasedPotential supports only x batchsize of 1`."
assert x_density_estimator.shape[0] == 1, (
"PosteriorScoreBasedPotential supports only x batchsize of 1`."
)

flow = self.get_continuous_normalizing_flow(
condition=x_density_estimator, atol=atol, rtol=rtol, exact=exact
Expand Down

0 comments on commit 1cd1464

Please sign in to comment.