def _get_callback(**params): wrapper_params = params.pop("_wrapper", None) callback = CALLBACKS.get_from_params(**params) if wrapper_params is not None: wrapper_params["base_callback"] = callback return ConfigExperiment._get_callback(**wrapper_params) return callback
def get_callbacks(self, stage: str) -> "List[Callback]": callbacks_params = (self.stages_config[stage].get( "callbacks_params", {})) callbacks = [] for key, callback_params in callbacks_params.items(): callback = CALLBACKS.get_from_params(**callback_params) callbacks.append(callback) return callbacks
def get_callbacks(self, stage: str) -> "OrderedDict[Callback]": callbacks_params = (self.stages_config[stage].get( "callbacks_params", {})) callbacks = OrderedDict() for key, callback_params in callbacks_params.items(): callback = CALLBACKS.get_from_params(**callback_params) callbacks[key] = callback return callbacks