Skip to content

Commit

Permalink
Fix compare step for the early stopping (#1386)
Browse files Browse the repository at this point in the history
  • Loading branch information
andreyvelich authored Nov 11, 2020
1 parent a96ff59 commit 6a1531b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
4 changes: 2 additions & 2 deletions cmd/metricscollector/v1beta1/file-metricscollector/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,9 @@ func watchMetricsFile(mFile string, stopRules stopRulesFlag, filters []string) {

// Reduce steps if appropriate metric is reported.
// Once rest steps are empty we apply early stopping rule.
if restSteps, ok := metricStartStep[metricName]; ok {
if _, ok := metricStartStep[metricName]; ok {
metricStartStep[metricName]--
if restSteps != 0 {
if metricStartStep[metricName] != 0 {
continue
}
}
Expand Down
7 changes: 0 additions & 7 deletions examples/v1beta1/early-stopping/median-stop.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,6 @@ spec:
value: "3"
- name: start_step
value: "5"
metricsCollectorSpec:
collector:
kind: StdOut
source:
filter:
metricsFormat:
- ([\w|-]+)\s*=\s*((-?\d+)(\.\d+)?)
parallelTrialCount: 2
maxTrialCount: 15
maxFailedTrialCount: 3
Expand Down

0 comments on commit 6a1531b

Please sign in to comment.