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):
self._force_reload = force_reload
self._verbose = verbose
self._hash_key = hash_key
self._hash_func = hashlib.sha1()
self._hash = self._get_hash()
# if no dir is provided, the default dgl download dir is used.
......@@ -192,8 +191,9 @@ class DGLDataset(object):
>>> hash_value
'a770b222'
"""
self._hash_func.update(str(self._hash_key).encode('utf-8'))
return self._hash_func.hexdigest()[:8]
hash_func = hashlib.sha1()
hash_func.update(str(self._hash_key).encode('utf-8'))
return hash_func.hexdigest()[:8]
@property
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