[FEAT] Add optimization.n_repeats for repeated benchmark runs#28
Draft
VincentG1234 wants to merge 1 commit into
Draft
[FEAT] Add optimization.n_repeats for repeated benchmark runs#28VincentG1234 wants to merge 1 commit into
VincentG1234 wants to merge 1 commit into
Conversation
Signed-off-by: Vincent Gimenes <vincent.gimenes@gmail.com>
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.
Summary
Add
optimization.n_repeats(default1) to run multiple GuideLLM benchmarks per Optuna trial configuration on the same vLLM server, report mean objectives to Optuna, and expose repeat spread in Optuna user attributes forlog_metrics.Why
Benchmark results are noisy. Repeating each configuration a few times (typically 2–3) reduces variance in the objective reported to the sampler, without changing the meaning of
n_trials(still one unique config per trial).What changed
auto_tune_vllm/core/config.py— addn_repeats: int = 1and validation (>= 1)auto_tune_vllm/execution/trial_controller.py— loop benchmark runs after a single vLLM startup; aggregate objectives/metrics by mean; store per-run values underdetailed_metrics.repeatswhenn_repeats > 1; fail the whole trial if any repeat failsauto_tune_vllm/core/study_controller.py— forlog_metricsonly, whenn_repeats > 1, writemetric_<name>,metric_<name>_rel_range,metric_<name>_values, andn_repeatsas Optuna user attrsdocs/configuration.md— documentn_repeatsand repeat-relatedlog_metricsattrsexamples/study_config.yaml— minimal smoke-test config (n_trials: 3,n_repeats: 2, baseline disabled)How tested
ruff check .pytest -v tests/(60 passed)auto-tune-vllm optimize --config examples/study_config.yaml, then inspect./optuna_studies/n_repeats_smoke_test/study.dbin Optuna Dashboard formetric_*_rel_range/metric_*_values