23dffb96ac95827a3af89f6ff027d254284ba93c,onmt/inputters/inputter.py,DatasetLazyIter,__iter__,#DatasetLazyIter#,528
Before Change
paths = cycle(self._paths) if self.is_train else self._paths
for path in paths:
cur_dataset = torch.load(path)
logger.info("Loading dataset from %s, number of examples: %d" %
(path, len(cur_dataset)))
cur_dataset.fields = self.fields
cur_iter = OrderedIterator(
dataset=cur_dataset,
batch_size=self.batch_size,
After Change
// workers have the same number of batches to process.
for path in paths:
for batch in self._iter_dataset(path):
yield batch
num_batches += 1
if num_batches % self.num_batches_multiple == 0:
return
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances Project Name: OpenNMT/OpenNMT-py
Commit Name: 23dffb96ac95827a3af89f6ff027d254284ba93c
Time: 2019-02-08
Author: guillaumekln@users.noreply.github.com
File Name: onmt/inputters/inputter.py
Class Name: DatasetLazyIter
Method Name: __iter__
Project Name: catalyst-cooperative/pudl
Commit Name: e2d9e370df886382d0815f2e68925f8dc49986b0
Time: 2019-05-30
Author: zane.selvans@catalyst.coop
File Name: test/conftest.py
Class Name:
Method Name: ferc1_engine_travis_ci
Project Name: catalyst-cooperative/pudl
Commit Name: e2d9e370df886382d0815f2e68925f8dc49986b0
Time: 2019-05-30
Author: zane.selvans@catalyst.coop
File Name: test/conftest.py
Class Name:
Method Name: ferc1_engine