SPB Git

spb/wp27_uqo

Public
688 B · 12 lines python
1from market_agents.experiments.config import RunConfig234def test_leaf_dict_overrides_replace_and_sections_merge():5    cfg = RunConfig()6    t = cfg.with_overrides(**{"population.llm.provider_mix": {"openai": 1.0}, "population.llm_share": 0.25, "exchange.halt_threshold": 0.05})7    assert t.population.llm.provider_mix == {"openai": 1.0}8    assert t.population.llm_share == 0.25 and t.exchange.halt_threshold == 0.059    assert t.exchange.taker_fee_bps == cfg.exchange.taker_fee_bps            # section merge keeps the rest10    t2 = cfg.with_overrides(population={"mix": {"market_maker": 1.0}, "activity": {"market_maker": 0.0}})11    assert t2.population.mix == {"market_maker": 1.0}12
Files · 74b1f4645e719f7595f741141ffd6a7560577c3f
Menu

Theme