MCPcopy Create free account
hub / github.com/InternScience/SciReason / chdir

Function chdir

opencompass/datasets/livecodebench/execute_utils.py:178–189  ·  view source on GitHub ↗
(root)

Source from the content-addressed store, hash-verified

176
177@contextlib.contextmanager
178def chdir(root):
179 if root == '.':
180 yield
181 return
182 cwd = os.getcwd()
183 os.chdir(root)
184 try:
185 yield
186 except BaseException as exc:
187 raise exc
188 finally:
189 os.chdir(cwd)
190
191
192def reliability_guard(maximum_memory_bytes=None):

Callers 1

create_tempdirFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected