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

Method get

test/distributed/test_store.py:464–468  ·  view source on GitHub ↗
(self, key)

Source from the content-addressed store, hash-verified

462 self.store[key] = value
463
464 def get(self, key):
465 value = self.store.get(key, b"")
466 if type(value) is not bytes:
467 raise AssertionError("Expected get to return bytes value")
468 return value
469
470 def add(self, key, value):
471 new = int(self.store.get(key, 0)) + value

Callers 15

test_common_errorsMethod · 0.45
_test_store_timeoutMethod · 0.45
_test_set_get_checkMethod · 0.45
_test_compare_setMethod · 0.45
_test_appendMethod · 0.45
_test_multi_setMethod · 0.45
_test_numkeys_delkeysMethod · 0.45
_create_clientMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected