Cleanup distributions: `FloatDistribution` and `IntDistribution`
See original GitHub issueMotivation
There are six classes that represent distributions in Optuna. For categorical parameters, CategoricalDistribution
corresponds. For integer parameters, IntUniformDistribution
and IntLogUniformDistribution
. UniformDistribution
, LogUniformDistribution
, and DiscreteUniformDistribution
for floating-point parameters.
IntLoguniformDistribution
can be seen as a special case of IntUniformDistribution
. As well, LogUniformDistribution
and DiscreteUniformDistribution
as of UniformDistribution
.
In this issue, we will work on cleaning up distributions to three classes CategoricalDistribution
, IntDistribution
, and FloatDistribution
by renaming and unifying the existing distributions. We think it improves the user experience because suggest APIs (suggest_categorical
, suggest_int
, suggest_float
) would simply correspond to distribution names.
Description
- Introduce
FloatingDistribution
andIntDistribution
#3063 - Add
IntDistribution
andFloatDistribution
to the place where conditional branching is done byUniformDistribution
etc #3111 #3126 - Implement migration from current storage #3113
- Deprecate distributions mentioned in the description #2990
- Replace
UniformDistribution
etc toIntDistribution
andFloatDistribution
where instances of the distributions are created #3166 #3181 - Update old distributions such that they inherit from
IntDistribution
andFloatDistribution
#3244 - Automatically convert deprecated distribution if it is provided by user #3420
- Fix distribution compatibility for linear and logarithmic distribution #3444
Alternatives (optional)
Additional context (optional)
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (7 by maintainers)
@nyanhi @keisuke-umezawa Thank you so much for working on this issue.
In #2939, @xadrianzetx and I will work on a task to allow
suggest_float
to add a parameter (step
andlog
) during the optimization. I think it needsFloatDistribution
, which unifies floating-point distributions therefore I came here to ask if we can collaborate.As I understand, the current status and further tasks look like following:
After instantiating
FloatDistribution
instead of the current float distributions, we can addstep
orlog
during an optimization (likeIntUniformDistribution
).@nyanhi Would you continue this issue after #3063? I think tasks inside a rectangle can be worked on in parallel (by task or by type of distribution). And I’d be happy to collaborate with you to move forward. For example, I’m wondering if we can work on the tasks by the following assignment (just an example):
FloatDistribution
~IntDistribution
in codebaseIntDistribution
~FloatDistribution
in codebase@nyanhi @xadrianzetx What do you think? I’d like to know whether you’re interested in. (and please ask if you have any questions)
@xadrianzetx I think your first thought is just enough for this time. After introducing new distributions were completed, I want to modify codebase more elegant and readable with you.
@nyanhi, what do you think about it? It’s nice to have a discussion together because you will work on the similar task.