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:
categoriesSequence - Sequence of categories to sample from.orderbool - Whether the categories have an order. If None, will be decided autoamtically: Numerical categories have an order, while string categories do not.