Skip to content

Commit

Permalink
handle additional case
Browse files Browse the repository at this point in the history
  • Loading branch information
xingyaoww committed May 12, 2024
1 parent d9f18ec commit cbfb0e4
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions swebench/harness/context_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,13 @@ def __enter__(self):
logger_testbed.info(f"[Testbed-DEBUG]repo_path: {repo_path}")

# Remove existing environment
if self.task_instances_grouped[repo][version][0]['instance_id'] == 'pylint-dev__pylint-7097' and env_name in env_list:
# special case for pylint where there's a pip._vendor.pkg_resources.ContextualVersionConflict
logger_testbed.info(f'[Testbed] Removing existing environment {env_name} (hack for pylint-dev__pylint-7097)')
REMOVE_ENV_INSTANCE_IDS = {
'pylint-dev__pylint-8898', # pylint-dev__pylint__3.0
'pylint-dev__pylint-7097' # pylint-dev__pylint__2.15
}
# special case for pylint where there's a pip._vendor.pkg_resources.ContextualVersionConflict
if self.task_instances_grouped[repo][version][0]['instance_id'] in REMOVE_ENV_INSTANCE_IDS and env_name in env_list:
logger_testbed.info(f'[Testbed] Removing existing environment {env_name} (hack)')
self.exec(
f"{exec_cmd} env remove -n {env_name} -y".split(" ")
)
Expand Down

0 comments on commit cbfb0e4

Please sign in to comment.