jina icon indicating copy to clipboard operation
jina copied to clipboard

ABOUT 'JinaLogger.__init__.<locals>.<lambda>'

Open Zhiyuan-Fan opened this issue 2 years ago • 3 comments

when i use pickle to dump tfidfvectorizer, it throws AttributeError: Can't pickle local object JinaLogger init "locals""lambda"

Zhiyuan-Fan avatar Sep 06 '22 01:09 Zhiyuan-Fan

Hello @Elvisambition ,

Where can I see the code of this TFIDFVectorizer?

JoanFM avatar Sep 06 '22 06:09 JoanFM

You can always define the methods:

     def __getstate__(self):

     def __setstate__(self, d):

to avoid pickling unpickable objects and to recreate them after unpickling

JoanFM avatar Sep 06 '22 06:09 JoanFM

Hello @Elvisambition ,

Is this still an issue?

JoanFM avatar Sep 20 '22 15:09 JoanFM

I will close for now, if you encounter the problem again, please reopen with more details

JoanFM avatar Oct 04 '22 07:10 JoanFM