Repository navigation
Evaluation: Optional duplication factor #1105
Description
Is your feature request related to a problem?
The duplication_factor is set at the time of dataset upload and cannot be changed at runtime. This requires re-uploading the dataset to evaluate it with a different duplication factor, which is inefficient.
Describe the solution you'd like
Add an optional duplication_factor parameter to the v2 evals run endpoint:
- In
evaluate_v2: addduplication_factor: int | None = Body(None, ...)and pass it tovalidate_and_start_fast_evaluation. - In
_load_items_from_object_store: accept an optional override for the duplication factor; if provided, use it instead of the stored value. - In the summary path: read the
duplication_factorfrom the dataset metadata for accurate calculations, using the override when available. - Ensure this feature only applies to v2 datasets, with v1 datasets rejecting the override.
Original issue
Problem
duplication_factor is fixed at dataset upload time — stored in dataset_metadata (DATASET_META_DUPLICATION_FACTOR) and baked in when the dataset is created (backend/app/api/routes/evaluations/dataset_v2.py:41, backend/app/services/evaluations/dataset.py:35).
At run time, POST /evaluations (v2 trigger, backend/app/api/routes/evaluations/evaluation_v2.py:32) has no way to change it — _load_items_from_object_store in backend/app/services/evaluations/fast.py:91 always falls back to the dataset's stored factor:
metadata = dataset.dataset_metadata or {}
duplicate_at_runtime = bool(metadata.get(DATASET_META_DUPLICATE_AT_RUNTIME, False))
duplication_factor = (
max(1, int(metadata.get(DATASET_META_DUPLICATION_FACTOR, 1)))
if duplicate_at_runtime
else 1
)To re-run the same uploaded dataset at a different duplication factor, you currently have to re-upload it. Datasets are otherwise reusable across runs (different configs, models) — duplication factor shouldn't force a re-upload.
Proposal
Add an optional duplication_factor param to the v2 evals run endpoint:
evaluate_v2(backend/app/api/routes/evaluations/evaluation_v2.py): optionalduplication_factor: int | None = Body(None, ...), threaded throughvalidate_and_start_fast_evaluation._load_items_from_object_store(backend/app/services/evaluations/fast.py:91): accept an optional override param; when passed, use it instead ofmetadata.get(DATASET_META_DUPLICATION_FACTOR, 1). When absent, fall back to current behavior (dataset's stored factor, or 1 if not runtime-duplicated).attach_cost/summary path (backend/app/crud/evaluations/fast.py:1141) readsduplication_factorfrom dataset metadata for theai_summarymath (repetition-aware averaging) — needs the same override threaded through so the summary reflects the factor actually used for that run, not the dataset's stored default.
Only applies to v2 (runtime-duplicated) datasets — v1 datasets are physically duplicated in the CSV already, factor forced to 1, override should be a no-op or rejected for those.
Why
Makes an uploaded v2 dataset reusable at different duplication factors without re-uploading — e.g. quick sanity check at 1x, full eval at 5x, same dataset either way.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsClosed
Activity
[-]Allow overriding dataset duplication_factor at evals v2 run time[/-][+]Evaluation: Optional duplication factor[/+]github-actions commentedon Aug 18, 2026
🎉 This issue has been resolved in version 1.5.0-main.4 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀