Skip to content

Commit

Permalink
more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
shaowei su committed Nov 30, 2022
1 parent ed2cbca commit 58ff940
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/apis/controller/trials/v1beta1/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ func (trial *Trial) IsMetricsUnavailable() bool {

// IsObservationAvailable return ture if the Trial has valid observations updated
func (trial *Trial) IsObservationAvailable() bool {
if trial.Spec.Objective == nil {
return false
}
objectiveMetricName := trial.Spec.Objective.ObjectiveMetricName
if trial.Status.Observation != nil && trial.Status.Observation.Metrics != nil {
for _, metric := range trial.Status.Observation.Metrics {
Expand Down

0 comments on commit 58ff940

Please sign in to comment.