-
Notifications
You must be signed in to change notification settings - Fork 315
Unable to set prepickle to False on using Redis storage layer in LSH #273
Copy link
Copy link
Closed
Description
This (potential) bug was discovered while working on writing integration tests for the Redis storage.
On using the Redis storage, setting prepickle to False seems to have no real effect. Based on the documentation, a default value should be chosen based on the storage_config only if prepickle is not specified, not if it is falsy.
A reproduction is as below:
dict_config = {'type': 'dict'}
lsh_dict = MinHashLSH(threshold=0.5, num_perm=16, storage_config=dict_config, prepickle=False)
print(f"Dict storage with prepickle=False: lsh.prepickle = {lsh_dict.prepickle}") # prints: False
redis_config = {'type': 'redis', 'redis': {'host': '127.0.0.1', 'port': 6379}}
lsh_redis = MinHashLSH(threshold=0.5, num_perm=16, storage_config=redis_config, prepickle=False)
print(f"Redis storage with prepickle=False: lsh.prepickle = {lsh_redis.prepickle}") # prints: TrueIf this is intended behaviour, the documentation should perhaps be updated accordingly.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels