(
self,
server_id,
ip_config,
num_servers,
num_clients,
part_config,
disable_shared_mem=False,
graph_format=("csc", "coo"),
use_graphbolt=False,
)
| 515 | """ |
| 516 | |
| 517 | def __init__( |
| 518 | self, |
| 519 | server_id, |
| 520 | ip_config, |
| 521 | num_servers, |
| 522 | num_clients, |
| 523 | part_config, |
| 524 | disable_shared_mem=False, |
| 525 | graph_format=("csc", "coo"), |
| 526 | use_graphbolt=False, |
| 527 | ): |
| 528 | super(DistGraphServer, self).__init__( |
| 529 | server_id=server_id, |
| 530 | ip_config=ip_config, |
| 531 | num_servers=num_servers, |
| 532 | num_clients=num_clients, |
| 533 | ) |
| 534 | self.ip_config = ip_config |
| 535 | self.num_servers = num_servers |
| 536 | self.use_graphbolt = use_graphbolt |
| 537 | # Load graph partition data. |
| 538 | if self.is_backup_server(): |
| 539 | # The backup server doesn't load the graph partition. It'll initialized afterwards. |
| 540 | self.gpb, graph_name, ntypes, etypes = load_partition_book( |
| 541 | part_config, self.part_id |
| 542 | ) |
| 543 | self.client_g = None |
| 544 | else: |
| 545 | # Loading of node/edge_feats are deferred to lower the peak memory consumption. |
| 546 | ( |
| 547 | self.client_g, |
| 548 | _, |
| 549 | _, |
| 550 | self.gpb, |
| 551 | graph_name, |
| 552 | ntypes, |
| 553 | etypes, |
| 554 | ) = load_partition( |
| 555 | part_config, |
| 556 | self.part_id, |
| 557 | load_feats=False, |
| 558 | use_graphbolt=use_graphbolt, |
| 559 | ) |
| 560 | print("load " + graph_name) |
| 561 | self.client_g = _format_partition(self.client_g, graph_format) |
| 562 | if not disable_shared_mem: |
| 563 | self.client_g = _copy_graph_to_shared_mem( |
| 564 | self.client_g, graph_name, graph_format, use_graphbolt |
| 565 | ) |
| 566 | |
| 567 | if not disable_shared_mem: |
| 568 | self.gpb.shared_memory(graph_name) |
| 569 | assert self.gpb.partid == self.part_id |
| 570 | for ntype in ntypes: |
| 571 | node_name = HeteroDataName(True, ntype, "") |
| 572 | self.add_part_policy( |
| 573 | PartitionPolicy(node_name.policy_str, self.gpb) |
| 574 | ) |
nothing calls this directly
no test coverage detected