Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/inference_endpoint/config/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Comment thread
arekay-nv marked this conversation as resolved.
)
drain: Annotated[
bool,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
13 changes: 12 additions & 1 deletion tests/unit/commands/test_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading