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

Function signal_handler

eval/Coding/mbpp/evaluate_mbpp.py:89–90  ·  view source on GitHub ↗
(signum, frame)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

TimeoutExceptionClass · 0.70

Tested by

no test coverage detected