mirror of
https://github.com/serengil/deepface.git
synced 2025-06-05 19:15:23 +00:00
pickle objects are now dumped with pickle.HIGHEST_PROTOCOL
This commit is contained in:
parent
d5ba8fda09
commit
4255b4167f
@ -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:
|
||||
@ -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}")
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user