MCPcopy Create free account
hub / github.com/dmlc/dgl / GetPartShapeResponse

Class GetPartShapeResponse

python/dgl/distributed/kvstore.py:446–466  ·  view source on GitHub ↗

Send the partitioned data shape back to client. Parameters ---------- shape : tuple shape of tensor

Source from the content-addressed store, hash-verified

444
445
446class GetPartShapeResponse(rpc.Response):
447 """Send the partitioned data shape back to client.
448
449 Parameters
450 ----------
451 shape : tuple
452 shape of tensor
453 """
454
455 def __init__(self, shape):
456 self.shape = shape
457
458 def __getstate__(self):
459 return self.shape
460
461 def __setstate__(self, state):
462 # When the shape has only one dimension, state is an integer.
463 if isinstance(state, int):
464 self.shape = (state,)
465 else:
466 self.shape = state
467
468
469class GetPartShapeRequest(rpc.Request):

Callers 1

process_requestMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected