Skip to content

Commit

Permalink
Fix empty instances error in prepare_images
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosejimenez committed Nov 22, 2024
1 parent b31927c commit 8b8dd10
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion swebench/harness/prepare_images.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

def filter_dataset_to_build(
dataset: list,
instance_ids: list,
instance_ids: list | None,
client: docker.DockerClient,
force_rebuild: bool
):
Expand All @@ -28,6 +28,9 @@ def filter_dataset_to_build(
# Get existing images
existing_images = list_images(client)
data_to_build = []

if instance_ids is None:
instance_ids = [instance[KEY_INSTANCE_ID] for instance in dataset]

# Check if all instance IDs are in the dataset
not_in_dataset = set(instance_ids).difference(set([instance[KEY_INSTANCE_ID] for instance in dataset]))
Expand Down

0 comments on commit 8b8dd10

Please sign in to comment.