Skip to content

Commit

Permalink
bump 0.9.1 (OpenNMT#1466)
Browse files Browse the repository at this point in the history
  • Loading branch information
francoishernandez authored and vince62s committed Jun 13, 2019
1 parent aaa220b commit 289c413
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 4 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
## [Unreleased]
### Fixes and improvements

## [0.9.1](https://github.com/OpenNMT/OpenNMT-py/tree/0.9.1) (2019-06-13)
* New mechanism for MultiGPU training "1 batch producer / multi batch consumers"
resulting in big memory saving when handling huge datasets
* New APEX AMP (mixed precision) API
* Option to overwrite shards when preprocessing
* Small fixes and add-ons

## [0.9.0](https://github.com/OpenNMT/OpenNMT-py/tree/0.9.0) (2019-05-16)
* Faster vocab building when processing shards (no reloading)
* New dataweighting feature
Expand Down
2 changes: 1 addition & 1 deletion onmt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
__all__ = [onmt.inputters, onmt.encoders, onmt.decoders, onmt.models,
onmt.utils, onmt.modules, "Trainer"]

__version__ = "0.9.0"
__version__ = "0.9.1"
3 changes: 3 additions & 0 deletions onmt/opts.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,9 @@ def preprocess_opts(parser):
"shard_size>0 means segment dataset into multiple shards, "
"each shard has shard_size samples")

group.add('--overwrite', '-overwrite', action="store_true",
help="Overwrite existing shards if any.")

# Dictionary options, for text corpus

group = parser.add_argument_group('Vocab')
Expand Down
3 changes: 2 additions & 1 deletion preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,8 @@ def count_features(path):
def main(opt):
ArgumentParser.validate_preprocess_args(opt)
torch.manual_seed(opt.seed)
check_existing_pt_files(opt)
if not(opt.overwrite):
check_existing_pt_files(opt)

init_logger(opt.log_file)
logger.info("Extracting features...")
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

setup(name='OpenNMT-py',
description='A python implementation of OpenNMT',
version='0.9.0',
version='0.9.1',

packages=['onmt', 'onmt.encoders', 'onmt.modules', 'onmt.tests',
'onmt.translate', 'onmt.decoders', 'onmt.inputters',
Expand Down
6 changes: 5 additions & 1 deletion train.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ def main(opt):
train_shards.append(shard_base)
train_iter = build_dataset_iter_multiple(train_shards, fields, opt)
else:
train_iter = build_dataset_iter("train", fields, opt)
if opt.data_ids[0] is not None:
shard_base = "train_" + opt.data_ids[0]
else:
shard_base = "train"
train_iter = build_dataset_iter(shard_base, fields, opt)

nb_gpu = len(opt.gpu_ranks)

Expand Down

0 comments on commit 289c413

Please sign in to comment.