Commit 4fcb47f3 authored by Patrick Wieschollek's avatar Patrick Wieschollek Committed by Yuxin Wu

Lmdb Reader (#61)

Reading Lmdb databases in random order requires to shuffle the keys.
Note, "_txn.cursor()" returns (k,v) pairs. Currently, the
implementations tries to query by a (k,v) pair instead of the key
only.
parent 25583e52
......@@ -83,8 +83,8 @@ class LMDBData(RNGDataFlow):
with timed_operation("Loading LMDB keys ...", log_start=True), \
get_tqdm(total=self._size) as pbar:
for k in self._txn.cursor():
if k != '__keys__':
self.keys.append(k)
if k[0] != '__keys__':
self.keys.append(k[0])
pbar.update()
def reset_state(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