-
Couldn't load subscription status.
- Fork 488
Include MetricsUnavailable condition to Complete in Trial #1877
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
877e6e6
7336c04
ce2d82f
5996be9
e32c642
5dbc5f3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -58,7 +58,13 @@ func updateTrialsSummary(instance *experimentsv1beta1.Experiment, trials *trials | |
| var bestTrialValue float64 | ||
| sts := &instance.Status | ||
| sts.Trials = 0 | ||
| sts.RunningTrialList, sts.PendingTrialList, sts.FailedTrialList, sts.SucceededTrialList, sts.KilledTrialList, sts.EarlyStoppedTrialList = nil, nil, nil, nil, nil, nil | ||
| sts.RunningTrialList = nil | ||
| sts.PendingTrialList = nil | ||
| sts.FailedTrialList = nil | ||
| sts.SucceededTrialList = nil | ||
| sts.KilledTrialList = nil | ||
| sts.EarlyStoppedTrialList = nil | ||
| sts.MetricsUnavailableTrialList = nil | ||
| bestTrialIndex := -1 | ||
| isObjectiveGoalReached := false | ||
| var objectiveValueGoal float64 | ||
|
|
@@ -79,6 +85,8 @@ func updateTrialsSummary(instance *experimentsv1beta1.Experiment, trials *trials | |
| sts.EarlyStoppedTrialList = append(sts.EarlyStoppedTrialList, trial.Name) | ||
| } else if trial.IsRunning() { | ||
| sts.RunningTrialList = append(sts.RunningTrialList, trial.Name) | ||
| } else if trial.IsMetricsUnavailable() { | ||
| sts.MetricsUnavailableTrialList = append(sts.MetricsUnavailableTrialList, trial.Name) | ||
| } else { | ||
| sts.PendingTrialList = append(sts.PendingTrialList, trial.Name) | ||
| } | ||
|
|
@@ -95,7 +103,7 @@ func updateTrialsSummary(instance *experimentsv1beta1.Experiment, trials *trials | |
| continue | ||
| } | ||
|
|
||
| //initialize vars to objective metric value of the first trial | ||
| // initialize vars to objective metric value of the first trial | ||
| if bestTrialIndex == -1 { | ||
| bestTrialValue = objectiveMetricValue | ||
| bestTrialIndex = index | ||
|
|
@@ -126,6 +134,7 @@ func updateTrialsSummary(instance *experimentsv1beta1.Experiment, trials *trials | |
| sts.TrialsFailed = int32(len(sts.FailedTrialList)) | ||
| sts.TrialsKilled = int32(len(sts.KilledTrialList)) | ||
| sts.TrialsEarlyStopped = int32(len(sts.EarlyStoppedTrialList)) | ||
| sts.TrialMetricsUnavailable = int32(len(sts.MetricsUnavailableTrialList)) | ||
|
|
||
| // if best trial is set | ||
| if bestTrialIndex != -1 { | ||
|
|
@@ -177,8 +186,9 @@ func getObjectiveMetricValue(trial trialsv1beta1.Trial) string { | |
| // UpdateExperimentStatusCondition updates the experiment status. | ||
| func UpdateExperimentStatusCondition(collector *ExperimentsCollector, instance *experimentsv1beta1.Experiment, isObjectiveGoalReached bool, getSuggestionDone bool) { | ||
| logger := log.WithValues("Experiment", types.NamespacedName{Name: instance.GetName(), Namespace: instance.GetNamespace()}) | ||
| completedTrialsCount := instance.Status.TrialsSucceeded + instance.Status.TrialsFailed + instance.Status.TrialsKilled + instance.Status.TrialsEarlyStopped | ||
| failedTrialsCount := instance.Status.TrialsFailed | ||
| completedTrialsCount := | ||
| instance.Status.TrialsSucceeded + instance.Status.TrialsFailed + instance.Status.TrialsKilled + instance.Status.TrialsEarlyStopped + instance.Status.TrialMetricsUnavailable | ||
| failedTrialsCount := instance.Status.TrialsFailed + instance.Status.TrialMetricsUnavailable | ||
| activeTrialsCount := instance.Status.TrialsPending + instance.Status.TrialsRunning | ||
| now := metav1.Now() | ||
|
|
||
|
|
@@ -192,7 +202,9 @@ func UpdateExperimentStatusCondition(collector *ExperimentsCollector, instance * | |
| } | ||
|
|
||
| // First check if MaxFailedTrialCount is reached. | ||
| if (instance.Spec.MaxFailedTrialCount != nil) && (failedTrialsCount > *instance.Spec.MaxFailedTrialCount) { | ||
| if (instance.Spec.MaxFailedTrialCount != nil) && | ||
| ((*instance.Spec.MaxFailedTrialCount != *instance.Spec.MaxTrialCount && failedTrialsCount > *instance.Spec.MaxFailedTrialCount) || | ||
|
||
| (*instance.Spec.MaxFailedTrialCount == *instance.Spec.MaxTrialCount && failedTrialsCount == *instance.Spec.MaxFailedTrialCount)) { | ||
| msg := "Experiment has failed because max failed count has reached" | ||
| instance.MarkExperimentStatusFailed(ExperimentFailedReason, msg) | ||
| instance.Status.CompletionTime = &now | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussion point:
Is TrialMetricsUnavailable state a failed state for a user?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that the TrialMetricsUnavailable state is a failed Trial for a user since katib can not use that Trial result to optimize hyperparameters even though the training is successful if the metrics-collector container fails to collect metrics.
What do you think? @johnugeorge
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so since it is a unrecoverable and an end state. We have to include this in docs as well to explain "Failed" trial"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It makes sense.
As I can see katib docs, we don't have any sections to describe Experiment status, so It might be better to explain Experiment status in this paragraph describing Experiment.
Does it sound good to you? @johnugeorge
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. We will wait for a day to get other reviews as well.