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

Commit d979d9f

Browse files
committed
pip installing tensorflow serving seems to be uninstalling the installed
version of tensorflow (1.15.0) and replacing with 2.0, leading to errors of missing contrib -- so install a pinned version. Make an error in all_problems.py log earlier. Reverting the earlier change about tf flags not being shipped with TF, because of this TF 2.0 subterfuge. PiperOrigin-RevId: 281893644
1 parent 1317424 commit d979d9f

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

oss_scripts/oss_integration_test.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ then
4040
sleep 10
4141

4242
# Query
43-
pip install tensorflow-serving-api
43+
pip install tensorflow-serving-api=="$TF_VERSION"
4444
t2t-query-server \
4545
--server=localhost:$server_port \
4646
--servable_name=$model_name \

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
'tensor2tensor/bin/t2t-translate-all',
3434
],
3535
install_requires=[
36-
'absl-py',
3736
'bz2file',
3837
'dopamine-rl',
3938
'flask',
@@ -65,6 +64,7 @@
6564
'tensorflow': ['tensorflow>=1.15.0'],
6665
'tensorflow-hub': ['tensorflow-hub>=0.1.1'],
6766
'tests': [
67+
'absl-py',
6868
# Needed to fix a Travis pytest error.
6969
# https://github.com/Julian/jsonschema/issues/449#issuecomment-411406525
7070
'attrs>=17.4.0',

tensor2tensor/data_generators/all_problems.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,11 @@ def _handle_errors(errors):
126126
print(err_msg.format(num_missing=len(errors)))
127127
for module, err in errors:
128128
err_str = str(err)
129+
if log_all:
130+
print("Did not import module: %s; Cause: %s" % (module, err_str))
129131
if not _is_import_err_msg(err_str, module):
130132
print("From module %s" % module)
131133
raise err
132-
if log_all:
133-
print("Did not import module: %s; Cause: %s" % (module, err_str))
134134

135135

136136
def import_modules(modules):

tensor2tensor/data_generators/audio.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@
2222
import subprocess
2323
import tarfile
2424
import wave
25-
from absl import flags
25+
2626
import tensorflow as tf
2727

28+
flags = tf.flags
2829
FLAGS = flags.FLAGS
2930

3031
flags.DEFINE_string("timit_paths", "",

0 commit comments

Comments
 (0)