Closed
Description
Hey!
I was running the model (on Python 3.7.3) with around 200 megabytes of data. After 11 hours and 10 epochs of training, I got the following message:
rval = inputs[0].__getitem__(inputs[1:])
Total number of training labels: 9985024
Total number of validation labels: 1248128
Validation perplexity is 1.1226
Traceback (most recent call last):
File "main.py", line 210, in <module>
net.save(model_file_name, gsums=gsums, learning_rate=learning_rate, validation_ppl_history=validation_ppl_history, best_validation_ppl=best_ppl, epoch=epoch, random_state=rng.get_state())
File "/home/Projects/punctuator2-master/models.py", line 252, in save
cPickle.dump(state, f, protocol=cPickle.HIGHEST_PROTOCOL)
AttributeError: module '_pickle' has no attribute 'HIGHEST_PROTOCOL'
Then I decided to see what the next step would give me and I got:
cat terrafoldernormallt/unurlnorm.dev.txt | python punctuator.py Model_models.py_h256_lr0.02.pcl model_output.pcl
Loading model parameters...
Traceback (most recent call last):
File "punctuator.py", line 149, in <module>
net, _ = models.load(model_file, 1, x)
File "/home/Projects/punctuator2-master/models.py", line 63, in load
state = cPickle.load(f, **cpickle_options)
EOFError: Ran out of input
Any help would be greatly appreciated, thanks!
Metadata
Metadata
Assignees
Labels
No labels
Activity
AASHISHAG commentedon Apr 9, 2020
@helga-lvl : How did you solve this issue? I'm also getting the same issue?
AttributeError: module '_pickle' has no attribute 'HIGHEST_PROTOCOL'
vjosapreniqi commentedon Jul 13, 2020
I have encountered the same exact problem, I was also running the model on Python 3.7. @ottokart Do you have any clue about this error?
@helga-lvl if you have already solved this problem, can you guide us on how you did it?
#53 fix - cPickle.HIGHEST_PROTOCOL incompatible with Python3
ottokart commentedon Jul 17, 2020
Punctuator2 was originally implemented in Python 2.7. Python3 no longer has the attribute HIGHEST_PROTOCOL so I removed it in the latest pushed commit: 8edec70