Skip to content

Commit

Permalink
pickle objects are now dumped with pickle.HIGHEST_PROTOCOL
Browse files Browse the repository at this point in the history
  • Loading branch information
PyWoody committed Jan 4, 2025
1 parent d5ba8fd commit 4255b41
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions deepface/modules/recognition.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def find(
# Ensure the proper pickle file exists
if not os.path.exists(datastore_path):
with open(datastore_path, "wb") as f:
pickle.dump([], f)
pickle.dump([], f, pickle.HIGHEST_PROTOCOL)

# Load the representations from the pickle file
with open(datastore_path, "rb") as f:
Expand Down Expand Up @@ -232,7 +232,7 @@ def find(

if must_save_pickle:
with open(datastore_path, "wb") as f:
pickle.dump(representations, f)
pickle.dump(representations, f, pickle.HIGHEST_PROTOCOL)
if not silent:
logger.info(f"There are now {len(representations)} representations in {file_name}")

Expand Down

0 comments on commit 4255b41

Please sign in to comment.