MCPcopy Create free account
hub / github.com/alibaba/graph-learn / init_client_module

Function init_client_module

graphlearn/python/c/py_client.cc:35–599  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33} // anonymous namespace
34
35void init_client_module(py::module& m) {
36 // Request
37 py::class_<OpRequest>(m, "OpRequest").def(py::init<>());
38 py::class_<OpResponse>(m, "OpResponse").def(py::init<>());
39 DEF_REQ(GetNodesRequest);
40 DEF_REQ(GetEdgesRequest);
41 DEF_REQ(LookupNodesRequest);
42 DEF_REQ(LookupEdgesRequest);
43 DEF_REQ(SamplingRequest);
44 DEF_REQ(ConditionalSamplingRequest);
45 DEF_REQ(AggregatingRequest);
46 DEF_REQ(SubGraphRequest);
47 DEF_REQ(GetStatsRequest);
48 DEF_REQ(GetDegreeRequest);
49
50 DEF_RES(GetNodesResponse);
51 DEF_RES(GetEdgesResponse);
52 DEF_RES(LookupNodesResponse);
53 DEF_RES(LookupEdgesResponse);
54 DEF_RES(SamplingResponse);
55 DEF_RES(AggregatingResponse);
56 DEF_RES(SubGraphResponse);
57 DEF_RES(GetStatsResponse);
58 DEF_RES(GetDegreeResponse);
59
60 // Client
61 py::class_<Client>(m, "Client")
62 .def("stop", &Client::Stop)
63 .def("get_nodes",
64 CALL_FUNC(GetNodes),
65 py::arg("request"),
66 py::arg("response"))
67 .def("get_edges",
68 CALL_FUNC(GetEdges),
69 py::arg("request"),
70 py::arg("response"))
71 .def("lookup_nodes",
72 CALL_FUNC(LookupNodes),
73 py::arg("request"),
74 py::arg("response"))
75 .def("lookup_edges",
76 CALL_FUNC(LookupEdges),
77 py::arg("request"),
78 py::arg("response"))
79 .def("sample_neighbor",
80 CALL_FUNC(Sampling),
81 py::arg("request"),
82 py::arg("response"))
83 .def("agg_nodes",
84 CALL_FUNC(Aggregating),
85 py::arg("request"),
86 py::arg("response"))
87 .def("sample_subgraph",
88 CALL_FUNC(SubGraph),
89 py::arg("request"),
90 py::arg("response"))
91 .def("get_stats",
92 CALL_FUNC(GetStats),

Callers 1

PYBIND11_MODULEFunction · 0.85

Calls 15

get_node_idsFunction · 0.85
set_lookup_nodes_requestFunction · 0.85
get_node_weightsFunction · 0.85
get_node_labelsFunction · 0.85
get_node_int_attributesFunction · 0.85
get_edge_idFunction · 0.85
set_lookup_edges_requestFunction · 0.85
get_edge_weightsFunction · 0.85
get_edge_labelsFunction · 0.85
get_edge_int_attributesFunction · 0.85

Tested by

no test coverage detected