@@ -223,7 +223,7 @@ def __init__(
223
223
self .current_trial = None
224
224
self .gr_lofi = None
225
225
self ._experiment = self ._create_experiment ()
226
-
226
+
227
227
# Internal mapping: _id -> (arm_name, ax_trial_id, trial_type)
228
228
self ._id_mapping = {}
229
229
self ._next_id = 0
@@ -275,7 +275,7 @@ def suggest(self, num_points: Optional[int]) -> List[dict]:
275
275
self ._id_mapping [current_id ] = {
276
276
"arm_name" : arm .name ,
277
277
"ax_trial_id" : trial_index ,
278
- "trial_type" : trial_type
278
+ "trial_type" : trial_type ,
279
279
}
280
280
point ["_id" ] = current_id
281
281
point ["trial_type" ] = trial_type # Keep trial_type for now
@@ -296,15 +296,15 @@ def ingest(self, results: List[dict]) -> None:
296
296
custom_parameters = self ._custom_trial_parameters ,
297
297
)
298
298
trials .append (trial )
299
-
299
+
300
300
# Apply _id mapping to all trials before processing
301
301
for trial in trials :
302
302
if trial .gen_id is not None and trial .gen_id in self ._id_mapping :
303
303
mapping = self ._id_mapping [trial .gen_id ]
304
304
trial .arm_name = mapping ["arm_name" ]
305
305
trial .ax_trial_id = mapping ["ax_trial_id" ]
306
306
# trial_type should already be in trial from custom_parameters
307
-
307
+
308
308
if self .gen_state == NOT_STARTED :
309
309
self ._incorporate_external_data (trials )
310
310
else :
0 commit comments