Skip to content

Commit

Permalink
Fix issue #4157: '[Bug]: Sandbox image build failed on eval'
Browse files Browse the repository at this point in the history
  • Loading branch information
openhands-agent committed Oct 2, 2024
1 parent 240a470 commit 0248aba
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions evaluation/swe_bench/eval_infer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
import platform
import tempfile
import time

Expand Down Expand Up @@ -303,6 +304,11 @@ def process_instance(
)
args, _ = parser.parse_known_args()

# Check if the processor is arm64
if platform.machine() == 'arm64':
logger.error("SWE-bench evaluation is not supported on arm64 processors.")
raise SystemExit("Evaluation aborted: arm64 processor detected.")

# Load SWE-Bench dataset
full_dataset: list[SWEbenchInstance] = load_swebench_dataset(
args.dataset, args.split
Expand Down
6 changes: 6 additions & 0 deletions evaluation/swe_bench/run_infer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import json
import os
import tempfile
import platform
from typing import Any

import pandas as pd
Expand Down Expand Up @@ -435,6 +436,11 @@ def filter_dataset(dataset: pd.DataFrame, filter_column: str) -> pd.DataFrame:
)
args, _ = parser.parse_known_args()

# Check if the processor is arm64
if platform.machine() == 'arm64':
logger.error("SWE-bench evaluation is not supported on arm64 processors.")
raise SystemExit("Evaluation aborted: arm64 processor detected.")

# NOTE: It is preferable to load datasets from huggingface datasets and perform post-processing
# so we don't need to manage file uploading to OpenHands's repo
dataset = load_dataset(args.dataset, split=args.split)
Expand Down

0 comments on commit 0248aba

Please sign in to comment.