@@ -63,6 +63,7 @@ def __init__(
63
63
)
64
64
evaluations = [] if evaluations is None else evaluations
65
65
self ._index = index
66
+ self ._gen_id = None
66
67
self ._custom_parameters = (
67
68
[] if custom_parameters is None else custom_parameters
68
69
)
@@ -87,14 +88,14 @@ def to_dict(self) -> Dict:
87
88
** self .objectives_as_dict (),
88
89
** self .analyzed_parameters_as_dict (),
89
90
** self .custom_parameters_as_dict (),
90
- "_id" : self ._index ,
91
+ "_id" : self ._gen_id ,
91
92
"_ignored" : self ._ignored ,
92
93
"_ignored_reason" : self ._ignored_reason ,
93
94
"_status" : self ._status ,
94
95
}
95
96
96
- if hasattr (self , "_ax_trial_id " ):
97
- trial_dict ["ax_trial_id " ] = self .ax_trial_id
97
+ if hasattr (self , "_gen_id " ):
98
+ trial_dict ["gen_id " ] = self .gen_id
98
99
99
100
return trial_dict
100
101
@@ -141,9 +142,7 @@ def from_dict(
141
142
custom_parameters = custom_parameters ,
142
143
)
143
144
if "_id" in trial_dict :
144
- trial ._index = trial_dict ["_id" ]
145
- if "ax_trial_id" in trial_dict :
146
- trial ._ax_trial_id = trial_dict ["ax_trial_id" ]
145
+ trial ._gen_id = trial_dict ["_id" ]
147
146
if "_ignored" in trial_dict :
148
147
trial ._ignored = trial_dict ["_ignored" ]
149
148
if "_ignored_reason" in trial_dict :
@@ -204,13 +203,13 @@ def index(self, value):
204
203
self ._index = value
205
204
206
205
@property
207
- def ax_trial_id (self ) -> int :
206
+ def gen_id (self ) -> int :
208
207
"""Get the index of the trial."""
209
- return self ._ax_trial_id
208
+ return self ._gen_id
210
209
211
- @ax_trial_id .setter
212
- def ax_trial_id (self , value ):
213
- self ._ax_trial_id = value
210
+ @gen_id .setter
211
+ def gen_id (self , value ):
212
+ self ._gen_id = value
214
213
215
214
@property
216
215
def ignored (self ) -> bool :
0 commit comments