MCPcopy Create free account
hub / github.com/Tencent/embedx / Init

Method Init

src/tools/graph/average_feature_main.cc:78–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76 ~AverageFeatureMain() override = default;
77
78 bool Init() override {
79 if (FLAGS_dist) {
80 graph_config_.set_ip_ports(FLAGS_gs_addrs);
81 } else {
82 graph_config_.set_node_graph(FLAGS_node_graph);
83 graph_config_.set_node_feature(FLAGS_node_feature);
84 graph_config_.set_node_config(FLAGS_node_config);
85 graph_config_.set_thread_num(FLAGS_gs_thread_num);
86 }
87
88 graph_client_ = NewGraphClient(graph_config_, (GraphClientEnum)FLAGS_dist);
89 // if (!graph_client_->Init(config_)) {
90 if (!graph_client_) {
91 return false;
92 }
93
94 // used by RunEntry
95 batch_node_ = FLAGS_batch_node;
96 count_ = FLAGS_sample_num;
97 entry_flag_ = FLAGS_dist ? "Worker" : "Thread";
98 return true;
99 }
100
101 private:
102 const char* task_name() const noexcept override { return "AverageFeature"; }

Callers 1

mainFunction · 0.45

Calls 6

NewGraphClientFunction · 0.85
set_ip_portsMethod · 0.80
set_node_graphMethod · 0.80
set_node_featureMethod · 0.80
set_node_configMethod · 0.45
set_thread_numMethod · 0.45

Tested by

no test coverage detected