MCPcopy Create free account
hub / github.com/PRIME-RL/PRIME / signal_handler

Function signal_handler

eval/utils/grader.py:390–391  ·  view source on GitHub ↗
(signum, frame)

Source from the content-addressed store, hash-verified

388@contextlib.contextmanager
389def time_limit(seconds: float):
390 def signal_handler(signum, frame):
391 raise TimeoutException("Timed out!")
392
393 signal.setitimer(signal.ITIMER_REAL, seconds)
394 signal.signal(signal.SIGALRM, signal_handler)

Callers

nothing calls this directly

Calls 1

TimeoutExceptionClass · 0.70

Tested by

no test coverage detected