Beispiel #1
0
def test_fixed_trial_suggest_loguniform() -> None:

    trial = FixedTrial({"x": 0.99})
    assert trial.suggest_loguniform("x", 0.1, 1.0) == 0.99

    with pytest.raises(ValueError):
        trial.suggest_loguniform("y", 0.0, 1.0)
Beispiel #2
0
def test_fixed_trial_suggest_loguniform():
    # type: () -> None

    trial = FixedTrial({'x': 0.99})
    assert trial.suggest_loguniform('x', 0., 1.) == 0.99

    with pytest.raises(ValueError):
        trial.suggest_loguniform('y', 0., 1.)