Unverified Commit db07433c authored by Roger Wang's avatar Roger Wang Committed by GitHub
Browse files

[Misc] Skip hashing kwargs if value is `None` (#32025)


Signed-off-by: default avatarRoger Wang <hey@rogerw.io>
parent e02706d2
......@@ -98,6 +98,9 @@ class MultiModalHasher:
key: str,
obj: object,
) -> Iterable[bytes | memoryview]:
if obj is None:
yield key.encode("utf-8")
return
# Recursive cases
if isinstance(obj, (list, tuple)):
for i, elem in enumerate(obj):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment