Repository: dmlc/dgl

Issue:
Can not load cache files successfully due to misspellings and misuse of function in the code!
## 🐛 Bug

<!-- A clear and concise description of what the bug is. -->

## To Reproduce

1. Create a python file just like this:
```python
from dgl.data import CoraBinary

dataset = CoraBinary()
print("This is CoraBinary Dataset")
```
2. Run this python file, if it's your first time to use this dataset, then you will download this BuiltinDataset zip file from the data repository of dgl. After the program is executed, the output of the command line is as follows:
![image](https://user-images.githubusercontent.com/39077085/115023903-f3d40f00-9ef1-11eb-8c37-dfb12e175216.png)
and your local .dgl folder(~/.dgl) will have a new folder named cora_binary, which is as follows:
![image](https://user-images.githubusercontent.com/39077085/115024288-75c43800-9ef2-11eb-8355-46e4cd01ffe8.png)
3. When you run this python file again, because you already have this processed dataset file in your local filesystem, so the program show load it from ~/.dgl/cora_binary folder, however, the output of the command line is just same as the first time, which is as follows
![image](https://user-images.githubusercontent.com/39077085/115024818-30ecd100-9ef3-11eb-89b3-15d9ee67c843.png)

## Expected behavior

The program successfully loads the dataset from the local cache file.
## Environment

 - DGL Version (e.g., 1.0):0.6.1
 - Backend Library & Version (e.g., PyTorch 0.4.1, MXNet/Gluon 1.3):Pytorch 1.7.0
 - OS (e.g., Linux):Windows 10
 - How you installed DGL (`conda`, `pip`, source):pip
 - Build command you used (if compiling from source):
 - Python version:3.7
 - CUDA/cuDNN version (if applicable):
 - GPU models and configuration (e.g. V100):
 - Any other relevant information:

## Additional context
I guess the reason is there is a misspelling in [citation_graph.py](https://github.com/dmlc/dgl/blob/master/python/dgl/data/citation_graph.py#L874), which is in line 874:
```python
        for i in range(len(lables)):
```
I think it should be changed to 
```python
        for i in range(len(labels)):
```
(lables->labels).
Also, after I changed this directly in local citation_graph.py and run again, I got another error:
![image](https://user-images.githubusercontent.com/39077085/115026878-9641c180-9ef5-11eb-8bf4-d6b6391daa80.png)
It seems that this is because the asnumpy function(in [line 875](https://github.com/dmlc/dgl/blob/master/python/dgl/data/citation_graph.py#L875)) is used incorrectly, after I changed .asnumpy() to .numpy(), the output of the command line is just fine:
![image](https://user-images.githubusercontent.com/39077085/115027408-41eb1180-9ef6-11eb-9184-3b3b90d0363d.png)
![image](https://user-images.githubusercontent.com/39077085/115027491-5e874980-9ef6-11eb-825d-9b423a82a026.png)




Discussion:

Resolving patch:
diff --git a/python/dgl/data/citation_graph.py b/python/dgl/data/citation_graph.py
--- a/python/dgl/data/citation_graph.py
+++ b/python/dgl/data/citation_graph.py
@@ -871,8 +871,8 @@ def load(self):
         self.graphs, labels = load_graphs(str(graph_path))
 
         self.labels = []
-        for i in range(len(lables)):
-            self.labels.append(labels['{}'.format(i)].asnumpy())
+        for i in range(len(labels)):
+            self.labels.append(F.asnumpy(labels['{}'.format(i)]))
         # load pmpds under self.raw_path
         with open("{}/pmpds.pkl".format(self.raw_path), 'rb') as f:
             self.pmpds = _pickle_load(f)


Test patch: