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

Commit c1b1478

Browse files
afrozenatorcopybara-github
authored andcommitted
Drop support for py 2.7, make tests that were running on 2.7 run on py3 instead.
PiperOrigin-RevId: 289171890
1 parent 14e5631 commit c1b1478

File tree

3 files changed

+13
-15
lines changed

3 files changed

+13
-15
lines changed

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ git:
77
services:
88
- docker
99
python:
10-
- "2.7"
1110
- "3.6"
1211
env:
1312
global:

oss_scripts/oss_integration_test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ t2t-trainer --problem=$T2T_PROBLEM --data_dir=$T2T_DATA_DIR --model=transformer
2020
t2t-decoder --problem=$T2T_PROBLEM --data_dir=$T2T_DATA_DIR --model=transformer --hparams_set=transformer_tiny --output_dir=$T2T_TRAIN_DIR --decode_hparams='num_samples=10'
2121

2222
# Test serving
23-
if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]] && [[ "$TF_VERSION" == "$TF_LATEST" ]]
23+
if [[ "$TF_VERSION" == "$TF_LATEST" ]]
2424
then
2525
# Export for serving
2626
pip install tensorflow_hub

oss_scripts/oss_tests.sh

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -158,19 +158,7 @@ set_status
158158
# set_status
159159
#fi
160160

161-
if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]] && [[ "$TF_VERSION" == "$TF_LATEST" ]]
162-
then
163-
# TODO(afrozm): Once we drop support for 1.10 we can get rid of this.
164-
pytest --disable-warnings \
165-
tensor2tensor/utils/beam_search_test.py::BeamSearchTest::testTPUBeam
166-
set_status
167-
# TODO(afrozm): Enable other tests in the RL directory.
168-
# Can't add disable warning here since it parses flags.
169-
pytest tensor2tensor/rl/trainer_model_based_test.py
170-
set_status
171-
fi
172-
173-
if [[ "$TRAVIS_PYTHON_VERSION" == "3.6" ]] && [[ "$TF_VERSION" == "$TF_LATEST" ]]
161+
if [[ "$TF_VERSION" == "$TF_LATEST" ]]
174162
then
175163
jupyter nbconvert --ExecutePreprocessor.kernel_name=python3 \
176164
--ExecutePreprocessor.timeout=600 --to notebook --execute \
@@ -181,6 +169,17 @@ then
181169
--ExecutePreprocessor.timeout=600 --to notebook --execute \
182170
tensor2tensor/notebooks/t2t_problem.ipynb;
183171
set_status
172+
173+
# TODO(afrozm): Once we drop support for 1.10 we can get rid of this.
174+
pytest --disable-warnings \
175+
tensor2tensor/utils/beam_search_test.py::BeamSearchTest::testTPUBeam
176+
set_status
177+
178+
# TODO(afrozm): Enable other tests in the RL directory.
179+
# Can't add disable warning here since it parses flags.
180+
pytest tensor2tensor/rl/trainer_model_based_test.py
181+
set_status
182+
184183
fi
185184

186185
# Test --t2t_usr_dir

0 commit comments

Comments
 (0)