awslabs / dgl-ke

High performance, easy-to-use, and scalable package for learning large-scale knowledge graph embeddings.
https://dglke.dgl.ai/doc/
Apache License 2.0
1.28k stars 196 forks source link

Add hasattr func before valid and test attribute checking #228

Closed ryantd closed 3 years ago

ryantd commented 3 years ago

Adding a hasattr func is more secure if there is no valid or test attribute in Dataset, like PartitionKGDataset.

https://github.com/awslabs/dgl-ke/blob/master/python/dglke/dataloader/KGDataset.py#L147-L165

ryantd commented 3 years ago

cc @classicsong

ryantd commented 3 years ago

Bump