Skip to content

Commit 013f7a4

Browse files
fixtypes, maybe? cant run pyright locally
1 parent f8f02e7 commit 013f7a4

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

commit0/harness/docker_build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ def get_repo_configs_to_build(
166166
167167
"""
168168
image_scripts = dict()
169-
test_specs = get_specs_from_dataset(dataset, dataset_type)
169+
test_specs = get_specs_from_dataset(dataset, dataset_type, absolute=True)
170170

171171
for test_spec in test_specs:
172172
# Check if the base image exists

commit0/harness/execution_context.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ def __init__(
255255
# prepare for eval
256256
if files_to_copy:
257257
for _, f in files_to_copy.items():
258-
with open(f["src"], "r") as fp:
258+
with open(f["src"], "r") as fp: # type: ignore
259259
content = fp.read()
260260
self.sb.files.write(f["dest"].name, content) # type: ignore
261261

@@ -271,9 +271,10 @@ def exec_run_with_timeout(self, command: str) -> tuple[str, bool, float]:
271271
# TODO: setup timeout
272272
start_time = time.time()
273273
result = self.sb.commands.run(command, timeout=0)
274-
for fname in self.files_to_collect:
275-
with (self.log_dir / fname).open("w") as f:
276-
f.write(self.sb.files.read(f"testbed/{fname}"))
274+
if self.files_to_collect is not None:
275+
for fname in self.files_to_collect:
276+
with (self.log_dir / fname).open("w") as f:
277+
f.write(self.sb.files.read(f"testbed/{fname}"))
277278
timed_out = self.sb.is_running()
278279
end_time = time.time()
279280
return result.stderr, timed_out, end_time - start_time

0 commit comments

Comments
 (0)