From 0bb6fe7112a1edf574cb57aad680b4578e7fed47 Mon Sep 17 00:00:00 2001 From: Rashid Kaleem <230885705+arekay-nv@users.noreply.github.com> Date: Sun, 21 Jun 2026 21:47:11 -0500 Subject: [PATCH] Set warmup salt to true as default Signed-off-by: Rashid Kaleem <230885705+arekay-nv@users.noreply.github.com> --- src/inference_endpoint/config/schema.py | 2 +- .../config/templates/concurrency_template_full.yaml | 2 +- .../config/templates/offline_template_full.yaml | 2 +- .../config/templates/online_template_full.yaml | 2 +- tests/unit/commands/test_benchmark.py | 13 ++++++++++++- 5 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/inference_endpoint/config/schema.py b/src/inference_endpoint/config/schema.py index 9226d7f85..3cb3e9364 100644 --- a/src/inference_endpoint/config/schema.py +++ b/src/inference_endpoint/config/schema.py @@ -513,7 +513,7 @@ class WarmupConfig(BaseModel): help="Prepend a unique random hex salt to each warmup prompt", ), ] = Field( - False, description="Prepend a unique random hex salt to each warmup prompt" + True, description="Prepend a unique random hex salt to each warmup prompt" ) drain: Annotated[ bool, diff --git a/src/inference_endpoint/config/templates/concurrency_template_full.yaml b/src/inference_endpoint/config/templates/concurrency_template_full.yaml index 38829f0f5..bb06289d0 100644 --- a/src/inference_endpoint/config/templates/concurrency_template_full.yaml +++ b/src/inference_endpoint/config/templates/concurrency_template_full.yaml @@ -84,7 +84,7 @@ settings: warmup: enabled: false # Enable warmup phase before performance run n_requests: null # Warmup request count (None = full dataset once) - salt: false # Prepend a unique random hex salt to each warmup prompt + salt: true # Prepend a unique random hex salt to each warmup prompt drain: false warmup_random_seed: 42 # RNG seed for warmup scheduling and sample ordering endpoint_config: diff --git a/src/inference_endpoint/config/templates/offline_template_full.yaml b/src/inference_endpoint/config/templates/offline_template_full.yaml index c3454d5da..c29a15272 100644 --- a/src/inference_endpoint/config/templates/offline_template_full.yaml +++ b/src/inference_endpoint/config/templates/offline_template_full.yaml @@ -84,7 +84,7 @@ settings: warmup: enabled: false # Enable warmup phase before performance run n_requests: null # Warmup request count (None = full dataset once) - salt: false # Prepend a unique random hex salt to each warmup prompt + salt: true # Prepend a unique random hex salt to each warmup prompt drain: false warmup_random_seed: 42 # RNG seed for warmup scheduling and sample ordering endpoint_config: diff --git a/src/inference_endpoint/config/templates/online_template_full.yaml b/src/inference_endpoint/config/templates/online_template_full.yaml index 5bea95329..c77530399 100644 --- a/src/inference_endpoint/config/templates/online_template_full.yaml +++ b/src/inference_endpoint/config/templates/online_template_full.yaml @@ -84,7 +84,7 @@ settings: warmup: enabled: false # Enable warmup phase before performance run n_requests: null # Warmup request count (None = full dataset once) - salt: false # Prepend a unique random hex salt to each warmup prompt + salt: true # Prepend a unique random hex salt to each warmup prompt drain: false warmup_random_seed: 42 # RNG seed for warmup scheduling and sample ordering endpoint_config: diff --git a/tests/unit/commands/test_benchmark.py b/tests/unit/commands/test_benchmark.py index 1c90554fb..6e7f369de 100644 --- a/tests/unit/commands/test_benchmark.py +++ b/tests/unit/commands/test_benchmark.py @@ -412,7 +412,7 @@ def test_defaults(self): cfg = WarmupConfig() assert cfg.enabled is False assert cfg.n_requests is None - assert cfg.salt is False + assert cfg.salt is True assert cfg.drain is False @pytest.mark.unit @@ -837,6 +837,17 @@ def test_warmup_n_requests_none_when_unset(self, base_rt_settings, simple_datase assert phases[0].runtime_settings.n_samples_to_issue is None + @pytest.mark.unit + def test_warmup_defaults_uses_salt(self, base_rt_settings, simple_dataset): + config = OfflineConfig( + **_OFFLINE_KWARGS, + settings=OfflineSettings(warmup=WarmupConfig(enabled=True)), + ) + ctx = self._make_ctx(config, base_rt_settings, simple_dataset) + phases = _build_phases(ctx) + + assert phases[0].dataset._salt_rng is not None + @pytest.mark.unit def test_warmup_without_salt_uses_raw_dataloader( self, base_rt_settings, simple_dataset