def test_empty(self): self.assertEqual( group_by_relation_type( torch.empty((0, ), dtype=torch.long), EntityList.empty(), EntityList.empty(), ), [], )
def test_empty(self): self.assertEqual( EdgeList.empty(), EdgeList( EntityList.empty(), EntityList.empty(), torch.empty((0, ), dtype=torch.long), ), )
def test_empty(self): self.assertEqual( EntityList.empty(), EntityList(torch.empty((0, ), dtype=torch.long), TensorList.empty()), )
def empty(cls) -> "EdgeList": return cls( EntityList.empty(), EntityList.empty(), torch.empty((0,), dtype=torch.long) )