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

Commit

Permalink
pip installing tensorflow serving seems to be uninstalling the installed
Browse files Browse the repository at this point in the history
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
  • Loading branch information
afrozenator committed Nov 22, 2019
1 parent 1317424 commit d979d9f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion oss_scripts/oss_integration_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ then
sleep 10

# Query
pip install tensorflow-serving-api
pip install tensorflow-serving-api=="$TF_VERSION"
t2t-query-server \
--server=localhost:$server_port \
--servable_name=$model_name \
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
'tensor2tensor/bin/t2t-translate-all',
],
install_requires=[
'absl-py',
'bz2file',
'dopamine-rl',
'flask',
Expand Down Expand Up @@ -65,6 +64,7 @@
'tensorflow': ['tensorflow>=1.15.0'],
'tensorflow-hub': ['tensorflow-hub>=0.1.1'],
'tests': [
'absl-py',
# Needed to fix a Travis pytest error.
# https://github.com/Julian/jsonschema/issues/449#issuecomment-411406525
'attrs>=17.4.0',
Expand Down
4 changes: 2 additions & 2 deletions tensor2tensor/data_generators/all_problems.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,11 @@ def _handle_errors(errors):
print(err_msg.format(num_missing=len(errors)))
for module, err in errors:
err_str = str(err)
if log_all:
print("Did not import module: %s; Cause: %s" % (module, err_str))
if not _is_import_err_msg(err_str, module):
print("From module %s" % module)
raise err
if log_all:
print("Did not import module: %s; Cause: %s" % (module, err_str))


def import_modules(modules):
Expand Down
3 changes: 2 additions & 1 deletion tensor2tensor/data_generators/audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@
import subprocess
import tarfile
import wave
from absl import flags

import tensorflow as tf

flags = tf.flags
FLAGS = flags.FLAGS

flags.DEFINE_string("timit_paths", "",
Expand Down

0 comments on commit d979d9f

Please sign in to comment.