diff --git a/inference/models/owlv2/owlv2.py b/inference/models/owlv2/owlv2.py index 407d109d99..e15db0cd8b 100644 --- a/inference/models/owlv2/owlv2.py +++ b/inference/models/owlv2/owlv2.py @@ -359,14 +359,14 @@ def image_hash(self) -> Hash: def hash_wrapped_training_data(wrapped_training_data: List[Dict[str, Any]]) -> Hash: just_hash_relevant_data = [ - [ + ( d["image"].image_hash, d["boxes"], - ] + ) for d in wrapped_training_data ] # we dump to pickle to serialize the data as a single object - return hash_function(pickle.dumps(just_hash_relevant_data)) + return hash_function(pickle.dumps(just_hash_relevant_data, protocol=4)) class OwlV2(RoboflowInferenceModel):