Skip to content

Commit

Permalink
Pickle use now default protocol
Browse files Browse the repository at this point in the history
- fixes incompatibility between pickle and zipfile in python 3.8
- uses protocol 4
  • Loading branch information
boris-il-forte committed Apr 27, 2020
1 parent 48f1f4d commit 3cc4f50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mushroom_rl/core/serialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def _load_mushroom(zip_file, name):
def _save_pickle(zip_file, name, obj, folder, **_):
path = Serializable._append_folder(folder, name)
with zip_file.open(path, 'w') as f:
pickle.dump(obj, f, protocol=pickle.HIGHEST_PROTOCOL)
pickle.dump(obj, f, protocol=pickle.DEFAULT_PROTOCOL)

@staticmethod
def _save_numpy(zip_file, name, obj, folder, **_):
Expand Down

0 comments on commit 3cc4f50

Please sign in to comment.