python pickle dump large code example
Example: handling large pickle files pickletools
import picklefilepath = "random_forest.pkl"with open(filepath, 'wb') as f: p = pickle.Pickler(f) p.fast = True p.dump(clf)with open(filepath, 'rb') as f: p = pickle.Unpickler(f) clf = p.load()