-
Notifications
You must be signed in to change notification settings - Fork 347
/
zgen_adaptive_config_v0.go
95 lines (75 loc) · 2.28 KB
/
zgen_adaptive_config_v0.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
// Code generated by gen.py. DO NOT EDIT.
package expconf
import (
"github.com/santhosh-tekuri/jsonschema/v2"
"github.com/determined-ai/determined/master/pkg/schemas"
)
func (a AdaptiveConfigV0) MaxLength() LengthV0 {
if a.RawMaxLength == nil {
panic("You must call WithDefaults on AdaptiveConfigV0 before .MaxLength")
}
return *a.RawMaxLength
}
func (a *AdaptiveConfigV0) SetMaxLength(val LengthV0) {
a.RawMaxLength = &val
}
func (a AdaptiveConfigV0) Budget() LengthV0 {
if a.RawBudget == nil {
panic("You must call WithDefaults on AdaptiveConfigV0 before .Budget")
}
return *a.RawBudget
}
func (a *AdaptiveConfigV0) SetBudget(val LengthV0) {
a.RawBudget = &val
}
func (a AdaptiveConfigV0) BracketRungs() []int {
return a.RawBracketRungs
}
func (a *AdaptiveConfigV0) SetBracketRungs(val []int) {
a.RawBracketRungs = val
}
func (a AdaptiveConfigV0) Divisor() float64 {
if a.RawDivisor == nil {
panic("You must call WithDefaults on AdaptiveConfigV0 before .Divisor")
}
return *a.RawDivisor
}
func (a *AdaptiveConfigV0) SetDivisor(val float64) {
a.RawDivisor = &val
}
func (a AdaptiveConfigV0) TrainStragglers() bool {
if a.RawTrainStragglers == nil {
panic("You must call WithDefaults on AdaptiveConfigV0 before .TrainStragglers")
}
return *a.RawTrainStragglers
}
func (a *AdaptiveConfigV0) SetTrainStragglers(val bool) {
a.RawTrainStragglers = &val
}
func (a AdaptiveConfigV0) Mode() AdaptiveMode {
if a.RawMode == nil {
panic("You must call WithDefaults on AdaptiveConfigV0 before .Mode")
}
return *a.RawMode
}
func (a *AdaptiveConfigV0) SetMode(val AdaptiveMode) {
a.RawMode = &val
}
func (a AdaptiveConfigV0) MaxRungs() int {
if a.RawMaxRungs == nil {
panic("You must call WithDefaults on AdaptiveConfigV0 before .MaxRungs")
}
return *a.RawMaxRungs
}
func (a *AdaptiveConfigV0) SetMaxRungs(val int) {
a.RawMaxRungs = &val
}
func (a AdaptiveConfigV0) ParsedSchema() interface{} {
return schemas.ParsedAdaptiveConfigV0()
}
func (a AdaptiveConfigV0) SanityValidator() *jsonschema.Schema {
return schemas.GetSanityValidator("http://determined.ai/schemas/expconf/v0/searcher-adaptive.json")
}
func (a AdaptiveConfigV0) CompletenessValidator() *jsonschema.Schema {
return schemas.GetCompletenessValidator("http://determined.ai/schemas/expconf/v0/searcher-adaptive.json")
}