Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
john-b-yang committed Dec 10, 2024
1 parent 2ebd0b8 commit 832d290
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion swebench/harness/docker_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
ENV_IMAGE_BUILD_DIR,
INSTANCE_IMAGE_BUILD_DIR,
MAP_REPO_VERSION_TO_SPECS,
UTF8,
)
from swebench.harness.test_spec import (
get_test_specs_from_dataset,
Expand Down Expand Up @@ -52,7 +53,7 @@ def setup_logger(instance_id: str, log_file: Path, mode="w"):
"""
log_file.parent.mkdir(parents=True, exist_ok=True)
logger = logging.getLogger(f"{instance_id}.{log_file.name}")
handler = logging.FileHandler(log_file, mode=mode, encoding='utf-8')
handler = logging.FileHandler(log_file, mode=mode, encoding=UTF8)
formatter = logging.Formatter("%(asctime)s - %(levelname)s - %(message)s")
handler.setFormatter(formatter)
logger.addHandler(handler)
Expand Down
6 changes: 4 additions & 2 deletions swebench/harness/run_evaluation.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
import docker
import json
import platform
if platform.system() == 'Linux': import resource
import traceback

if platform.system() == 'Linux':
import resource

from argparse import ArgumentParser
from concurrent.futures import ThreadPoolExecutor, as_completed
from pathlib import Path,PurePosixPath
from pathlib import Path, PurePosixPath
from tqdm import tqdm

from swebench.harness.constants import (
Expand Down

0 comments on commit 832d290

Please sign in to comment.