Skip to content

Commit 289c413

Browse files
francoishernandezvince62s
authored andcommitted
bump 0.9.1 (#1466)
1 parent aaa220b commit 289c413

6 files changed

Lines changed: 19 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@
55
## [Unreleased]
66
### Fixes and improvements
77

8+
## [0.9.1](https://github.com/OpenNMT/OpenNMT-py/tree/0.9.1) (2019-06-13)
9+
* New mechanism for MultiGPU training "1 batch producer / multi batch consumers"
10+
resulting in big memory saving when handling huge datasets
11+
* New APEX AMP (mixed precision) API
12+
* Option to overwrite shards when preprocessing
13+
* Small fixes and add-ons
14+
815
## [0.9.0](https://github.com/OpenNMT/OpenNMT-py/tree/0.9.0) (2019-05-16)
916
* Faster vocab building when processing shards (no reloading)
1017
* New dataweighting feature

onmt/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717
__all__ = [onmt.inputters, onmt.encoders, onmt.decoders, onmt.models,
1818
onmt.utils, onmt.modules, "Trainer"]
1919

20-
__version__ = "0.9.0"
20+
__version__ = "0.9.1"

onmt/opts.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,9 @@ def preprocess_opts(parser):
222222
"shard_size>0 means segment dataset into multiple shards, "
223223
"each shard has shard_size samples")
224224

225+
group.add('--overwrite', '-overwrite', action="store_true",
226+
help="Overwrite existing shards if any.")
227+
225228
# Dictionary options, for text corpus
226229

227230
group = parser.add_argument_group('Vocab')

preprocess.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,8 @@ def count_features(path):
167167
def main(opt):
168168
ArgumentParser.validate_preprocess_args(opt)
169169
torch.manual_seed(opt.seed)
170-
check_existing_pt_files(opt)
170+
if not(opt.overwrite):
171+
check_existing_pt_files(opt)
171172

172173
init_logger(opt.log_file)
173174
logger.info("Extracting features...")

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
setup(name='OpenNMT-py',
66
description='A python implementation of OpenNMT',
7-
version='0.9.0',
7+
version='0.9.1',
88

99
packages=['onmt', 'onmt.encoders', 'onmt.modules', 'onmt.tests',
1010
'onmt.translate', 'onmt.decoders', 'onmt.inputters',

train.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@ def main(opt):
4747
train_shards.append(shard_base)
4848
train_iter = build_dataset_iter_multiple(train_shards, fields, opt)
4949
else:
50-
train_iter = build_dataset_iter("train", fields, opt)
50+
if opt.data_ids[0] is not None:
51+
shard_base = "train_" + opt.data_ids[0]
52+
else:
53+
shard_base = "train"
54+
train_iter = build_dataset_iter(shard_base, fields, opt)
5155

5256
nb_gpu = len(opt.gpu_ranks)
5357

0 commit comments

Comments
 (0)