Skip to content
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

Fix compare step for the early stopping #1386

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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