feat: add HPS (Human Preference Score) benchmark#505
Open
davidberenstein1957 wants to merge 5 commits intomainfrom
Open
feat: add HPS (Human Preference Score) benchmark#505davidberenstein1957 wants to merge 5 commits intomainfrom
davidberenstein1957 wants to merge 5 commits intomainfrom
Conversation
…mpts benchmark - Introduced `from_benchmark` method in `PrunaDataModule` to create instances from benchmark classes. - Added `Benchmark`, `BenchmarkEntry`, and `BenchmarkRegistry` classes for managing benchmarks. - Implemented `PartiPrompts` benchmark for text-to-image generation with various categories and challenges. - Created utility function `benchmark_to_datasets` to convert benchmarks into datasets compatible with `PrunaDataModule`. - Added integration tests for benchmark functionality and data module interactions.
…filtering - Remove heavy benchmark abstraction (Benchmark class, registry, adapter, 24 subclasses) - Extend setup_parti_prompts_dataset with category and num_samples params - Add BenchmarkInfo dataclass for metadata (metrics, description, subsets) - Switch PartiPrompts to prompt_with_auxiliaries_collate to preserve Category/Challenge - Merge tests into test_datamodule.py Reduces 964 lines to 128 lines (87% reduction) Co-authored-by: Cursor <cursoragent@cursor.com>
Add HPS benchmark for text-to-image evaluation using the HPDv2 dataset. Supports 4 categories: anime, concept-art, paintings, photo. - Add setup_hps_dataset with category and num_samples filtering - Register in base_datasets with prompt_with_auxiliaries_collate - Add BenchmarkInfo with metrics: ["hps"] - Add tests for basic loading and category filtering Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
Comment @cursor review or bugbot run to trigger another review on this PR
- Add Numpydoc parameter docs for BenchmarkInfo - Add list_benchmarks() to filter benchmarks by task type - Add get_benchmark_info() to retrieve benchmark metadata - Add COCO, ImageNet, WikiText to benchmark_info registry - Fix metric names to match MetricRegistry (clip_score, clipiqa) Co-authored-by: Cursor <cursoragent@cursor.com>
Fixes potential UnicodeDecodeError on Windows systems where default encoding is locale-dependent. Co-authored-by: Cursor <cursoragent@cursor.com>
|
This PR has been inactive for 10 days and is now marked as stale. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #512
Summary
prompt_with_auxiliaries_collateto preserve category metadataChanges
setup_hps_datasetinsrc/pruna/data/datasets/prompt.pybase_datasetsinsrc/pruna/data/__init__.pyBenchmarkInfowith metrics:["hps"]Test plan
test_hps_with_category_filterpassestest_dm_from_string[HPS-...]passes