Skip to content

Commit 09663fc

Browse files
committed
tools: AutoTuner: Setup pyproject
Signed-off-by: Eryk Szpotanski <eszpotanski@antmicro.com>
1 parent c58e7fe commit 09663fc

4 files changed

Lines changed: 19 additions & 19 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 -U -r $script_dir/requirements.txt
21+
pip3 install -e "$script_dir[$dependencies]"
1122
deactivate

‎tools/AutoTuner/pyproject.toml‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,16 @@ classifiers = [
66
"Programming Language :: Python :: 3",
77
"License :: OSI Approved :: BSD 3-Clause",
88
]
9-
readme = "RAY_README.md"
10-
dependencies = []
9+
readme = "README.md"
10+
dependencies = [
11+
"ray[default]==2.9.3",
12+
]
1113

1214
[project.optional-dependencies]
1315
ray = [
14-
"ray[default,tune]==2.9.3",
16+
"ray[tune]==2.9.3",
1517
"ax-platform>=0.3.3,<=0.3.7",
1618
"hyperopt==0.2.7",
17-
"nevergrad==1.0.2",
1819
"optuna==3.6.0",
1920
"pandas>=2.0,<=2.2.1",
2021
"bayesian-optimization==1.4.0",
@@ -25,7 +26,9 @@ ray = [
2526
"urllib3<=1.26.15",
2627
]
2728
vizier = [
29+
"jax<=0.4.33",
2830
"google-vizier[jax]",
31+
"tqdm",
2932
]
3033

3134
[build-system]

‎tools/AutoTuner/requirements.txt‎

Lines changed: 0 additions & 11 deletions
This file was deleted.

‎tools/AutoTuner/requirements_vizier.txt‎

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)