in aepsych/server.py [0:0]
def get_strats_from_replay(self, uuid_of_replay=None, force_replay=False):
if uuid_of_replay is None:
records = self.db.get_master_records()
if len(records) > 0:
uuid_of_replay = records[-1].experiment_id
else:
raise RuntimeError("Server has no experiment records!")
if force_replay:
warnings.warn(
"Force-replaying to get non-final strats is deprecated after the ability"
+ " to save all strats was added, and will eventually be removed.",
DeprecationWarning,
)
self.replay(uuid_of_replay, skip_computations=True)
for strat in self._strats:
if strat.has_model:
strat.modelbridge.fit(strat.x, strat.y)
return self._strats
else:
strat_buffers = self.db.get_strats_for(uuid_of_replay)
return [self._unpack_strat_buffer(sb) for sb in strat_buffers]