Skip to content
This repository was archived by the owner on Jul 7, 2023. It is now read-only.

Commit 9bdc801

Browse files
authored
Merge pull request #383 from rsepassi/push
v1.2.6
2 parents a836d66 + ba47b61 commit 9bdc801

40 files changed

+932
-314
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ script:
2424
- mkdir $T2T_TRAIN_DIR
2525
- t2t-datagen --problem=$T2T_PROBLEM --data_dir=$T2T_DATA_DIR
2626
- t2t-trainer --problems=$T2T_PROBLEM --data_dir=$T2T_DATA_DIR --model=transformer --hparams_set=transformer_tiny --train_steps=5 --eval_steps=5 --output_dir=$T2T_TRAIN_DIR
27-
- t2t-decoder --problems=$T2T_PROBLEM --data_dir=$T2T_DATA_DIR --model=transformer --hparams_set=transformer_tiny --output_dir=$T2T_TRAIN_DIR --decode_hparams='num_samples=10'
27+
- t2t-decoder --problems=$T2T_PROBLEM --data_dir=$T2T_DATA_DIR --model=transformer --hparams_set=transformer_tiny --output_dir=$T2T_TRAIN_DIR --decode_hparams='num_samples=10,use_last_position_only=True'
2828
git:
2929
depth: 3

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ registrations.
286286
To add a new dataset, subclass
287287
[`Problem`](https://github.com/tensorflow/tensor2tensor/tree/master/tensor2tensor/data_generators/problem.py)
288288
and register it with `@registry.register_problem`. See
289-
[`TranslateEndeWmt8k`](https://github.com/tensorflow/tensor2tensor/tree/master/tensor2tensor/data_generators/wmt.py)
289+
[`TranslateEndeWmt8k`](https://github.com/tensorflow/tensor2tensor/tree/master/tensor2tensor/data_generators/translate_ende.py)
290290
for an example.
291291

292292
Also see the [data generators

docs/new_problem.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ We're almost done. `generator` generates the training and evaluation data and
105105
stores them in files like "word2def_train.lang1" in your DATA_DIR. Thankfully
106106
several commonly used methods like `character_generator`, and `token_generator`
107107
are already written in the file
108-
[`wmt.py`](https://github.com/tensorflow/tensor2tensor/tree/master/tensor2tensor/data_generators/wmt.py).
108+
[`translate.py`](https://github.com/tensorflow/tensor2tensor/tree/master/tensor2tensor/data_generators/translate.py).
109109
We will import `character_generator` and
110110
[`text_encoder`](https://github.com/tensorflow/tensor2tensor/tree/master/tensor2tensor/data_generators/text_encoder.py)
111111
to write:

docs/walkthrough.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ registrations.
286286
To add a new dataset, subclass
287287
[`Problem`](https://github.com/tensorflow/tensor2tensor/tree/master/tensor2tensor/data_generators/problem.py)
288288
and register it with `@registry.register_problem`. See
289-
[`TranslateEndeWmt8k`](https://github.com/tensorflow/tensor2tensor/tree/master/tensor2tensor/data_generators/wmt.py)
289+
[`TranslateEndeWmt8k`](https://github.com/tensorflow/tensor2tensor/tree/master/tensor2tensor/data_generators/translate_ende.py)
290290
for an example.
291291

292292
Also see the [data generators

setup.py

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

66
setup(
77
name='tensor2tensor',
8-
version='1.2.5',
8+
version='1.2.6',
99
description='Tensor2Tensor',
1010
author='Google Inc.',
1111
author_email='[email protected]',

tensor2tensor/bin/t2t-datagen

100755100644
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@ _SUPPORTED_PROBLEM_GENERATORS = {
8282
lambda: algorithmic_math.algebra_inverse(26, 0, 2, 100000),
8383
lambda: algorithmic_math.algebra_inverse(26, 3, 3, 10000)),
8484
"parsing_english_ptb8k": (
85-
lambda: wmt.parsing_token_generator(
85+
lambda: translate.parsing_token_generator(
8686
FLAGS.data_dir, FLAGS.tmp_dir, True, 2**13),
87-
lambda: wmt.parsing_token_generator(
87+
lambda: translate.parsing_token_generator(
8888
FLAGS.data_dir, FLAGS.tmp_dir, False, 2**13)),
8989
"parsing_english_ptb16k": (
9090
lambda: wsj_parsing.parsing_token_generator(

tensor2tensor/bin/t2t-decoder

100755100644
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ def main(_):
8484

8585
decode_hp = decoding.decode_hparams(FLAGS.decode_hparams)
8686
decode_hp.add_hparam("shards", FLAGS.decode_shards)
87+
decode_hp.add_hparam("shard_id", FLAGS.worker_id)
8788
if FLAGS.decode_interactive:
8889
decoding.decode_interactively(estimator, decode_hp)
8990
elif FLAGS.decode_from_file:

tensor2tensor/bin/t2t-make-tf-configs

100755100644
File mode changed.

tensor2tensor/bin/t2t-trainer

100755100644
File mode changed.

tensor2tensor/data_generators/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ All tasks produce TFRecord files of `tensorflow.Example` protocol buffers.
2323
To add a new problem, subclass
2424
[`Problem`](https://github.com/tensorflow/tensor2tensor/tree/master/tensor2tensor/data_generators/problem.py)
2525
and register it with `@registry.register_problem`. See
26-
[`WMTEnDeTokens8k`](https://github.com/tensorflow/tensor2tensor/tree/master/tensor2tensor/data_generators/wmt.py)
26+
[`TranslateEndeWmt8k`](https://github.com/tensorflow/tensor2tensor/tree/master/tensor2tensor/data_generators/translate_ende.py)
2727
for an example.
2828

2929
`Problem`s support data generation, training, and decoding.
@@ -37,7 +37,7 @@ for training/decoding, e.g. a vocabulary file.
3737
A particularly easy way to implement `Problem.generate_data` for your dataset is
3838
to create 2 Python generators, one for the training data and another for the
3939
dev data, and pass them to `generator_utils.generate_dataset_and_shuffle`. See
40-
[`WMTEnDeTokens8k.generate_data`](https://github.com/tensorflow/tensor2tensor/tree/master/tensor2tensor/data_generators/wmt.py)
40+
[`TranslateEndeWmt8k.generate_data`](https://github.com/tensorflow/tensor2tensor/tree/master/tensor2tensor/data_generators/translate_ende.py)
4141
for an example of usage.
4242

4343
The generators should yield dictionaries with string keys and values being lists
@@ -66,5 +66,5 @@ Some examples:
6666

6767
* [Algorithmic problems](https://github.com/tensorflow/tensor2tensor/tree/master/tensor2tensor/data_generators/algorithmic.py)
6868
and their [unit tests](https://github.com/tensorflow/tensor2tensor/tree/master/tensor2tensor/data_generators/algorithmic_test.py)
69-
* [WMT problems](https://github.com/tensorflow/tensor2tensor/tree/master/tensor2tensor/data_generators/wmt.py)
69+
* [WMT En-De problems](https://github.com/tensorflow/tensor2tensor/tree/master/tensor2tensor/data_generators/translate_ende.py)
7070
and their [unit tests](https://github.com/tensorflow/tensor2tensor/tree/master/tensor2tensor/data_generators/wmt_test.py)

0 commit comments

Comments
 (0)