mirror of
https://github.com/microsoft/autogen.git
synced 2025-09-24 15:46:33 +00:00

* increase test coverage * use define by run only when needed * warmstart bs * classification -> binary, multi * warm start with evaluated rewards * data transformer; resource attr for gs * BlendSearchTuner bug fix and unittest * bug fix * docstr and import * task type
19 lines
608 B
Python
19 lines
608 B
Python
from flaml.tune.sample import (
|
|
BaseSampler, PolynomialExpansionSet, Domain,
|
|
uniform, quniform, choice, randint, qrandint, randn,
|
|
qrandn, loguniform, qloguniform, lograndint, qlograndint)
|
|
|
|
|
|
def test_sampler():
|
|
print(randn().sample(size=2))
|
|
print(PolynomialExpansionSet(), BaseSampler())
|
|
print(qrandn(2, 10, 2).sample(size=2))
|
|
c = choice([1, 2])
|
|
print(c.domain_str, len(c), c.is_valid(3))
|
|
i = randint(1, 10)
|
|
print(i.domain_str, i.is_valid(10))
|
|
d = Domain()
|
|
print(d.domain_str, d.is_function())
|
|
d.default_sampler_cls = BaseSampler
|
|
print(d.get_sampler())
|