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

Function signal_handler

eval/utils/execution.py:92–93  ·  view source on GitHub ↗
(signum, frame)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

TimeoutExceptionClass · 0.70

Tested by

no test coverage detected