Open afergadis opened 6 years ago
same issue here
I think inside class CallbackChain(Callback)
, you should change the function _set_model() into:
def set_model(self, *args, **kwargs):
for callback in self._callbacks:
callback.set_model(*args, **kwargs)
this allows the custom callback to access self.model
Hi @stelmath, thanks for the suggestion. Did that work for you?
Yes, works fine for me.
Running the
baseline.py
I get the error in the title. More precisely the log is the followingIndeed in line 137 of the
callbacks.py
there is an attempt to useself.model
but callPredictor
is never assigned a model in thetoken_evaluator
function, line 200.