Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/master' into mozga-intel/gcd_lcm…
Browse files Browse the repository at this point in the history
…_support
  • Loading branch information
mozga-intel committed Sep 17, 2021
2 parents d080b2e + 72e6b16 commit 757b182
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions python/mxnet/recordio.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,10 +245,11 @@ def __init__(self, idx_path, uri, flag, key_type=int):

def open(self):
super(MXIndexedRecordIO, self).open()
self.idx = {}
self.keys = []
self.fidx = open(self.idx_path, self.flag)
if not self.writable:
if self.writable:
self.idx = {}
self.keys = []
elif not self.idx:
for line in iter(self.fidx.readline, ''):
line = line.strip().split('\t')
key = self.key_type(line[0])
Expand Down

0 comments on commit 757b182

Please sign in to comment.