Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issues pyright raises on newer Python versions #1108

Merged
merged 1 commit into from
Mar 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions sbi/samplers/mcmc/slice_numpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
import torch
from joblib import Parallel, delayed
from matplotlib import pyplot as plt
from matplotlib.axes import Axes
from matplotlib.figure import FigureBase
from tqdm.auto import tqdm, trange

from sbi.simulators.simutils import tqdm_joblib
Expand Down Expand Up @@ -134,8 +136,8 @@ def gen(

# show trace plot
if show_info:
fig: plt.FigureBase
ax: plt.Axes
fig: FigureBase
ax: Axes
fig, ax = plt.subplots(1, 1) # pyright: ignore[reportAssignmentType]
ax.plot(L_trace)
ax.set_ylabel("log probability")
Expand Down
Loading