diff --git a/swebench/harness/prepare_images.py b/swebench/harness/prepare_images.py index d6ad710d..3d14fe81 100644 --- a/swebench/harness/prepare_images.py +++ b/swebench/harness/prepare_images.py @@ -12,7 +12,7 @@ def filter_dataset_to_build( dataset: list, - instance_ids: list, + instance_ids: list | None, client: docker.DockerClient, force_rebuild: bool ): @@ -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]))