-
Notifications
You must be signed in to change notification settings - Fork 347
/
zgen_checkpoint_storage_config_v0.go
73 lines (60 loc) · 1.98 KB
/
zgen_checkpoint_storage_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
// 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 (c CheckpointStorageConfigV0) SaveExperimentBest() int {
if c.RawSaveExperimentBest == nil {
panic("You must call WithDefaults on CheckpointStorageConfigV0 before .SaveExperimentBest")
}
return *c.RawSaveExperimentBest
}
func (c *CheckpointStorageConfigV0) SetSaveExperimentBest(val int) {
c.RawSaveExperimentBest = &val
}
func (c CheckpointStorageConfigV0) SaveTrialBest() int {
if c.RawSaveTrialBest == nil {
panic("You must call WithDefaults on CheckpointStorageConfigV0 before .SaveTrialBest")
}
return *c.RawSaveTrialBest
}
func (c *CheckpointStorageConfigV0) SetSaveTrialBest(val int) {
c.RawSaveTrialBest = &val
}
func (c CheckpointStorageConfigV0) SaveTrialLatest() int {
if c.RawSaveTrialLatest == nil {
panic("You must call WithDefaults on CheckpointStorageConfigV0 before .SaveTrialLatest")
}
return *c.RawSaveTrialLatest
}
func (c *CheckpointStorageConfigV0) SetSaveTrialLatest(val int) {
c.RawSaveTrialLatest = &val
}
func (c CheckpointStorageConfigV0) GetUnionMember() interface{} {
if c.RawSharedFSConfig != nil {
return *c.RawSharedFSConfig
}
if c.RawS3Config != nil {
return *c.RawS3Config
}
if c.RawGCSConfig != nil {
return *c.RawGCSConfig
}
if c.RawAzureConfig != nil {
return *c.RawAzureConfig
}
if c.RawDirectoryConfig != nil {
return *c.RawDirectoryConfig
}
panic("no union member defined")
}
func (c CheckpointStorageConfigV0) ParsedSchema() interface{} {
return schemas.ParsedCheckpointStorageConfigV0()
}
func (c CheckpointStorageConfigV0) SanityValidator() *jsonschema.Schema {
return schemas.GetSanityValidator("http://determined.ai/schemas/expconf/v0/checkpoint-storage.json")
}
func (c CheckpointStorageConfigV0) CompletenessValidator() *jsonschema.Schema {
return schemas.GetCompletenessValidator("http://determined.ai/schemas/expconf/v0/checkpoint-storage.json")
}