We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 995b88b commit cf18c38Copy full SHA for cf18c38
tensorboard/util/grpc_util_test.py
@@ -129,8 +129,8 @@ def handler(request, context):
129
130
def test_call_with_retries_includes_version_metadata(self):
131
def digest(s):
132
- """Hashes a string into a 32-bit integer."""
133
- return int(hashlib.sha256(s.encode("utf-8")).hexdigest(), 16) & 0xffffffff
+ """Hashes a string into a positive 32-bit signed integer."""
+ return int(hashlib.sha256(s.encode("utf-8")).hexdigest(), 16) & 0x7fffffff
134
def handler(request, context):
135
metadata = context.invocation_metadata()
136
client_version = grpc_util.extract_version(metadata)
0 commit comments