MCPcopy Create free account
hub / github.com/huggingface/evaluate / signal_handler

Function signal_handler

metrics/code_eval/execute.py:91–92  ·  view source on GitHub ↗
(signum, frame)

Source from the content-addressed store, hash-verified

89@contextlib.contextmanager
90def time_limit(seconds):
91 def signal_handler(signum, frame):
92 raise TimeoutException("Timed out!")
93
94 signal.setitimer(signal.ITIMER_REAL, seconds)
95 signal.signal(signal.SIGALRM, signal_handler)

Callers

nothing calls this directly

Calls 1

TimeoutExceptionClass · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…