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

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
zhreshold committed Jun 25, 2018
1 parent 4b585d2 commit a0142a9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion python/mxnet/gluon/data/dataloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def default_mp_batchify_fn(data):

def worker_loop(dataset, key_queue, data_queue, batchify_fn):
"""Worker loop for multiprocessing DataLoader."""
dataset._fork()
dataset._at_fork()
while True:
idx, samples = key_queue.get()
if idx is None:
Expand Down
6 changes: 3 additions & 3 deletions python/mxnet/gluon/data/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def base_fn(x, *args):
return fn(x)
return self.transform(base_fn, lazy)

def _fork(self):
def _at_fork(self):
"""Protective operations required when launching multiprocess workers."""
# for non file descriptor related datasets, just skip
pass
Expand Down Expand Up @@ -180,9 +180,9 @@ class RecordFileDataset(Dataset):
def __init__(self, filename):
self.idx_file = os.path.splitext(filename)[0] + '.idx'
self.filename = filename
self._fork()
self._at_fork()

def _fork(self):
def _at_fork(self):
self._record = recordio.MXIndexedRecordIO(self.idx_file, self.filename, 'r')

def __getitem__(self, idx):
Expand Down

0 comments on commit a0142a9

Please sign in to comment.