"examples/mxnet/_deprecated/sampling/train.py" did not exist on "2e9949d228e249b7f70349cc0b222fa35009fb85"
Unverified Commit 12f64296 authored by Tong He's avatar Tong He Committed by GitHub
Browse files

remove hash_func from dataset object (#2572)


Co-authored-by: default avatarMinjie Wang <wmjlyjemaine@gmail.com>
parent 8e981db9
...@@ -77,7 +77,6 @@ class DGLDataset(object): ...@@ -77,7 +77,6 @@ class DGLDataset(object):
self._force_reload = force_reload self._force_reload = force_reload
self._verbose = verbose self._verbose = verbose
self._hash_key = hash_key self._hash_key = hash_key
self._hash_func = hashlib.sha1()
self._hash = self._get_hash() self._hash = self._get_hash()
# if no dir is provided, the default dgl download dir is used. # if no dir is provided, the default dgl download dir is used.
...@@ -192,8 +191,9 @@ class DGLDataset(object): ...@@ -192,8 +191,9 @@ class DGLDataset(object):
>>> hash_value >>> hash_value
'a770b222' 'a770b222'
""" """
self._hash_func.update(str(self._hash_key).encode('utf-8')) hash_func = hashlib.sha1()
return self._hash_func.hexdigest()[:8] hash_func.update(str(self._hash_key).encode('utf-8'))
return hash_func.hexdigest()[:8]
@property @property
def url(self): def url(self):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment