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

Commit 29f2e2e

Browse files
author
Ryan Sepassi
committed
Update instructions for user components to be compatible with Py3
PiperOrigin-RevId: 161701617
1 parent 43bfb9f commit 29f2e2e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+163
-1375
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ def transformer_my_very_own_hparams_set():
242242

243243
```python
244244
# In ~/usr/t2t_usr/__init__.py
245-
import my_registrations
245+
from . import my_registrations
246246
```
247247

248248
```

tensor2tensor/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2017 Google Inc.
1+
# Copyright 2017 The Tensor2Tensor Authors.
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

tensor2tensor/bin/t2t-datagen

100755100644
Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python
2-
# Copyright 2017 Google Inc.
2+
# Copyright 2017 The Tensor2Tensor Authors.
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
@@ -102,14 +102,6 @@ _SUPPORTED_PROBLEM_GENERATORS = {
102102
"algorithmic_algebra_inverse": (
103103
lambda: algorithmic_math.algebra_inverse(26, 0, 2, 100000),
104104
lambda: algorithmic_math.algebra_inverse(26, 3, 3, 10000)),
105-
"ice_parsing_tokens": (
106-
lambda: wmt.tabbed_parsing_token_generator(FLAGS.tmp_dir,
107-
True, "ice", 2**13, 2**8),
108-
lambda: wmt.tabbed_parsing_token_generator(FLAGS.tmp_dir,
109-
False, "ice", 2**13, 2**8)),
110-
"ice_parsing_characters": (
111-
lambda: wmt.tabbed_parsing_character_generator(FLAGS.tmp_dir, True),
112-
lambda: wmt.tabbed_parsing_character_generator(FLAGS.tmp_dir, False)),
113105
"wmt_parsing_tokens_8k": (
114106
lambda: wmt.parsing_token_generator(FLAGS.tmp_dir, True, 2**13),
115107
lambda: wmt.parsing_token_generator(FLAGS.tmp_dir, False, 2**13)),
@@ -148,12 +140,6 @@ _SUPPORTED_PROBLEM_GENERATORS = {
148140
lambda: wmt.ende_wordpiece_token_generator(FLAGS.tmp_dir, True, 2**15),
149141
lambda: wmt.ende_wordpiece_token_generator(FLAGS.tmp_dir, False, 2**15)
150142
),
151-
"wmt_zhen_tokens_32k": (
152-
lambda: wmt.zhen_wordpiece_token_generator(FLAGS.tmp_dir, True,
153-
2**15, 2**15),
154-
lambda: wmt.zhen_wordpiece_token_generator(FLAGS.tmp_dir, False,
155-
2**15, 2**15)
156-
),
157143
"lm1b_32k": (
158144
lambda: lm1b.generator(FLAGS.tmp_dir, True),
159145
lambda: lm1b.generator(FLAGS.tmp_dir, False)

tensor2tensor/bin/t2t-make-tf-configs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python
2-
# Copyright 2017 Google Inc.
2+
# Copyright 2017 The Tensor2Tensor Authors.
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.

tensor2tensor/bin/t2t-trainer

100755100644
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python
2-
# Copyright 2017 Google Inc.
2+
# Copyright 2017 The Tensor2Tensor Authors.
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.

tensor2tensor/data_generators/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2017 Google Inc.
1+
# Copyright 2017 The Tensor2Tensor Authors.
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

tensor2tensor/data_generators/algorithmic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2017 Google Inc.
1+
# Copyright 2017 The Tensor2Tensor Authors.
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

tensor2tensor/data_generators/algorithmic_math.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2017 Google Inc.
1+
# Copyright 2017 The Tensor2Tensor Authors.
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

tensor2tensor/data_generators/algorithmic_math_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2017 Google Inc.
1+
# Copyright 2017 The Tensor2Tensor Authors.
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

tensor2tensor/data_generators/algorithmic_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2017 Google Inc.
1+
# Copyright 2017 The Tensor2Tensor Authors.
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)