MAINT BREAK: Move include_baseline from Scenario constructor to initi…#1700
Open
adrian-gavrila wants to merge 3 commits intomicrosoft:mainfrom
Open
Conversation
0d921bb to
206f1b4
Compare
…alize_async Treats include_baseline like every other common runtime parameter on initialize_async. Subclasses control behavior via two ClassVar flags: SUPPORTS_DEFAULT_BASELINE (capability) and DEFAULT_INCLUDE_BASELINE (default when caller doesn't specify). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
206f1b4 to
a21dbbb
Compare
added 2 commits
May 8, 2026 20:10
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.
Description
Drops
include_default_baselinefromScenario.__init__and from every subclass constructor. Addsinclude_baseline: bool | None = Noneas a keyword-only parameter onScenario.initialize_async, under@apply_defaults.This treats baseline like every other common runtime parameter (
objective_target,scenario_strategies,dataset_config,max_concurrency,max_retries,memory_labels), so it can be overridden perrun from a config file, the CLI, or the frontend without rebuilding the scenario object.
Class-level controls
Two
ClassVar[bool]flags on theScenariobase, mirroring the existingTARGET_REQUIREMENTSpattern:AdversarialBenchmarkandPsychosocialsetSUPPORTS_DEFAULT_BASELINE = False. Explicitinclude_baseline=Trueon these raisesValueError.JailbreaksetsDEFAULT_INCLUDE_BASELINE = False. It supports a baseline but does not include one by default (templates already dominate the run). Callers can opt in per run.Resolution checks capability first, then default. A forbidden scenario can never silently inherit a
Truedefault.Migration
Testing
pytest tests/unit/scenario: 555 passed.pytest tests/unit: 7460 passed.ruff check,ruff format,pre-commit(incl.tytype check): clean.initialize_async(include_baseline=True)onAdversarialBenchmarkraisesValueError;include_baseline=Falseon the same is accepted.