Skip to content

Commit

Permalink
Save reference to returned data reading class on load
Browse files Browse the repository at this point in the history
  • Loading branch information
SamStudio8 committed Aug 12, 2014
1 parent 5b8c80e commit d2c0367
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions frontier/frontier.py
Expand Up @@ -81,8 +81,9 @@ def load_data(self, data_dir, target_path, DATA_READER_CLASS, TARGET_READER_CLAS
for f in files:
fpath = os.path.join(root, f)

_data = DATA_READER_CLASS(fpath, self._classes, auto_close=True).get_data()
_id = _data["_id"]
drc = DATA_READER_CLASS(fpath, self._classes, auto_close=True)
_data = drc.get_data()
_id = drc.get_id()

if _id in self._data:
print("[WARN] Duplicate observation %s found in %s" % (_id, fpath))
Expand Down

0 comments on commit d2c0367

Please sign in to comment.