goptuna icon indicating copy to clipboard operation
goptuna copied to clipboard

Support OrdinalChoicesDistribution for Kubeflow/Katib.

Open c-bata opened this issue 3 years ago • 4 comments

See the following code comment of Katib.

// Use categorical distribution instead of goptuna.DiscreteUniformDistribution
// because goptuna.DiscreteUniformDistributions needs to declare the parameter
// space with minimum value, maximum value and interval.
choices := p.GetFeasibleSpace().GetList()
searchSpace[p.Name] = goptuna.CategoricalDistribution{
	Choices: choices,
}

https://github.com/kubeflow/katib/blob/2c4ad152cd5d534c86923a23e7350185d32b5538/pkg/suggestion/v1beta1/goptuna/converter.go#L146-L154

c-bata avatar Aug 08 '20 03:08 c-bata

Uber/bayesmark

# Treat ordinal identically to categorical for now
SPACE_DICT = {"real": Real, "int": Integer, "bool": Boolean, "cat": Categorical, "ordinal": Categorical}

https://github.com/uber/bayesmark/blob/38d8b3c6fae5799c4a8ac6ebf1cf91ffae3daf74/bayesmark/space.py#L668-L669

c-bata avatar Aug 08 '20 03:08 c-bata

Awesome, let us know if you need any help!

gaocegege avatar Aug 08 '20 08:08 gaocegege

Thank you!

c-bata avatar Aug 08 '20 09:08 c-bata

memo: This feature is related to https://github.com/optuna/optuna/issues/1736.

c-bata avatar Aug 29 '20 12:08 c-bata