1
+ sudo : required
1
2
language : python
3
+ git :
4
+ depth : 3
5
+ services :
6
+ - docker
2
7
python :
3
8
- " 2.7"
4
9
- " 3.6"
@@ -24,13 +29,8 @@ matrix:
24
29
- python : " 3.6"
25
30
env : TF_VERSION="tf-nightly"
26
31
before_install :
27
- # Disabled TensorFlow Serving install until bug fixed. See "Export and query"
28
- # section below.
29
- # - echo "deb [arch=amd64] http://storage.googleapis.com/tensorflow-serving-apt stable tensorflow-model-server tensorflow-model-server-universal" | sudo tee /etc/apt/sources.list.d/tensorflow-serving.list
30
- # - curl https://storage.googleapis.com/tensorflow-serving-apt/tensorflow-serving.release.pub.gpg | sudo apt-key add -
31
32
- sudo apt-get update -qq
32
33
- sudo apt-get install -qq libhdf5-dev
33
- # - sudo apt-get install -qq tensorflow-model-server
34
34
install :
35
35
- if [[ "$TF_VERSION" == "tf-nightly" ]];
36
36
then
@@ -111,14 +111,11 @@ script:
111
111
jupyter nbconvert --ExecutePreprocessor.timeout=600 --to notebook --execute tensor2tensor/notebooks/t2t_problem.ipynb;
112
112
fi
113
113
114
- # Export and query (on Python 2 only)
115
- # Bug: https://github.com/tensorflow/serving/issues/819
116
- # - if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]] && [[ "$TF_VERSION" == "1.6.*" ]]; then
117
- # t2t-exporter --problem=$T2T_PROBLEM --data_dir=$T2T_DATA_DIR --model=transformer --hparams_set=transformer_tiny --output_dir=$T2T_TRAIN_DIR;
118
- # pip install tensorflow-serving-api;
119
- # tensorflow_model_server --port=9000 --model_name=my_model --model_base_path=$T2T_TRAIN_DIR/export/Servo &
120
- # sleep 10;
121
- # t2t-query-server --problem=$T2T_PROBLEM --server=localhost:9000 --servable_name=my_model --data_dir=$T2T_DATA_DIR --inputs_once='1 0 1 0 1 0';
122
- # fi
123
- git :
124
- depth : 3
114
+ # Export and query
115
+ - if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]] && [[ "$TF_VERSION" == "$TF_LATEST" ]]; then
116
+ t2t-exporter --problem=$T2T_PROBLEM --data_dir=$T2T_DATA_DIR --model=transformer --hparams_set=transformer_tiny --output_dir=$T2T_TRAIN_DIR;
117
+ pip install tensorflow-serving-api;
118
+ docker run -d -p 8500:8500 --mount type=bind,source=$T2T_TRAIN_DIR/export/Servo,target=/models/my_model -e MODEL_NAME=my_model -t tensorflow/serving;
119
+ sleep 10;
120
+ t2t-query-server --problem=$T2T_PROBLEM --server=localhost:8500 --servable_name=my_model --data_dir=$T2T_DATA_DIR --inputs_once='1 0 1 0 1 0';
121
+ fi
0 commit comments