Skip to content

Commit 390be4e

Browse files
committed
tools: Autotuner: Add dependencies for Vizier
Signed-off-by: Eryk Szpotanski <eszpotanski@antmicro.com>
1 parent ca0c0bf commit 390be4e

2 files changed

Lines changed: 23 additions & 2 deletions

File tree

‎tools/AutoTuner/installer.sh‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,20 @@
33
# Get the directory where the script is located
44
script_dir="$(dirname "${BASH_SOURCE[0]}")"
55

6+
dependencies=""
7+
if [[ "$#" -eq 0 ]]; then
8+
echo "Installing dependencies for Ray Tune and Vizier"
9+
dependencies="ray,vizier"
10+
elif [[ "$#" -ne 1 ]] || ([[ "$1" != "ray" ]] && [[ "$1" != "vizier" ]]); then
11+
echo "Please specify whether 'ray' or 'vizier' dependencies should be installed" >&2
12+
exit 1
13+
else
14+
dependencies="$1"
15+
fi
16+
617
# Define the virtual environment name
718
venv_name="autotuner_env"
819
python3 -m venv "$script_dir/$venv_name"
920
source "$script_dir/$venv_name/bin/activate"
10-
pip3 install -e "$script_dir"
21+
pip3 install -e "$script_dir[$dependencies]"
1122
deactivate

‎tools/AutoTuner/pyproject.toml‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,12 @@ classifiers = [
88
]
99
readme = "README.md"
1010
dependencies = [
11-
"ray[default,tune]==2.9.3",
11+
"ray[default]==2.9.3",
12+
]
13+
14+
[project.optional-dependencies]
15+
ray = [
16+
"ray[tune]==2.9.3",
1217
"ax-platform>=0.3.3,<=0.3.7",
1318
"hyperopt==0.2.7",
1419
"optuna==3.6.0",
@@ -20,6 +25,11 @@ dependencies = [
2025
"SQLAlchemy==1.4.17",
2126
"urllib3<=1.26.15",
2227
]
28+
vizier = [
29+
"jax<=0.4.33",
30+
"google-vizier[jax]",
31+
"tqdm",
32+
]
2333

2434
[build-system]
2535
requires = ["setuptools", "setuptools_scm"]

0 commit comments

Comments
 (0)