Skip to content

Add dataset-from-file command to extract datasets from benchmark reports #235

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 2 commits into
base: main
Choose a base branch
from

Conversation

Harshith-umesh
Copy link

@Harshith-umesh Harshith-umesh commented Jul 21, 2025

This PR adds a new preprocessing command that enables users to extract datasets from saved benchmark reports, facilitating "apples-to-apples" model comparisons and reproducible benchmarking workflows.

New guidellm preprocess dataset-from-file command that converts benchmark report files into reusable datasets.

Users often want to compare different models using identical prompts to eliminate variability. This command extracts successful request-response pairs from benchmark results, creating standardized datasets with known prompt and output token counts.

The command validates benchmark reports and extracts successful requests, and outputs a structured JSON dataset.

Features Added

  • guidellm preprocess dataset-from-file [OPTIONS] BENCHMARK_FILE
  • Uses GenerativeBenchmarksReport.load_file() for comprehensive input validation
  • User-friendly error messages without Python tracebacks
  • Optional --show-stats flag for dataset analysis

Testing

./venv/bin/python -m pytest tests/unit/entrypoints/test_dataset_from_file_entrypoint.py -v

Usage Examples

# Extract dataset from benchmark results
guidellm preprocess dataset-from-file benchmark-results.json -o my_dataset.json

# Extract and Show statistics about the extracted dataset
guidellm preprocess dataset-from-file benchmark-results.json --show-stats

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.

1 participant