@@ -26,6 +26,8 @@ import (
26
26
// ExperimentSpec is the specification of an Experiment.
27
27
type ExperimentSpec struct {
28
28
// List of hyperparameter configurations.
29
+ // +listType=map
30
+ // +listMapKey=name
29
31
Parameters []ParameterSpec `json:"parameters,omitempty"`
30
32
31
33
// Describes the objective of the experiment.
@@ -78,30 +80,39 @@ type ExperimentStatus struct {
78
80
LastReconcileTime * metav1.Time `json:"lastReconcileTime,omitempty"`
79
81
80
82
// List of observed runtime conditions for this Experiment.
83
+ // +listType=map
84
+ // +listMapKey=type
81
85
Conditions []ExperimentCondition `json:"conditions,omitempty"`
82
86
83
87
// Current optimal trial parameters and observations.
84
88
CurrentOptimalTrial OptimalTrial `json:"currentOptimalTrial,omitempty"`
85
89
86
90
// List of trial names which are running.
91
+ // +listType=set
87
92
RunningTrialList []string `json:"runningTrialList,omitempty"`
88
93
89
94
// List of trial names which are pending.
95
+ // +listType=set
90
96
PendingTrialList []string `json:"pendingTrialList,omitempty"`
91
97
92
98
// List of trial names which have already failed.
99
+ // +listType=set
93
100
FailedTrialList []string `json:"failedTrialList,omitempty"`
94
101
95
102
// List of trial names which have already succeeded.
103
+ // +listType=set
96
104
SucceededTrialList []string `json:"succeededTrialList,omitempty"`
97
105
98
106
// List of trial names which have been killed.
107
+ // +listType=set
99
108
KilledTrialList []string `json:"killedTrialList,omitempty"`
100
109
101
110
// List of trial names which have been early stopped.
111
+ // +listType=set
102
112
EarlyStoppedTrialList []string `json:"earlyStoppedTrialList,omitempty"`
103
113
104
114
// List of trial names which have been metrics unavailable
115
+ // +listType=set
105
116
MetricsUnavailableTrialList []string `json:"metricsUnavailableTrialList,omitempty"`
106
117
107
118
// Trials is the total number of trials owned by the experiment.
@@ -134,6 +145,8 @@ type OptimalTrial struct {
134
145
// BestTrialName is the name of the best trial.
135
146
BestTrialName string `json:"bestTrialName,omitempty"`
136
147
// Key-value pairs for hyperparameters and assignment values.
148
+ // +listType=map
149
+ // +listMapKey=name
137
150
ParameterAssignments []common.ParameterAssignment `json:"parameterAssignments,omitempty"`
138
151
139
152
// Observation for this trial
@@ -207,8 +220,10 @@ const (
207
220
)
208
221
209
222
type FeasibleSpace struct {
210
- Max string `json:"max,omitempty"`
211
- Min string `json:"min,omitempty"`
223
+ Max string `json:"max,omitempty"`
224
+ Min string `json:"min,omitempty"`
225
+
226
+ // +listType=set
212
227
List []string `json:"list,omitempty"`
213
228
Step string `json:"step,omitempty"`
214
229
Distribution Distribution `json:"distribution,omitempty"`
@@ -233,6 +248,8 @@ type TrialTemplate struct {
233
248
TrialSource `json:",inline"`
234
249
235
250
// List of parameters that are used in trial template
251
+ // +listType=map
252
+ // +listMapKey=name
236
253
TrialParameters []TrialParameterSpec `json:"trialParameters,omitempty"`
237
254
238
255
// Labels that determines if pod needs to be injected by Katib sidecar container.
@@ -314,20 +331,30 @@ type ExperimentList struct {
314
331
// NasConfig contains config for NAS job
315
332
type NasConfig struct {
316
333
GraphConfig GraphConfig `json:"graphConfig,omitempty"`
317
- Operations []Operation `json:"operations,omitempty"`
334
+
335
+ // +listType=map
336
+ // +listMapKey=operationType
337
+ Operations []Operation `json:"operations,omitempty"`
318
338
}
319
339
320
340
// GraphConfig contains a config of DAG
321
341
type GraphConfig struct {
322
- NumLayers * int32 `json:"numLayers,omitempty"`
323
- InputSizes []int32 `json:"inputSizes,omitempty"`
342
+ NumLayers * int32 `json:"numLayers,omitempty"`
343
+
344
+ // +listType=set
345
+ InputSizes []int32 `json:"inputSizes,omitempty"`
346
+
347
+ // +listType=set
324
348
OutputSizes []int32 `json:"outputSizes,omitempty"`
325
349
}
326
350
327
351
// Operation contains type of operation in DAG
328
352
type Operation struct {
329
- OperationType string `json:"operationType,omitempty"`
330
- Parameters []ParameterSpec `json:"parameters,omitempty"`
353
+ OperationType string `json:"operationType,omitempty"`
354
+
355
+ // +listType=map
356
+ // +listMapKey=name
357
+ Parameters []ParameterSpec `json:"parameters,omitempty"`
331
358
}
332
359
333
360
func init () {
0 commit comments