Accenture / AmpliGraph

Python library for Representation Learning on Knowledge Graphs https://docs.ampligraph.org
Apache License 2.0
2.16k stars 250 forks source link

Add ability to save large models in save_model #233

Closed adrijanik closed 3 years ago

adrijanik commented 3 years ago

Background and Context When large models are trained (their size exceeds 4GB) they may not be saved with save_model with pickle default protocol (<python 3.8) which is version 3 (details).

Description To save large models protocol in version 4 is needed (default in python 3.8+) can be specified with parameter protocol=pickle.HIGHEST_PROTOCOL or simply protocol=3.

Proposed change: Add protocol parameter to save_model function and set as default protocol=pickle.HIGHEST_PROTOCOL instead of protocol=pickle.DEFAULT_PROTOCOL as it is right now.

adrijanik commented 3 years ago

Fixed in commit 4f036dbb.