Skip to content
This repository was archived by the owner on Apr 11, 2021. It is now read-only.
This repository was archived by the owner on Apr 11, 2021. It is now read-only.

_pickle.UnpicklingError: the STRING opcode argument must be quoted #23

Open
@PengTedShen

Description

@PengTedShen

Thank you for your great works and support.
Continue to do testing on "insurance_qa_eval.py", encountered error below:

Using Theano backend.
WARNING (theano.configdefaults): g++ not detected ! Theano will be unable to execute optimized C-implementations (for both CPU and GPU) and will default to Python implementations. Performance will be severely degraded. To remove this warning, set Theano flags cxx to an empty string.

C:\Users\Desktop\Deep_QA_System\data\insurance_qa_python\answers
(None, 1)
Traceback (most recent call last):
C:\Users\Desktop\Deep_QA_System\data\insurance_qa_python\train
File "C:/Users/PycharmProjects/insurance_qa_eval/insurance_qa_eval.py", line 272, in
best_loss = evaluator.train(model)
File "C:/Users/PycharmProjects/insurance_qa_eval/insurance_qa_eval.py", line 98, in train
training_set = self.load('train')
File "C:/Users/PycharmProjects/insurance_qa_eval/insurance_qa_eval.py", line 40, in load
return pickle.load(open(os.path.join(self.path, name), 'rb'))
_pickle.UnpicklingError: the STRING opcode argument must be quoted
Process finished with exit code 1

I suspect the error happened in load function
Line 36:
def load(self, name):
return pickle.load(open(os.path.join(self.path, name), 'rb'))

So I added print function to find the cause. It looks like for 'answers' it works and the data from answers can be printed out, but for 'train' , it failed.

For result on output of "(None, 1)", I do not know where it came from.

P.S. on your code line 245 : 'initial_embed_weights': np.load('models/word2vec_100_dim.h5'),
word2vec_100_dim.h5, do you mean "word2vec_100_dim.embeddings" which on github ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions