Skip to content

Commit

Permalink
[Hot fix][Dataset] knowledge graph dataset statistics output (dmlc#1952)
Browse files Browse the repository at this point in the history
* Hot fix

* Fix

Co-authored-by: Ubuntu <[email protected]>
  • Loading branch information
classicsong and Ubuntu authored Aug 6, 2020
1 parent ba110e5 commit 7865101
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions python/dgl/data/knowledge_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ def process(self):
if self.verbose:
print("# entities: {}".format(num_nodes))
print("# relations: {}".format(num_rels))
print("# training edges: {}".format(len(train)))
print("# validation edges: {}".format(len(valid)))
print("# testing edges: {}".format(len(test)))
print("# training edges: {}".format(train.shape[0]))
print("# validation edges: {}".format(valid.shape[0]))
print("# testing edges: {}".format(test.shape[0]))

# for compatability
self._train = train
Expand Down Expand Up @@ -166,9 +166,9 @@ def load(self):
if self.verbose:
print("# entities: {}".format(self.num_nodes))
print("# relations: {}".format(self.num_rels))
print("# training edges: {}".format(len(train_idx)))
print("# validation edges: {}".format(len(valid_idx)))
print("# testing edges: {}".format(len(test_idx)))
print("# training edges: {}".format(train_idx.shape[0]))
print("# validation edges: {}".format(valid_idx.shape[0]))
print("# testing edges: {}".format(test_idx.shape[0]))

@property
def num_nodes(self):
Expand Down

0 comments on commit 7865101

Please sign in to comment.