Tighten LLM proposal schema
This commit is contained in:
@@ -682,6 +682,23 @@ class CoreFlowTests(unittest.TestCase):
|
||||
)
|
||||
self.assertEqual(proposal.expected_effects, ["higher throughput"])
|
||||
|
||||
def test_proposal_expected_effects_accepts_object(self) -> None:
|
||||
proposal = Proposal.from_dict(
|
||||
{
|
||||
"observation": "obs",
|
||||
"diagnosis": "diag",
|
||||
"config_patch": {"env_patch": {}, "flag_patch": {}},
|
||||
"expected_effects": {
|
||||
"throughput": "higher",
|
||||
"ttft": "lower",
|
||||
},
|
||||
}
|
||||
)
|
||||
self.assertEqual(
|
||||
proposal.expected_effects,
|
||||
["throughput: higher", "ttft: lower"],
|
||||
)
|
||||
|
||||
def test_replay_requests_early_stops_when_slo_is_unrecoverable(self) -> None:
|
||||
requests = [
|
||||
TraceRequest(
|
||||
|
||||
Reference in New Issue
Block a user