def train_online(self, *args, **kwargs): results = super().train_online(*args, **kwargs) if results is not None: results = save_weights_to_buffer(results) return results
def __init__(self, model): buf = save_weights_to_buffer(model) self.cls, self.args, state = list(model.__reduce__()) self.state = ray.put(buf)
def train(self, *args, **kwargs): results = super().train(*args, **kwargs) if results is not None: model, *stats = results results = (save_weights_to_buffer(model), *stats) return results
def __init__(self, model: ECD): buf = save_weights_to_buffer(model) self.cls = type(model) self.args = model.get_args() self.state = ray.put(buf)