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

Function chdir

eval/utils/execution.py:144–155  ·  view source on GitHub ↗
(root)

Source from the content-addressed store, hash-verified

142
143@contextlib.contextmanager
144def chdir(root):
145 if root == ".":
146 yield
147 return
148 cwd = os.getcwd()
149 os.chdir(root)
150 try:
151 yield
152 except BaseException as exc:
153 raise exc
154 finally:
155 os.chdir(cwd)
156
157
158def reliability_guard(maximum_memory_bytes: Optional[int] = None):

Callers 1

create_tempdirFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected