Skip to content

Commit 8bf20b8

Browse files
authored
fbcode/spdl/examples/image_dataloading.py
Differential Revision: D110967070 Pull Request resolved: #1600
1 parent c01afa7 commit 8bf20b8

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

examples/image_dataloading.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232

3333
# pyre-strict
3434

35+
from __future__ import annotations
36+
3537
import argparse
3638
import logging
3739
import signal
@@ -42,6 +44,7 @@
4244
from functools import partial
4345
from pathlib import Path
4446
from threading import Event
47+
from types import FrameType
4548

4649
import spdl.io
4750
import spdl.io.utils
@@ -222,7 +225,7 @@ def worker_entrypoint(args_: list[str]) -> PerfResult:
222225

223226
ev: Event = Event()
224227

225-
def handler_stop_signals(_signum, _frame) -> None:
228+
def handler_stop_signals(_signum: int, _frame: FrameType | None) -> None:
226229
ev.set()
227230

228231
signal.signal(signal.SIGTERM, handler_stop_signals)

0 commit comments

Comments
 (0)