AICoE / prometheus-anomaly-detector

A newer more updated version of the prometheus anomaly detector (https://github.com/AICoE/prometheus-anomaly-detector-legacy)
GNU General Public License v3.0
597 stars 151 forks source link

can't pickle _thread.lock objects #122

Closed ankit864 closed 4 years ago

ankit864 commented 4 years ago

issue is happening when queue (multiprocessing.queue) is being used for train model function

below is error

ForkingPickler(file, protocol).dump(obj) TypeError: can't pickle _thread.lock objects

yeswanthkaali commented 4 years ago

Change the python version to higher or lower it worked for me.https://lists.gt.net/python/bugs/1299839

ankit864 commented 4 years ago

thanks @yeswanthkaali , I had this python issue in my knowledge as i was trying to troubleshoot, but I was running on macos with python 3.7 it was throwing bad file descriptor error while accessing queue.

so for workaround i used normal Queue instead of python MP queue but with thread not as multiporcess because normal queue cant be shared between process

But in ubuntu with python37 it is running fine.