fix: Vergleichstabellen nicht als Summenabweichung melden; Verstehen-Prompt in Prompt-Kennung
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
0d9b5d718f
commit
7aac3ff3ec
2 changed files with 40 additions and 2 deletions
|
|
@ -309,6 +309,7 @@ def test_benchmark_records_the_prompt_state():
|
|||
assert len(stand["prompts"]) == 12 and stand["commit"]
|
||||
assert "modeling/Routing-und-Extraktions-Prompt.txt" in PROMPT_FILES
|
||||
assert "core/model_schema.py" in PROMPT_FILES # Feldbeschreibungen wirken wie Prompt-Anweisungen
|
||||
assert "understanding/Verstehen-Prompt.txt" in PROMPT_FILES
|
||||
|
||||
|
||||
def test_deviating_settings_are_recorded(monkeypatch):
|
||||
|
|
|
|||
|
|
@ -228,3 +228,26 @@ def test_ascii_form_present_in_the_task_is_not_replaced():
|
|||
zuordnung = umlaut_map("Herr Müller und die Firma Mueller liefern.")
|
||||
assert "mueller" not in zuordnung
|
||||
assert fix_transliterations("Firma Mueller", zuordnung) == "Firma Mueller"
|
||||
|
||||
|
||||
# beobachtet in Portfolio Nr. 2: eine Zeile je Konfiguration, die gewählte trägt den Zielwert
|
||||
COMPARISON = {
|
||||
"title": "Vergleich der Konfigurationen",
|
||||
"columns": ["Konfiguration", "lambda1", "lambda2", "Zielfunktionswert"],
|
||||
"rows": [["Reine Varianzminimierung", "1.0", "0.0", 0.18217355],
|
||||
["Reine Korrelationsminimierung", "0.0", "1.0", -187.29514112],
|
||||
["Ausgewogene Skalarisierung", "0.5", "0.5", -93.56364364]],
|
||||
"objective_column": "Zielfunktionswert",
|
||||
}
|
||||
|
||||
|
||||
def test_comparison_table_is_not_a_sum_mismatch():
|
||||
tables, warnings = parse_result_tables([COMPARISON], objective_value=0.18217353985482126)
|
||||
assert warnings == [] and len(tables) == 1
|
||||
|
||||
|
||||
def test_decomposition_with_one_term_equal_to_objective_is_still_checked():
|
||||
# eine Summenzeile macht daraus eine Zerlegung – deren Fehler bleibt sichtbar
|
||||
table = dict(DECOMPOSITION, rows=[["Rendite", 0.097557], ["Kosten", -0.05], ["Zielwert", 0.2]])
|
||||
_, warnings = parse_result_tables([table], objective_value=0.097557)
|
||||
assert any("weicht vom Zielwert" in w for w in warnings)
|
||||
|
|
|
|||
Loading…
Reference in a new issue