-
Notifications
You must be signed in to change notification settings - Fork 347
/
zgen_adaptive_simple_config_v0.go
76 lines (60 loc) · 1.97 KB
/
zgen_adaptive_simple_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
// 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 AdaptiveSimpleConfigV0) MaxLength() LengthV0 {
if a.RawMaxLength == nil {
panic("You must call WithDefaults on AdaptiveSimpleConfigV0 before .MaxLength")
}
return *a.RawMaxLength
}
func (a *AdaptiveSimpleConfigV0) SetMaxLength(val LengthV0) {
a.RawMaxLength = &val
}
func (a AdaptiveSimpleConfigV0) MaxTrials() int {
if a.RawMaxTrials == nil {
panic("You must call WithDefaults on AdaptiveSimpleConfigV0 before .MaxTrials")
}
return *a.RawMaxTrials
}
func (a *AdaptiveSimpleConfigV0) SetMaxTrials(val int) {
a.RawMaxTrials = &val
}
func (a AdaptiveSimpleConfigV0) Divisor() float64 {
if a.RawDivisor == nil {
panic("You must call WithDefaults on AdaptiveSimpleConfigV0 before .Divisor")
}
return *a.RawDivisor
}
func (a *AdaptiveSimpleConfigV0) SetDivisor(val float64) {
a.RawDivisor = &val
}
func (a AdaptiveSimpleConfigV0) Mode() AdaptiveMode {
if a.RawMode == nil {
panic("You must call WithDefaults on AdaptiveSimpleConfigV0 before .Mode")
}
return *a.RawMode
}
func (a *AdaptiveSimpleConfigV0) SetMode(val AdaptiveMode) {
a.RawMode = &val
}
func (a AdaptiveSimpleConfigV0) MaxRungs() int {
if a.RawMaxRungs == nil {
panic("You must call WithDefaults on AdaptiveSimpleConfigV0 before .MaxRungs")
}
return *a.RawMaxRungs
}
func (a *AdaptiveSimpleConfigV0) SetMaxRungs(val int) {
a.RawMaxRungs = &val
}
func (a AdaptiveSimpleConfigV0) ParsedSchema() interface{} {
return schemas.ParsedAdaptiveSimpleConfigV0()
}
func (a AdaptiveSimpleConfigV0) SanityValidator() *jsonschema.Schema {
return schemas.GetSanityValidator("http://determined.ai/schemas/expconf/v0/searcher-adaptive-simple.json")
}
func (a AdaptiveSimpleConfigV0) CompletenessValidator() *jsonschema.Schema {
return schemas.GetCompletenessValidator("http://determined.ai/schemas/expconf/v0/searcher-adaptive-simple.json")
}