Skip to content

Update the benchmark to load datasets from multiple S3 buckets when None is specified#607

Merged
R-Palazzo merged 15 commits into
mainfrom
issue-604-2-private-bucket
Jun 1, 2026
Merged

Update the benchmark to load datasets from multiple S3 buckets when None is specified#607
R-Palazzo merged 15 commits into
mainfrom
issue-604-2-private-bucket

Conversation

@R-Palazzo
Copy link
Copy Markdown
Collaborator

@R-Palazzo R-Palazzo commented May 25, 2026

Resolve #604
CU-86b9zwpcu

This PR includes:

  • Relying on SDV download_demo() to get sdv_dataset. This works for public datasets or for users with SDV-Enterprise installed. Otherwise, because on SDV there is some validation to allow access to the public bucket only, I reused the SDV logic here, so it works if the S3 client is created with valid credentials (from input keys or env variables).
  • Because we rely on download_demo(), we no longer save the dataset locally.
  • Improvement in the _generate_job_arg_list: Now we're only passing dataset_info inside it. The dataset_info includes everything necessary to then download the data and metadata during execution.
  • Added an integration test with a private dataset. Also tested it on AWS here and GCP here.

@R-Palazzo R-Palazzo self-assigned this May 25, 2026
@R-Palazzo R-Palazzo requested a review from a team as a code owner May 25, 2026 19:49
@sdv-team
Copy link
Copy Markdown
Contributor

@R-Palazzo R-Palazzo removed the request for review from a team May 25, 2026 19:50
@codecov
Copy link
Copy Markdown

codecov Bot commented May 25, 2026

Codecov Report

❌ Patch coverage is 95.87629% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.91%. Comparing base (61e71cb) to head (e4bfb1d).

Files with missing lines Patch % Lines
sdgym/benchmark.py 92.45% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #607      +/-   ##
==========================================
+ Coverage   85.67%   85.91%   +0.24%     
==========================================
  Files          40       40              
  Lines        3679     3749      +70     
==========================================
+ Hits         3152     3221      +69     
- Misses        527      528       +1     
Flag Coverage Δ
integration 43.85% <76.28%> (+0.25%) ⬆️
unit 81.72% <95.87%> (+0.23%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread pyproject.toml
Comment thread sdgym/datasets.py

def _get_dataset_bucket_mapping(modality, buckets, s3_client, skip_inaccessible=False):
"""Map SDV demo dataset names to the bucket they should be loaded from."""
dataset_buckets = {}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nitpick: can we call dataset_to_bucket

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yes, done in c349d70

@R-Palazzo R-Palazzo force-pushed the issue-604-2-private-bucket branch from 725c22c to 5555441 Compare May 28, 2026 09:27
Comment thread sdgym/benchmark.py
"""Main SDGym benchmarking module."""

import functools
import gzip
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Since the dataset is no longer included in the job_arg_list, we don't need to compress it. Also, it now contains one job by default, and from my tests, it's roughly 1KB.

@R-Palazzo R-Palazzo requested a review from amontanez24 May 28, 2026 09:54
Comment thread sdgym/benchmark.py Outdated
@R-Palazzo R-Palazzo requested a review from sarahmish May 29, 2026 09:11
Comment thread sdgym/benchmark.py
Comment on lines +887 to +891
def _get_s3_client_from_result_writer(result_writer):
if isinstance(result_writer, S3ResultsWriter):
return result_writer.s3_client

return None
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just want to note that in the future, we should setup the s3 client independently from using the same credentials as writing the results.

Comment thread sdgym/datasets.py
Comment thread sdgym/datasets.py
Comment thread sdgym/datasets.py Outdated
@R-Palazzo R-Palazzo force-pushed the issue-604-2-private-bucket branch from b97fa0d to 0786528 Compare June 1, 2026 17:08
@R-Palazzo R-Palazzo requested a review from sarahmish June 1, 2026 17:09
Comment thread sdgym/datasets.py
Comment thread sdgym/datasets.py
@R-Palazzo R-Palazzo requested a review from sarahmish June 1, 2026 17:29
@R-Palazzo R-Palazzo force-pushed the issue-604-2-private-bucket branch from 4bd6e85 to 4907bb3 Compare June 1, 2026 18:33
@R-Palazzo R-Palazzo force-pushed the issue-604-2-private-bucket branch from 4907bb3 to e4bfb1d Compare June 1, 2026 18:35
@R-Palazzo R-Palazzo merged commit 6228ecb into main Jun 1, 2026
51 of 57 checks passed
@R-Palazzo R-Palazzo deleted the issue-604-2-private-bucket branch June 1, 2026 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update the benchmark to load datasets from multiple S3 buckets when None is specified

5 participants