Skip to content
This repository has been archived by the owner on Jan 7, 2025. It is now read-only.

PicklingError due to recent Caffe update #2024

Open
Noiredd opened this issue Apr 18, 2018 · 6 comments
Open

PicklingError due to recent Caffe update #2024

Noiredd opened this issue Apr 18, 2018 · 6 comments

Comments

@Noiredd
Copy link
Contributor

Noiredd commented Apr 18, 2018

BVLC/caffe#6219 fixed some pickling bug that occurred due to the namespace caffe_pb2 was in. That fix however causes the following error when loading DIGITS:

Caught PicklingError while saving job 20171212-140813-6b62: Can't pickle <class 'caffe.proto.caffe_pb2.NetParameter'>: it's not the same object as caffe.proto.caffe_pb2.NetParameter

Consequently, none of the existing models can load successfully. Is it possible for DIGITS to handle this exception and fix the jobs on-the-fly during loading?

Correction: I double checked and existing models seem to load and be okay. Any new ones however, fail to save!

To reproduce, create a job using a Caffe backend, shut down the server, update and recompile Caffe, then restart DIGITS and try to clone a job. It will appear in the models list, but will fail to save (there will be no status.pickle).

@uhfband
Copy link

uhfband commented Apr 22, 2018

BTW, this bug has a long story #306
Here is a patch that fixes loading of saved jobs uhfband@59faee3
It's not perfect, but it works for me.

@Songyima
Copy link

I have the same problem :( and try import PYTHONPATH but did NOT work

@ZhangJinLearning
Copy link

uhfband@59faee3#diff-0d1ba4e35115631664436b13944953fd
This one worked for me.
Replace all the 'import caffe_pb2' with 'import caffe.proto.caffe_pb2 as caffe_pb2'.

@hackcat
Copy link

hackcat commented Oct 10, 2018

@uhfband The replace works for me, thanks a lot!

@vxgu86
Copy link

vxgu86 commented Sep 4, 2019

not work for me!!!
did this problem fixed?
I installed DIGITS from source

@bwery
Copy link

bwery commented Apr 21, 2020

I also encountered this problem.
The patch by uhfband seems to solve it properly.
Thank you uhfband !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants