-
Notifications
You must be signed in to change notification settings - Fork 67
Add workflow to run SDGym multi-table benchmark monthly and publish results #518
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
Merged
R-Palazzo
merged 26 commits into
feature_branch/mutli_table_benchmark
from
issue-516-add-workflows
Jan 8, 2026
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
664f2de
def 516
R-Palazzo b99d78a
run workflow on push
R-Palazzo c54c0f4
test 1
R-Palazzo 7b1756c
test 2
R-Palazzo a237b0c
test 3
R-Palazzo 7591fd5
test 4
R-Palazzo 384d262
test 5
R-Palazzo a0b9d6e
test 6
R-Palazzo 107afe2
test 7
R-Palazzo ec48267
test 8
R-Palazzo 4470809
test 9
R-Palazzo 68d2498
update upload results
R-Palazzo 61f3ca0
update upload 2
R-Palazzo 5899b55
address comments
R-Palazzo 7475168
lazy import
R-Palazzo 69abf2a
remove task for installing sdv_enterprise
R-Palazzo e0cb803
use invoke install-sdv-enterprise
R-Palazzo 2d81b22
clean runnning part
R-Palazzo d166cae
fix tests
R-Palazzo 3f97f59
add trigger on push
R-Palazzo 508494d
address comments
R-Palazzo 9a308db
test single-table
R-Palazzo 662b24c
test launching single and multi-table together
R-Palazzo 28cd25d
improve uploading
R-Palazzo 5842fcd
cleaning 516 jan
R-Palazzo 84b562d
kernel.panic=0
R-Palazzo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,31 +1,72 @@ | ||
| name: Run SDGym Benchmark | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| schedule: | ||
| - cron: '0 5 1 * *' | ||
| workflow_call: | ||
| inputs: | ||
| modality: | ||
| required: true | ||
| type: string | ||
| secrets: | ||
| SDV_ENTERPRISE_USERNAME: | ||
| required: true | ||
| SDV_ENTERPRISE_LICENSE_KEY: | ||
| required: true | ||
| GCP_SERVICE_ACCOUNT_JSON: | ||
| required: true | ||
| AWS_ACCESS_KEY_ID: | ||
| required: true | ||
| AWS_SECRET_ACCESS_KEY: | ||
| required: true | ||
| SLACK_TOKEN: | ||
| required: true | ||
|
|
||
| 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: | | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version-file: "pyproject.toml" | ||
|
|
||
| - name: Install dependencies | ||
| env: | ||
| USERNAME: ${{ secrets.SDV_ENTERPRISE_USERNAME }} | ||
| LICENSE_KEY: ${{ secrets.SDV_ENTERPRISE_LICENSE_KEY }} | ||
| run: | | ||
| python -m venv venv | ||
| source venv/bin/activate | ||
|
|
||
| python -m pip install --upgrade pip | ||
| python -m pip install --no-cache-dir -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 | ||
| python -m pip install sdv-installer | ||
| python -c " | ||
| from sdv_installer.installation.installer import install_packages | ||
| install_packages( | ||
| username='${USERNAME}', | ||
| license_key='${LICENSE_KEY}', | ||
| package='sdv-enterprise', | ||
| ) | ||
| python -m pip install sdgym[all] | ||
|
|
||
| echo "VIRTUAL_ENV=$(pwd)/venv" >> $GITHUB_ENV | ||
| echo "$(pwd)/venv/bin" >> $GITHUB_PATH | ||
|
|
||
| - name: Run SDGym Benchmark | ||
| env: | ||
| GCP_SERVICE_ACCOUNT_JSON: ${{ secrets.GCP_SERVICE_ACCOUNT_JSON }} | ||
| GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }} | ||
| GCP_ZONE: ${{ secrets.GCP_ZONE }} | ||
| SDV_ENTERPRISE_USERNAME: ${{ secrets.SDV_ENTERPRISE_USERNAME }} | ||
| SDV_ENTERPRISE_LICENSE_KEY: ${{ secrets.SDV_ENTERPRISE_LICENSE_KEY }} | ||
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
| SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }} | ||
| run: | | ||
| export CREDENTIALS_FILEPATH=$(python -c "from sdgym._benchmark.credentials_utils import create_credentials_file; print(create_credentials_file())") | ||
| invoke run-sdgym-benchmark --modality "${{ inputs.modality }}" | ||
| rm -f "$CREDENTIALS_FILEPATH" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| name: Run SDGym Benchmark Multi-Table | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| schedule: | ||
| - cron: "0 5 1 * *" | ||
|
|
||
| jobs: | ||
| call-run-sdgym-benchmark: | ||
| uses: ./.github/workflows/run_benchmark.yml | ||
| with: | ||
| modality: multi_table | ||
| secrets: inherit | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| name: Run SDGym Benchmark Single-Table | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| schedule: | ||
| - cron: "0 5 1 * *" | ||
|
|
||
| jobs: | ||
| call-run-sdgym-benchmark: | ||
| uses: ./.github/workflows/run_benchmark.yml | ||
| with: | ||
| modality: single_table | ||
| secrets: inherit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,91 +1,107 @@ | ||
| name: Upload SDGym Benchmark results | ||
| name: Upload SDGym Benchmark Results | ||
|
|
||
| on: | ||
| workflow_run: | ||
| workflows: ["Run SDGym Benchmark"] | ||
| types: | ||
| - completed | ||
| workflow_dispatch: | ||
| schedule: | ||
| - cron: '0 6 * * *' | ||
| workflow_call: | ||
| inputs: | ||
| modality: | ||
| description: "Benchmark modality to upload" | ||
| required: true | ||
| type: string | ||
| secrets: | ||
| PYDRIVE_TOKEN: | ||
| required: true | ||
| AWS_ACCESS_KEY_ID: | ||
| required: true | ||
| AWS_SECRET_ACCESS_KEY: | ||
| required: true | ||
| GH_TOKEN: | ||
| required: true | ||
| SLACK_TOKEN: | ||
| required: true | ||
|
|
||
| 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 --no-cache-dir -e .[dev] | ||
|
|
||
| - name: Upload SDGym Benchmark | ||
| env: | ||
| PYDRIVE_TOKEN: ${{ secrets.PYDRIVE_TOKEN }} | ||
| 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 commit | ||
| 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"/*; do | ||
| if [ -f "$f" ]; then | ||
| base=$(basename "$f") | ||
| cp "$f" "pr-staging/${base}" | ||
| fi | ||
| 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 commit | ||
| 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 gatsby-home | ||
| 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)" || echo "No changes to commit" | ||
| git remote set-url origin https://x-access-token:${GH_TOKEN}@github.com/sdv-dev/sdv-dev.github.io.git | ||
| git push origin gatsby-home | ||
| COMMIT_HASH=$(git rev-parse HEAD) | ||
| COMMIT_URL="https://github.com/sdv-dev/sdv-dev.github.io/commit/${COMMIT_HASH}" | ||
| echo "Commit URL: $COMMIT_URL" | ||
| echo "COMMIT_URL=$COMMIT_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" \ | ||
| --commit-url "$COMMIT_URL" | ||
| - 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 --no-cache-dir -e .[dev] | ||
|
|
||
| - name: Upload SDGym Benchmark | ||
| env: | ||
| PYDRIVE_TOKEN: ${{ secrets.PYDRIVE_TOKEN }} | ||
| 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 --modality "${{ inputs.modality }}" | ||
| echo "GITHUB_LOCAL_RESULTS_DIR=$GITHUB_LOCAL_RESULTS_DIR" >> $GITHUB_ENV | ||
|
|
||
| - name: Prepare files for commit | ||
| if: env.SKIP_UPLOAD != 'true' | ||
| run: | | ||
| set -euo pipefail | ||
| mkdir -p pr-staging | ||
|
|
||
| echo "Looking for files in: $GITHUB_LOCAL_RESULTS_DIR" | ||
| ls -l "$GITHUB_LOCAL_RESULTS_DIR" || true | ||
|
|
||
| shopt -s nullglob | ||
| for f in "$GITHUB_LOCAL_RESULTS_DIR"/*; do | ||
| [ -f "$f" ] && cp "$f" "pr-staging/$(basename "$f")" | ||
| done | ||
|
|
||
| echo "Files staged for PR:" | ||
| ls -l pr-staging || true | ||
|
|
||
| - 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 commit | ||
| if: env.SKIP_UPLOAD != 'true' | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GH_TOKEN }} | ||
| FOLDER_NAME: ${{ env.FOLDER_NAME }} | ||
| run: | | ||
| set -euo pipefail | ||
|
|
||
| cp -f pr-staging/* target-repo/assets/sdgym-leaderboard-files/ || true | ||
| cd target-repo | ||
|
|
||
| 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) - Modality: ${{ inputs.modality }}" || echo "No changes to commit" | ||
|
|
||
| git remote set-url origin "https://x-access-token:${GH_TOKEN}@github.com/sdv-dev/sdv-dev.github.io.git" | ||
| git push origin gatsby-home | ||
|
|
||
| COMMIT_HASH=$(git rev-parse HEAD) | ||
| COMMIT_URL="https://github.com/sdv-dev/sdv-dev.github.io/commit/${COMMIT_HASH}" | ||
| echo "COMMIT_URL=$COMMIT_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" \ | ||
| --commit-url "$COMMIT_URL" \ | ||
| --modality "${{ inputs.modality }}" |
16 changes: 16 additions & 0 deletions
16
.github/workflows/upload_benchmark_results_multi_table.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| name: Upload SDGym Multi-Table Benchmark results | ||
|
|
||
| on: | ||
| workflow_run: | ||
| workflows: ["Run SDGym Benchmark Multi-Table"] | ||
| types: [completed] | ||
| workflow_dispatch: | ||
| schedule: | ||
| - cron: "0 6 * * *" | ||
|
|
||
| jobs: | ||
| call-upload-benchmark-results: | ||
| uses: ./.github/workflows/upload_benchmark_results.yml | ||
| with: | ||
| modality: multi_table | ||
| secrets: inherit |
16 changes: 16 additions & 0 deletions
16
.github/workflows/upload_benchmark_results_single_table.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| name: Upload SDGym Single-Table Benchmark results | ||
|
|
||
| on: | ||
| workflow_run: | ||
| workflows: ["Run SDGym Benchmark Single-Table"] | ||
| types: [completed] | ||
| workflow_dispatch: | ||
| schedule: | ||
| - cron: "0 6 * * *" | ||
|
|
||
| jobs: | ||
| call-upload-benchmark-results: | ||
| uses: ./.github/workflows/upload_benchmark_results.yml | ||
| with: | ||
| modality: single_table | ||
| secrets: inherit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.