Skip to content

Commit

Permalink
searcher refactor fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
rb-determined-ai committed Oct 22, 2024
1 parent c77419b commit a21afa3
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 8 deletions.
4 changes: 2 additions & 2 deletions harness/determined/common/api/bindings.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions master/pkg/searcher/actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package searcher

import (
"fmt"

"github.com/determined-ai/determined/master/pkg/nprand"
)

Expand Down
10 changes: 8 additions & 2 deletions master/pkg/searcher/simulate.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,21 @@ func Simulate(conf expconf.SearcherConfig, hparams expconf.Hyperparameters) (Sea
}
switch {
case conf.RawSingleConfig != nil:
searchSummary.Trials = append(searchSummary.Trials, TrialSummary{Count: 1, Unit: SearchUnit{MaxLength: true}})
searchSummary.Trials = append(
searchSummary.Trials,
TrialSummary{Count: 1, Unit: SearchUnit{MaxLength: true}},
)
return searchSummary, nil
case conf.RawRandomConfig != nil:
maxTrials := conf.RawRandomConfig.MaxTrials()
searchSummary.Trials = append(searchSummary.Trials, TrialSummary{Count: maxTrials, Unit: SearchUnit{MaxLength: true}})
return searchSummary, nil
case conf.RawGridConfig != nil:
hparamGrid := newHyperparameterGrid(hparams)
searchSummary.Trials = append(searchSummary.Trials, TrialSummary{Count: len(hparamGrid), Unit: SearchUnit{MaxLength: true}})
searchSummary.Trials = append(
searchSummary.Trials,
TrialSummary{Count: len(hparamGrid), Unit: SearchUnit{MaxLength: true}},
)
return searchSummary, nil
case conf.RawAdaptiveASHAConfig != nil:
ashaConfig := conf.RawAdaptiveASHAConfig
Expand Down
Binary file modified proto/buf.image.bin
Binary file not shown.
4 changes: 2 additions & 2 deletions proto/pkg/experimentv1/searcher.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions proto/src/determined/experiment/v1/searcher.proto
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ message TrialSummary {
SearchUnit unit = 2;
}

// SearchSummary contains the estimated trials and training lengths that a search
// plans to execute.
// SearchSummary contains the estimated trials and training lengths that a
// search plans to execute.
message SearchSummary {
option (grpc.gateway.protoc_gen_swagger.options.openapiv2_schema) = {
json_schema: { required: [ "config", "runs" ] }
Expand Down

0 comments on commit a21afa3

Please sign in to comment.