maartensap / riveter-nlp

Package to extract connotation frames
GNU General Public License v3.0
78 stars 8 forks source link

Python Code to Save Trained Model? #9

Open cristinkers opened 1 week ago

cristinkers commented 1 week ago

Hi! I am trying to save a trained riveter model in Python, I see the code do this in Google Colab but am having issues saving with Python. I run the following code: riveter.save('/Users/cristinazito/Desktop/riveter code/riveter-nlp/riveter/data/riveter.power5.pkl')

And receive this error:

`Traceback (most recent call last): File "", line 1, in File "/Users/cristinazito/Desktop/riveter code/riveter-nlp/riveter/riveter.py", line 93, in save pickle.dump(self, file, pickle.HIGHEST_PROTOCOL) _pickle.PicklingError: Can't pickle <class 'riveter.riveter.Riveter'>: import of module 'riveter.riveter' failed

") File "", line 1 ") ^ SyntaxError: EOL while scanning string literal `

Seems to be a picking issue since the pickle.dump() function fails. Can you please advise?

maria-antoniak commented 3 days ago

Hi! Are you having this issue in the Colab notebook or on your local machine?