泡菜和numpy版本
我有一些我无法重新训练的旧型号。他们很久以前就被腌制了。我可以使用Python 3.6和Numpy 1.14打开它们。但是,当我尝试使用numpy 1.18移动到Python 3.8时,我会在加载它们时得到一个segfault。
我尝试用Python 3.6的协议4倾倒它们,这无济于事。
储蓄:
with open('model.pkl', 'wb') as fid:
pickle.dump(model, fid, protocol=4)
加载:
model = pickle.load(open('model.pkl', "rb"))
在这种情况下我可以做什么?
I have some old sklearn models which I can't retrain. They were pickled long time ago with unclear versions. I can open them with Python 3.6 and Numpy 1.14. But when I try to move to Python 3.8 with Numpy 1.18, I get a segfault on loading them.
I tried dumping them with protocol 4 from Python 3.6, it didn't help.
Saving:
with open('model.pkl', 'wb') as fid:
pickle.dump(model, fid, protocol=4)
Loading:
model = pickle.load(open('model.pkl', "rb"))
Is there anything I can do in such situation?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对我有用的是什么(特定于任务,但也许会帮助某人):
旧依赖性:
较新的依赖性:
What worked for me (very task-specific but maybe will help someone):
Old dependencies:
Newer dependencies: