Skip to content

Commit 7a04fec

Browse files
esantorellafacebook-github-bot
authored andcommitted
Actions job to concatenate tutorials data to one CSV and run analysis notebook (#1703)
Summary: After tutorials performance data is uploaded to artifacts branch, a job runs to concatenate tutorials data to one CSV and run analysis notebook. The notebook, minus cell outputs, and the script that runs it will be in the 'main' branch, while the data and notebook outputs stay in the 'analytics' branch, which continues to not need to stay up-to-date with 'main' since it doesn't have its own Python code. ### Have you read the [Contributing Guidelines on pull requests](https://github.com/pytorch/botorch/blob/main/CONTRIBUTING.md#pull-requests)? Yes Pull Request resolved: #1703 Test Plan: [x] Ran with manual actions run "on push" (smoke test): [here](https://github.com/pytorch/botorch/actions/runs/4286198759/jobs/7465442757), more recent actions run [here](https://github.com/pytorch/botorch/actions/runs/4388959014/jobs/7686024723). [x] Auto-generated notebook should have nifty visualizations [here](https://github.com/pytorch/botorch/blob/artifacts/notebooks/tutorials_performance_tracking.ipynb) [x] Up-to-date dataset of all tutorials runs exists and looks OK [here](https://github.com/pytorch/botorch/blob/artifacts/tutorial_performance_data/all_data.csv) Reviewed By: saitcakmak Differential Revision: D43634570 Pulled By: esantorella fbshipit-source-id: 6d0f2eae16309bc5dbb2c554c35894f28b57c97c
1 parent a9c24b9 commit 7a04fec

File tree

3 files changed

+673
-3
lines changed

3 files changed

+673
-3
lines changed

.github/workflows/reusable_tutorials.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,22 @@ jobs:
9090
python scripts/run_tutorials.py -p "$(pwd)"
9191
- if: ${{ inputs.upload_artifact }}
9292
name: Upload performance data to artifacts branch
93-
# Upload any csv files (the tutorials script ensures there is only one)
93+
# 1) Switch to artifacts branch
94+
# 2) Add the new CSV file
95+
# 3) Get .py and .ipynb files needed for analyzing tutorials data from main
96+
# 4) Run `scripts/analyze_tutorials_performance.py` to merge CSVs and
97+
# update notebook
98+
# 5) Commit updated notebook and new CSVs to artifacts branch
9499
run: |
95100
git config user.email "[email protected]"
96101
git config user.name "github-actions"
102+
cp scripts/analyze_tutorials_performance.py analyze_tutorials_performance.py
103+
cp notebooks/tutorials_performance_tracking.ipynb tutorials_performance_tracking.ipynb
97104
git switch artifacts
98105
mv *.csv tutorial_performance_data/
99-
git add tutorial_performance_data/*.csv
100-
git commit tutorial_performance_data/*.csv -m "Adding most recent tutorials output"
106+
mv tutorials_performance_tracking.ipynb notebooks/
107+
pip install seaborn
108+
python analyze_tutorials_performance.py
109+
git add tutorial_performance_data/*.csv notebooks/tutorials_performance_tracking.ipynb
110+
git commit -a -m "Adding most recent tutorials CSVs and performance analytics notebook"
101111
git push origin artifacts

0 commit comments

Comments
 (0)