tune.utils
choice
def choice(categories: Sequence, order=None)
Sample a categorical value.
Sampling from tune.choice([1, 2])
is equivalent to sampling from
np.random.choice([1, 2])
Arguments:
categories
Sequence - Sequence of categories to sample from.order
bool - Whether the categories have an order. If None, will be decided autoamtically: Numerical categories have an order, while string categories do not.