MCPcopy Create free account
hub / github.com/pytorch/pytorch / set

Method set

test/distributed/test_store.py:457–462  ·  view source on GitHub ↗
(self, key, value)

Source from the content-addressed store, hash-verified

455 self.store = {}
456
457 def set(self, key, value):
458 if not isinstance(key, (str, bytes)):
459 raise AssertionError("Expected set to be called with string key")
460 if type(value) is not bytes:
461 raise AssertionError("Expected set to be called with bytes value")
462 self.store[key] = value
463
464 def get(self, key):
465 value = self.store.get(key, b"")

Callers 15

addMethod · 0.95
simple_fillFunction · 0.45
cuda_multiply_twoFunction · 0.45
autograd_sharingFunction · 0.45
test_receiveMethod · 0.45
test_cuda_send_manyMethod · 0.45
_test_proper_exitFunction · 0.45
test_proper_exitMethod · 0.45

Calls 1

isinstanceFunction · 0.85

Tested by

no test coverage detected