Skip to content

Commit

Permalink
set default distribution as uniform
Browse files Browse the repository at this point in the history
Signed-off-by: Shashank Mittal <shashank.mittal.mec22@itbhu.ac.in>
  • Loading branch information
shashank-iitbhu committed Jan 7, 2025
1 parent 4f35663 commit c35789b
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ func (e *Experiment) SetDefault() {
e.setDefaultObjective()
e.setDefaultTrialTemplate()
e.setDefaultMetricsCollector()
e.setDefaultParameterDistribution()
}

func (e *Experiment) setDefaultParallelTrialCount() {
Expand Down Expand Up @@ -176,3 +177,11 @@ func (e *Experiment) setDefaultMetricsCollector() {
}
}
}

func (e *Experiment) setDefaultParameterDistribution() {
for i := range e.Spec.Parameters {
if e.Spec.Parameters[i].FeasibleSpace.Distribution == "" {
e.Spec.Parameters[i].FeasibleSpace.Distribution = DistributionUniform
}
}
}

0 comments on commit c35789b

Please sign in to comment.