-
Notifications
You must be signed in to change notification settings - Fork 410
[Autotuner] Improve unit test reliability 1 #2538
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
84c7602
805d277
9158965
9b0671c
1792b5a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,3 +10,4 @@ __pycache__/ | |
| # Autotuner env | ||
| autotuner_env | ||
| .env | ||
| .venv | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| .PHONY: clearcache init reqs test | ||
|
|
||
| clearcache: | ||
| @echo "Cleaning python cache" | ||
| @find . -type d -name __pycache__ -exec rm -r {} \+ | ||
|
|
||
| init: | ||
| @echo "Installing python environment" | ||
| @./installer.sh | ||
|
|
||
| reqs: | ||
| @echo "Compiling requirements" | ||
| @rm -f requirements.txt | ||
| @.venv/bin/pip-compile --output-file=requirements.txt requirements.in | ||
|
|
||
| test: | ||
| @echo "Running tests" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,5 +7,25 @@ script_dir="$(dirname "${BASH_SOURCE[0]}")" | |
| venv_name="autotuner_env" | ||
| python3 -m venv "$script_dir/$venv_name" | ||
| source "$script_dir/$venv_name/bin/activate" | ||
| pip3 install -U -r $script_dir/requirements.txt | ||
| retry_count=0 | ||
| max_retries=5 | ||
| success=false | ||
|
|
||
| while [[ $retry_count -lt $max_retries ]]; do | ||
| if pip3 cache purge && pip3 install --no-cache-dir -U -r "$script_dir/requirements.txt"; then | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's not mutually exclusive. Pip cache purge might be needed if system had cache before, and no cache dir just ensures no future caching is done. |
||
| success=true | ||
| break | ||
| else | ||
| retry_count=$((retry_count + 1)) | ||
| echo "Attempt $retry_count failed. Retrying in 1 minute..." | ||
| sleep 60 | ||
| fi | ||
| done | ||
|
|
||
| if [ "$success" = false ]; then | ||
| echo "Failed to install requirements after $max_retries attempts." | ||
| deactivate | ||
| exit 1 | ||
| fi | ||
|
|
||
| deactivate | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| ray[default,tune]==2.9.3 | ||
| ax-platform>=0.3.3,<=0.3.7 | ||
| hyperopt==0.2.7 | ||
| optuna==3.6.0 | ||
| pandas>=2.0,<=2.2.1 | ||
| bayesian-optimization==1.4.0 | ||
| colorama==0.4.6 | ||
| tensorboard>=2.14.0,<=2.16.2 | ||
| protobuf==3.20.3 | ||
| SQLAlchemy==1.4.17 | ||
| urllib3<=1.26.15 | ||
| pip-tools==7.4.1 |
Uh oh!
There was an error while loading. Please reload this page.