Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
Liwb5 committed Nov 17, 2021
1 parent 06847bc commit 2480bd7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion paddle/fluid/distributed/table/common_graph_table.cc
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@ int32_t GraphTable::load_nodes(const std::string &path, std::string node_type) {
std::ifstream file(path);
std::string line;
while (std::getline(file, line)) {
count++;
auto values = paddle::string::split_string<std::string>(line, "\t");
if (values.size() < 2) continue;
auto id = std::stoull(values[1]);
Expand All @@ -207,7 +206,9 @@ int32_t GraphTable::load_nodes(const std::string &path, std::string node_type) {

if (count % 1000000 == 0) {
VLOG(0) << count << " nodes are loaded from filepath";
VLOG(0) << line;
}
count++;

std::string nt = values[0];
if (nt != node_type) {
Expand Down Expand Up @@ -273,6 +274,7 @@ int32_t GraphTable::load_edges(const std::string &path, bool reverse_edge) {
}
if (count % 1000000 == 0) {
VLOG(0) << count << " edges are loaded from filepath";
VLOG(0) << line;
}

size_t index = src_shard_id - shard_start;
Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/distributed/test/graph_node_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ void RunBrpcPushSparse() {
res = client1.batch_sample_neighbors(std::string("user2item"), node_ids, 4,
true, false);

ASSERT_EQ(res.first[0].size(), 2);
ASSERT_EQ(res.first[1].size(), 1);
std::vector<uint64_t> nodes_ids = client2.random_sample_nodes("user", 0, 6);
ASSERT_EQ(nodes_ids.size(), 2);
ASSERT_EQ(true, (nodes_ids[0] == 59 && nodes_ids[1] == 37) ||
Expand Down

1 comment on commit 2480bd7

@paddle-bot-old
Copy link

@paddle-bot-old paddle-bot-old bot commented on 2480bd7 Nov 18, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🕵️ CI failures summary

🔍 PR: #37289 Commit ID: 2480bd7 contains failed CI.

🔹 Failed: PR-CI-Kunlun

Unknown Failed
2021-11-18 09:09:28 [INFO] Running on (Kunlun-2) with agent(v1.2.7) in workspace /home/xly/workspace/7c8c22dd-631d-4cc8-8114-0c908113ef8f
2021-11-18 09:09:28 + set +x
2021-11-18 09:09:28 Cleanup...
2021-11-18 09:09:38 + '[' -d /home/ssd1/Paddle ']'
2021-11-18 09:09:38 + rm -rf /home/ssd1/Paddle
2021-11-18 09:09:42 rm: 无法删除"/home/ssd1/Paddle/build/paddle/fluid/operators": 目录非空

Please sign in to comment.