Turi Create  4.0
turi::lambda::pysgraph_synchronize Class Reference

#include <core/system/lambda/graph_pylambda.hpp>

Public Member Functions

void load_vertex_partition (size_t partition_id, std::vector< sgraph_vertex_data > &vertices)
 
void update_vertex_partition (vertex_partition_exchange &vpartition_exchange)
 
vertex_partition_exchange get_vertex_partition_exchange (size_t partition_id, const std::unordered_set< size_t > &vertex_ids, const std::vector< size_t > &field_ids)
 

Detailed Description

Implements sgraph synchronizing interface for graph pylambda worker.

In the pylambda environment, vertex data are stored locally as python dictionary object. This class provides the following synchronization functionality: 1) Load a python object vertex partition given the flexible_type vertex partition. 2) Update the python object vertex partition given a vertex_partition_exchange. 3) Create a vertex_partition_exchange object from the stored python object vertex partition.

Definition at line 27 of file graph_pylambda.hpp.

Member Function Documentation

◆ get_vertex_partition_exchange()

vertex_partition_exchange turi::lambda::pysgraph_synchronize::get_vertex_partition_exchange ( size_t  partition_id,
const std::unordered_set< size_t > &  vertex_ids,
const std::vector< size_t > &  field_ids 
)
virtual

Create a vertex_partition_exchange object from the stored python object vertex partition.

Implements turi::sgraph_compute::sgraph_synchronize_interface.

◆ load_vertex_partition()

void turi::lambda::pysgraph_synchronize::load_vertex_partition ( size_t  partition_id,
std::vector< sgraph_vertex_data > &  vertices 
)
virtual

Load a python object vertex partition given the flexible_type vertex partition.

Implements turi::sgraph_compute::sgraph_synchronize_interface.

◆ update_vertex_partition()

void turi::lambda::pysgraph_synchronize::update_vertex_partition ( vertex_partition_exchange vpartition_exchange)
virtual

Update the python object vertex partition given a vertex_partition_exchange.

Implements turi::sgraph_compute::sgraph_synchronize_interface.


The documentation for this class was generated from the following file: