Skip to content

Add workflow to run SDGym monthly and publish results #427

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

Open
wants to merge 48 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
64f64f6
def 425
R-Palazzo Jul 21, 2025
db0ee3a
define run_benchmark.ym file
R-Palazzo Jul 21, 2025
6d63bc6
def 3
R-Palazzo Jul 21, 2025
92a4f1b
define upload workflow
R-Palazzo Jul 21, 2025
f6a3d1c
restructure files
R-Palazzo Jul 21, 2025
266cbf2
trigger on pushes
R-Palazzo Jul 21, 2025
234957f
fix upload benchmark workflow
R-Palazzo Jul 21, 2025
1c25b7f
fix workflow
R-Palazzo Jul 21, 2025
cfc31fd
fix run workflow
R-Palazzo Jul 21, 2025
86c2eaf
add unit test upload_benchmark
R-Palazzo Jul 22, 2025
f7e9733
update write_run_id
R-Palazzo Jul 22, 2025
d15900c
fix sving big pickles
R-Palazzo Jul 22, 2025
755ca33
increase timeout for large data
R-Palazzo Jul 22, 2025
fc1f7a1
fix benchmark
R-Palazzo Jul 22, 2025
ce661ea
debug
R-Palazzo Jul 22, 2025
54b9f31
use logger info
R-Palazzo Jul 22, 2025
37ea8cf
set level to info
R-Palazzo Jul 22, 2025
3d082cc
add logging handler
R-Palazzo Jul 22, 2025
bff2d22
fix logs
R-Palazzo Jul 22, 2025
9a07f7a
clean + fix region name
R-Palazzo Jul 22, 2025
af7afbb
update aws validation
R-Palazzo Jul 22, 2025
620c8b0
debug _score
R-Palazzo Jul 23, 2025
4104835
cleaning
R-Palazzo Jul 23, 2025
878005d
add unit test
R-Palazzo Jul 23, 2025
0d52be3
make variable name consistent
R-Palazzo Jul 23, 2025
cf270c4
add region name
R-Palazzo Jul 23, 2025
7fc725b
improve datetime logic
R-Palazzo Jul 24, 2025
4c411b8
add unit test
R-Palazzo Jul 24, 2025
c8e3067
address comments
R-Palazzo Jul 30, 2025
e8eb5be
def sclack 1
R-Palazzo Jul 30, 2025
a96fe88
pyproject slack sdk
R-Palazzo Jul 30, 2025
d7fe8bf
fix parameter name
R-Palazzo Jul 30, 2025
c00d200
add token
R-Palazzo Jul 30, 2025
9f7fe60
update slack message
R-Palazzo Jul 30, 2025
d5657df
update message 1
R-Palazzo Jul 31, 2025
a5ccd6d
update uploading workflow
R-Palazzo Jul 31, 2025
84e4c7c
fix upload
R-Palazzo Jul 31, 2025
3eed4fe
add unit tests
R-Palazzo Aug 1, 2025
614b419
clean run_benchmark
R-Palazzo Aug 1, 2025
e63a58d
cleaning 1
R-Palazzo Aug 4, 2025
a21c7f8
lauch benchmark with RealTabFormer
R-Palazzo Aug 4, 2025
fad6908
debug run with timeout 1
R-Palazzo Aug 5, 2025
2556dc4
debug run with timeout 2
R-Palazzo Aug 5, 2025
0b3f0f6
debug run with timeout 3
R-Palazzo Aug 5, 2025
b93a237
debug run with timeout 4
R-Palazzo Aug 5, 2025
734045e
debug run with timeout 5
R-Palazzo Aug 5, 2025
e38dde4
test with 1s time out
R-Palazzo Aug 5, 2025
584f3a7
run benchmark with timeout
R-Palazzo Aug 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/readme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@ jobs:
python -m pip install --upgrade pip
python -m pip install invoke rundoc .
python -m pip install tomli
python -m pip install slack-sdk
- name: Run the README.md
run: invoke readme
34 changes: 34 additions & 0 deletions .github/workflows/run_benchmark.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Run SDGym Benchmark

on:
push:
branches:
- issue-425-workflow-sdgym
workflow_dispatch:
schedule:
- cron: '0 5 5 * *'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be updated. Since I launched one today, I think every month on the 5th makes sense.


jobs:
run-sdgym-benchmark:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up latest Python
uses: actions/setup-python@v5
with:
python-version-file: 'pyproject.toml'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e .[dev]

- name: Run SDGym Benchmark
env:
SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_REGION }}

run: invoke run-sdgym-benchmark
101 changes: 101 additions & 0 deletions .github/workflows/upload_benchmark_results.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
name: Upload SDGym Benchmark results

on:
workflow_run:
workflows: ["Run SDGym Benchmark"]
types:
- completed
workflow_dispatch:
schedule:
- cron: '0 6 * * *'

jobs:
upload-sdgym-benchmark:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up latest Python
uses: actions/setup-python@v5
with:
python-version-file: 'pyproject.toml'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e .[dev]

- name: Upload SDGym Benchmark
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
GITHUB_LOCAL_RESULTS_DIR: ${{ runner.temp }}/sdgym-leaderboard-files
run: |
invoke upload-benchmark-results
echo "GITHUB_LOCAL_RESULTS_DIR=$GITHUB_LOCAL_RESULTS_DIR" >> $GITHUB_ENV

- name: Prepare files for PR
if: env.SKIP_UPLOAD != 'true'
run: |
mkdir pr-staging
echo "Looking for files in: $GITHUB_LOCAL_RESULTS_DIR"
ls -l "$GITHUB_LOCAL_RESULTS_DIR"
for f in "$GITHUB_LOCAL_RESULTS_DIR"/${FOLDER_NAME}_*.csv; do
base=$(basename "$f")
cp "$f" "pr-staging/${base}"
done

echo "Files staged for PR:"
ls -l pr-staging

- name: Checkout target repo (sdv-dev.github.io)
if: env.SKIP_UPLOAD != 'true'
run: |
git clone https://github.com/sdv-dev/sdv-dev.github.io.git target-repo
cd target-repo
git checkout gatsby-home

- name: Copy results and create PR
if: env.SKIP_UPLOAD != 'true'
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
FOLDER_NAME: ${{ env.FOLDER_NAME }}
run: |
cp pr-staging/* target-repo/assets/sdgym-leaderboard-files/
cd target-repo
git checkout -b sdgym-benchmark-upload-${FOLDER_NAME}
git config --local user.name "github-actions[bot]"
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"

git add assets/
git commit -m "Upload SDGym Benchmark Results ($FOLDER_NAME)"
git remote set-url origin https://x-access-token:${GH_TOKEN}@github.com/sdv-dev/sdv-dev.github.io.git
git push origin sdgym-benchmark-upload-${FOLDER_NAME}

gh pr create \
--repo sdv-dev/sdv-dev.github.io \
--head sdgym-benchmark-upload-${FOLDER_NAME} \
--base gatsby-home \
--title "Upload SDGym Benchmark Results ($FOLDER_NAME)" \
--body "Automated benchmark results upload" \
--reviewer "pcarapic15"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we automerge this instead of having predrag approve?


# Capture PR URL
PR_URL=$(gh pr view sdgym-benchmark-upload-${FOLDER_NAME} \
--repo sdv-dev/sdv-dev.github.io \
--json url -q .url)

echo "PR URL: $PR_URL"
echo "PR_URL=$PR_URL" >> $GITHUB_ENV

- name: Send Slack notification
if: env.SKIP_UPLOAD != 'true'
env:
SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }}
run: |
invoke notify-sdgym-benchmark-uploaded \
--folder-name "$FOLDER_NAME" \
--pr-url "$PR_URL"
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ test = [
'pytest-cov>=2.6.0',
'jupyter>=1.0.0,<2',
'tomli>=2.0.0,<3',
'slack-sdk>=3.23,<4.0'
]
dev = [
'sdgym[dask, test]',
Expand Down Expand Up @@ -196,6 +197,7 @@ exclude = [
".ipynb_checkpoints",
"tasks.py",
"static_code_analysis.txt",
"*.ipynb"
]

[tool.ruff.lint]
Expand Down
Loading
Loading