issue5230 changed reference to function to anonymous function

This commit is contained in:
Leander Fiedler 2020-04-15 19:28:33 +02:00 committed by lfiedler
parent 6700006830
commit cef0c909b9

View File

@ -202,7 +202,7 @@ class Pipe(object):
serialize["cfg"] = lambda p: srsly.write_json(p, self.cfg)
serialize["vocab"] = lambda p: self.vocab.to_disk(p)
if self.model not in (None, True, False):
serialize["model"] = self.model.to_disk
serialize["model"] = lambda p: self.model.to_disk(p)
exclude = util.get_serialization_exclude(serialize, exclude, kwargs)
util.to_disk(path, serialize, exclude)