Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions ffn/jax/input_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ def __init__(
self._fs_lock = threading.Lock()
self._fs = set()
for i, gen in enumerate(self._generators):
self._fs.add(self._tpe.submit(lambda gen=gen, i=i: (i, next(gen)))) # pyrefly: ignore[missing-argument]
self._fs.add(self._tpe.submit(lambda gen=gen, i=i: (i, next(gen)))) # pyrefly: ignore[bad-argument-type, missing-argument]

# Prefetching of complete batches.
self._batch_tpe = futures.ThreadPoolExecutor(max_workers=batch_prefetch)
Expand Down Expand Up @@ -378,7 +378,7 @@ def _update(
for gen_idx in current:
gen = self._generators[gen_idx]
self._fs.add(
self._tpe.submit(lambda gen=gen, i=gen_idx: (i, next(gen))) # pyrefly: ignore[missing-argument]
self._tpe.submit(lambda gen=gen, i=gen_idx: (i, next(gen))) # pyrefly: ignore[bad-argument-type, missing-argument]
)

# Distribute data asynchronously.
Expand Down
4 changes: 2 additions & 2 deletions ffn/utils/ortho_plane_visualization.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ def cut_ortho_planes(

planes = []
full_slice = [slice(None)] * 3
for axis, ix in enumerate(center): # pyrefly: ignore[bad-argument-type]
for axis, ix in enumerate(center): # pyrefly: ignore[bad-argument-type, not-iterable]
cut_slice = list(full_slice)
cut_slice[axis] = ix # pyrefly: ignore[unsupported-operation]
planes.append(vol[tuple(cut_slice)])
if cross_hair:
# Copy because cross hair is written into array data.
plane = planes[-1].copy()
i = 0
for ax, c in enumerate(center): # pyrefly: ignore[bad-argument-type]
for ax, c in enumerate(center): # pyrefly: ignore[bad-argument-type, not-iterable]
if ax != axis:
# Make axis i the 0-axis an work in-place.
view = np.rollaxis(plane, i)
Expand Down
Loading