Skip to content

feat: add OneIG benchmark with subset support#508

Open
davidberenstein1957 wants to merge 10 commits intomainfrom
feat/add-oneig-benchmark
Open

feat: add OneIG benchmark with subset support#508
davidberenstein1957 wants to merge 10 commits intomainfrom
feat/add-oneig-benchmark

Conversation

@davidberenstein1957
Copy link
Member

@davidberenstein1957 davidberenstein1957 commented Jan 31, 2026

Closes #515

Summary

  • Add unified OneIG benchmark combining text rendering and alignment evaluation
  • Support subset filtering: text_rendering, anime_alignment, portrait_alignment, object_alignment
  • Fetch data from HuggingFace (OneIG-Bench/OneIG-Bench) and GitHub CSVs/JSONs
  • Each record includes subset field for easy filtering

Usage

from pruna.data import PrunaDataModule

# Load all subsets
dm = PrunaDataModule.from_string("OneIG")

# Load specific subset
dm = PrunaDataModule.from_string("OneIG", subset="text_rendering")
dm = PrunaDataModule.from_string("OneIG", subset="portrait_alignment")

Test plan

  • PrunaDataModule.from_string("OneIG") loads all subsets
  • Subset filtering works for all 4 subsets
  • Auxiliaries include subset, text_content (text_rendering), questions (alignment)
  • Docstring tests pass

davidberenstein1957 and others added 8 commits January 22, 2026 10:58
…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>
Document all dataclass fields per Numpydoc PR01 with summary on new line per GL01.

Co-authored-by: Cursor <cursoragent@cursor.com>
- 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

Co-authored-by: Cursor <cursoragent@cursor.com>
Update benchmark metrics to match registered names:
- clip -> clip_score
- clip_iqa -> clipiqa
- Remove unimplemented top5_accuracy

Co-authored-by: Cursor <cursoragent@cursor.com>
- Add setup_oneig_text_rendering_dataset in datasets/prompt.py
- Register OneIGTextRendering in base_datasets
- Add BenchmarkInfo entry with clip_score, clipiqa metrics
- Auxiliaries include text_content for OCR evaluation
- Add test for loading and auxiliaries

Co-authored-by: Cursor <cursoragent@cursor.com>
- Add setup_oneig_alignment_dataset in datasets/prompt.py
- Support category filter (Anime_Stylization, Portrait, General_Object)
- Register OneIGAlignment in base_datasets
- Add BenchmarkInfo entry with accuracy metric, task_type text_generation
- Auxiliaries include questions, dependencies, category
- Add test for loading with category filter

Co-authored-by: Cursor <cursoragent@cursor.com>
Combine text rendering and alignment into single OneIG benchmark:
- Add setup_oneig_dataset with subset parameter
- Subsets: text_rendering, anime_alignment, portrait_alignment, object_alignment
- Loading without subset returns all data combined
- Each record includes subset field for filtering
- Update tests to use subset parameter

Co-authored-by: Cursor <cursoragent@cursor.com>
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 7 potential issues.

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

davidberenstein1957 and others added 2 commits January 31, 2026 16:57
- Add subset parameter support to PrunaDataModule.from_string()
- Fix task_type from text_generation to text_to_image
- Unify schema between text_rendering and alignment datasets
- Remove unused imports in test file

Co-authored-by: Cursor <cursoragent@cursor.com>
Prevents IndexError when subset filtering returns no samples

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

[BENCHMARK] Add OneIG benchmarks (Alignment + Text Rendering)

1 participant