Skip to content

Commit

Permalink
Merge remote-tracking branch 'dorbanianas-fork/ad/fix-devin-benchmark…
Browse files Browse the repository at this point in the history
…' into fix/sphinx-version-issues
  • Loading branch information
kevinlu1248 committed Apr 6, 2024
2 parents 3430581 + 35ab948 commit 5595053
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 10 deletions.
31 changes: 22 additions & 9 deletions harness/constants.py
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
MAP_VERSION_TO_INSTALL_SKLEARN = {
k: {
"python": "3.6",
"packages": "numpy scipy cython pytest pandas matplotlib",
"packages": "numpy scipy Cython==0.27 pytest pandas matplotlib",
"install": "pip install -v --no-use-pep517 --no-build-isolation -e .",
}
for k in ["0.20", "0.21", "0.22"]
for k in ["0.20"]
}
MAP_VERSION_TO_INSTALL_SKLEARN.update(
{
k: {
"python": "3.7",
"packages": "numpy scipy cython pytest pandas matplotlib",
"packages": "numpy scipy Cython==0.29 pytest pandas matplotlib",
"install": "pip install -v --no-use-pep517 --no-build-isolation -e .",
}
for k in ["0.23", "0.24"]
for k in ["0.21", "0.22", "0.23", "0.24"]
}
)
MAP_VERSION_TO_INSTALL_SKLEARN.update(
{
k: {
"python": "3.9",
"packages": "numpy scipy cython pytest pandas matplotlib joblib threadpoolctl",
"packages": "numpy scipy Cython==0.29 pytest pandas matplotlib joblib threadpoolctl",
"install": "pip install -v --no-use-pep517 --no-build-isolation -e .",
}
for k in ["1.0", "1.1", "1.2", "1.3", "1.4"]
Expand Down Expand Up @@ -225,12 +225,25 @@
])

MAP_VERSION_TO_INSTALL_ASTROPY = {
k: {"python": "3.9", "install": "pip install -e .[test]"}
for k in
["0.1", "0.2", "0.3", "0.4", "1.1", "1.2", "1.3", "3.0", "3.1", "3.2"] + \
["4.1", "4.2", "4.3", "5.0", "5.1", "5.2"]
k: {
"python": "3.9",
"install": "python setup.py install",
"pip_packages": "pytest extension-helpers numpy",
}
for k in ["0.1", "0.2", "0.3", "0.4", "1.1", "1.2", "1.3", "3.0", "3.1", "3.2"]
}

MAP_VERSION_TO_INSTALL_ASTROPY.update(
{
k: {
"python": "3.9",
"install": "pip install -e .[test]",
"pip_packages": "pytest extension-helpers numpy",
}
for k in ["4.1", "4.2", "4.3", "5.0", "5.1", "5.2"]
}
)

MAP_VERSION_TO_INSTALL_SYMPY = {
k: {
"python": "3.9",
Expand Down
13 changes: 12 additions & 1 deletion harness/context_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,12 +327,23 @@ def __enter__(self):
os.remove(path_to_reqs)
else:
# Create environment + install dependencies
cmd = f"{exec_cmd} create -n {env_name} python={install['python']} {pkgs} -y"
cmd = f"{exec_cmd} create -n {env_name} python={install['python']} -y"
logger_testbed.info(
f"[Testbed] Creating environment {env_name}; Command: {cmd}"
)
self.exec(cmd.split(" "))

# Activate the environment and install the packages
activate_cmd = f". {path_activate} {env_name}"
full_cmd = f"{activate_cmd} && echo 'activate successful'"
if pkgs != "":
install_cmd = f"pip install {pkgs}"
full_cmd += f" && {install_cmd}"
logger_testbed.info(
f"[Testbed] Installing environment dependencies {pkgs}; Command: {full_cmd}"
)
self.exec(full_cmd, shell=True)

# Install additional packages if specified
if "pip_packages" in install:
cmd = f". {path_activate} {env_name} && pip install {install['pip_packages']}"
Expand Down

0 comments on commit 5595053

Please sign in to comment.