def test_update_param_groups__default_no_add_entry() -> None:
    """Test that update_param_groups does not add new entries to param groups."""
    optimizer = SGD([{"name": "model", "params": Linear(1, 1).parameters()}], lr=0.1)
    optim.update_param_groups(
        optimizer=optimizer,
        default_update={"unknown": 1.0},
    )
    assert "unknown" not in optimizer.param_groups[0]
Test that update_param_groups does not add new entries to param groups.
tests/utils/test_optim.py