BentoML Example: Keras Text Classification

BentoML is an open source platform for machine learning model serving and deployment.

This notebook demonstrates how to use BentoML to turn a Keras model into a docker image containing a REST API server serving this model, how to use your ML service built with BentoML as a CLI tool, and how to distribute it a pypi package.

This notebook is built based on Keras's IMDB LSTM tutorial here.

Impression

In [1]:
%reload_ext autoreload
%autoreload 2
%matplotlib inline
In [ ]:
!pip install bentoml
!pip install tensorflow==1.14.0
!pip install numpy
In [2]:
from __future__ import absolute_import, division, print_function

import numpy as np
import tensorflow as tf
print("Tensorflow Version: %s" % tf.__version__)

from tensorflow import keras
from tensorflow.keras.preprocessing import sequence
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense, Embedding
from tensorflow.keras.layers import LSTM
from tensorflow.keras.datasets import imdb

import bentoml
print("BentoML Version: %s" % bentoml.__version__)
Tensorflow Version: 1.14.0
BentoML Version: 0.6.2+5.g3cbab90
In [3]:
max_features = 1000
maxlen = 80 # cut texts after this number of words (among top max_features most common words)
batch_size = 300
index_from=3 # word index offset

Prepare Dataset

Download the IMDB dataset

In [4]:
# A dictionary mapping words to an integer index
imdb.load_data(num_words=max_features)
word_index = imdb.get_word_index()

# The first indices are reserved
word_index = {k:(v+index_from) for k,v in word_index.items()} 
word_index["<PAD>"] = 0
word_index["<START>"] = 1
word_index["<UNK>"] = 2  # unknown

# Use decode_review to look at original review text in training/testing data
reverse_word_index = dict([(value, key) for (key, value) in word_index.items()])
def decode_review(encoded_text):
    return ' '.join([reverse_word_index.get(i, '?') for i in encoded_text])
In [5]:
(x_train, y_train), (x_test, y_test) = imdb.load_data(num_words=max_features, index_from=index_from)
In [6]:
x_train = sequence.pad_sequences(x_train,
                                 value=word_index["<PAD>"],
                                 padding='post',
                                 maxlen=maxlen)

x_test = sequence.pad_sequences(x_test,
                                value=word_index["<PAD>"],
                                padding='post',
                                maxlen=maxlen)

Model Training & Evaluation

In [7]:
model = Sequential()
model.add(Embedding(max_features, 128))
model.add(LSTM(128, dropout=0.2, recurrent_dropout=0.2))
model.add(Dense(1, activation='sigmoid'))

model.summary()
WARNING: Logging before flag parsing goes to stderr.
W0211 17:23:02.977754 4690394560 deprecation.py:506] From /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages/tensorflow/python/keras/initializers.py:119: calling RandomUniform.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
W0211 17:23:02.995445 4690394560 deprecation.py:506] From /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages/tensorflow/python/ops/init_ops.py:1251: calling VarianceScaling.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
Model: "sequential"
_________________________________________________________________
Layer (type)                 Output Shape              Param #   
=================================================================
embedding (Embedding)        (None, None, 128)         128000    
_________________________________________________________________
lstm (LSTM)                  (None, 128)               131584    
_________________________________________________________________
dense (Dense)                (None, 1)                 129       
=================================================================
Total params: 259,713
Trainable params: 259,713
Non-trainable params: 0
_________________________________________________________________
In [8]:
model.compile(loss='binary_crossentropy',
              optimizer='adam',
              metrics=['accuracy'])

model.fit(x_train, y_train,
          batch_size=batch_size,
          epochs=1, # for demo purpose :P
          validation_data=(x_test, y_test))
W0211 17:23:03.373009 4690394560 deprecation.py:323] From /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages/tensorflow/python/ops/nn_impl.py:180: add_dispatch_support.<locals>.wrapper (from tensorflow.python.ops.array_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.where in 2.0, which has the same broadcast rule as np.where
Train on 25000 samples, validate on 25000 samples
25000/25000 [==============================] - 35s 1ms/sample - loss: 0.5795 - acc: 0.6965 - val_loss: 0.4436 - val_acc: 0.8020
Out[8]:
<tensorflow.python.keras.callbacks.History at 0x13e09bcc0>
In [9]:
score, acc = model.evaluate(x_test, y_test,
                            batch_size=batch_size)

print('Test score:', score)
print('Test accuracy:', acc)
25000/25000 [==============================] - 7s 281us/sample - loss: 0.4436 - acc: 0.8020
Test score: 0.4436431996822357
Test accuracy: 0.80204

Define BentoService for model serving

In [41]:
%%writefile keras_text_classification_service.py
import pandas as pd
import numpy as np
from tensorflow import keras
from tensorflow.keras.preprocessing import sequence, text
from bentoml import api, env, BentoService, artifacts
from bentoml.artifact import KerasModelArtifact, PickleArtifact
from bentoml.handlers import JsonHandler

max_features = 1000

@artifacts([
    KerasModelArtifact('model'),
    PickleArtifact('word_index')
])
@env(pip_dependencies=['tensorflow==1.14.0', 'numpy', 'pandas'])
class KerasTextClassificationService(BentoService):
   
    def word_to_index(self, word):
        if word in self.artifacts.word_index and self.artifacts.word_index[word] <= max_features:
            return self.artifacts.word_index[word]
        else:
            return self.artifacts.word_index["<UNK>"]
    
    def preprocessing(self, text_str):
        sequence = text.text_to_word_sequence(text_str)
        return list(map(self.word_to_index, sequence))
    
    @api(JsonHandler)
    def predict(self, parsed_json):
        if type(parsed_json) == list:
            input_data = list(map(self.preprocessing, parsed_json))
        else: # expecting type(parsed_json) == dict:
            input_data = [self.preprocessing(parsed_json['text'])]

        input_data = sequence.pad_sequences(input_data,
                                            value=self.artifacts.word_index["<PAD>"],
                                            padding='post',
                                            maxlen=80)

        return self.artifacts.model.predict_classes(input_data)
Overwriting keras_text_classification_service.py

Save BentoService to file archive

In [ ]:
# 1) import the custom BentoService defined above
from keras_text_classification_service import KerasTextClassificationService

# 2) `pack` it with required artifacts
bento_svc = KerasTextClassificationService()
bento_svc.pack('model', model)
bento_svc.pack('word_index', word_index)

# 3) save your BentoSerivce
saved_path = bento_svc.save()

Test packed BentoML service

In [12]:
bento_svc.predict({ 'text': 'bad worst terrible' })
Out[12]:
array([[0]], dtype=int32)
In [13]:
bento_svc.predict(['the best movie I have ever seen', 'This is a bad movie'])
Out[13]:
array([[1],
       [0]], dtype=int32)

Load BentoML Service from archive

In [14]:
import bentoml

loaded_bento_svc = bentoml.load(saved_path)
[2019-10-14 17:11:11,437] WARNING - Module `text_classification_service` already loaded, using existing imported module.
W1014 17:11:11.451318 4541836608 deprecation_wrapper.py:119] From /Users/chaoyuyang/anaconda3/envs/bentoml-dev/lib/python3.7/site-packages/bentoml/artifact/keras_model_artifact.py:104: The name tf.keras.backend.set_session is deprecated. Please use tf.compat.v1.keras.backend.set_session instead.

W1014 17:11:11.467543 4541836608 deprecation.py:506] From /Users/chaoyuyang/anaconda3/envs/bentoml-dev/lib/python3.7/site-packages/tensorflow/python/ops/init_ops.py:97: calling GlorotUniform.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
W1014 17:11:11.468544 4541836608 deprecation.py:506] From /Users/chaoyuyang/anaconda3/envs/bentoml-dev/lib/python3.7/site-packages/tensorflow/python/ops/init_ops.py:97: calling Orthogonal.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
W1014 17:11:11.469242 4541836608 deprecation.py:506] From /Users/chaoyuyang/anaconda3/envs/bentoml-dev/lib/python3.7/site-packages/tensorflow/python/ops/init_ops.py:97: calling Zeros.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
In [15]:
loaded_bento_svc.predict({ "text": "the best movie I have ever seen" })
Out[15]:
array([[1]], dtype=int32)
In [16]:
loaded_bento_svc.predict(['the best movie I have ever seen', 'This is a bad movie'])
Out[16]:
array([[1],
       [1]], dtype=int32)

Using BentoService with BentoML CLI tool

We can use bentoml get command to retrieve BentoService basic information

In [14]:
!bentoml get KerasTextClassificationService
BENTO_SERVICE                                         AGE                         APIS                  ARTIFACTS
KerasTextClassificationService:20200211173435_F31009  5 minutes and 58.2 seconds  predict<JsonHandler>  model<KerasModelArtifact>, word_index<PickleArtifact>
KerasTextClassificationService:20200206112311_4FA99B  5 days and 6 hours          predict<JsonHandler>  model<KerasModelArtifact>, word_index<PickleArtifact>

When provide version info, bentoml get will retrieve additional metadata

In [15]:
!bentoml get KerasTextClassificationService:20200211173435_F31009
{
  "name": "KerasTextClassificationService",
  "version": "20200211173435_F31009",
  "uri": {
    "type": "LOCAL",
    "uri": "/Users/bozhaoyu/bentoml/repository/KerasTextClassificationService/20200211173435_F31009"
  },
  "bentoServiceMetadata": {
    "name": "KerasTextClassificationService",
    "version": "20200211173435_F31009",
    "createdAt": "2020-02-12T01:35:00.448136Z",
    "env": {
      "condaEnv": "name: bentoml-KerasTextClassificationService\nchannels:\n- defaults\ndependencies:\n- python=3.7.3\n- pip\n",
      "pipDependencies": "bentoml==0.6.2\ntensorflow\nnumpy\npandas",
      "pythonVersion": "3.7.3"
    },
    "artifacts": [
      {
        "name": "model",
        "artifactType": "KerasModelArtifact"
      },
      {
        "name": "word_index",
        "artifactType": "PickleArtifact"
      }
    ],
    "apis": [
      {
        "name": "predict",
        "handlerType": "JsonHandler",
        "docs": "BentoService API"
      }
    ]
  }
}

bentoml run provides a quick way to get prediction result

In [16]:
!bentoml run KerasTextClassificationService:20200211173435_F31009 predict --input='{"text": "bad movie"}'
[2020-02-11 17:41:39,097] WARNING - BentoML local changes detected - Local BentoML repository including all code changes will be bundled together with the BentoService bundle. When used with docker, the base docker image will be default to same version as last PyPI release at version: 0.6.2. You can also force bentoml to use a specific version for deploying your BentoService bundle, by setting the config 'core/bentoml_deploy_version' to a pinned version or your custom BentoML on github, e.g.:'bentoml_deploy_version = git+https://github.com/{username}/[email protected]{branch}'
[2020-02-11 17:41:39,109] WARNING - Saved BentoService bundle version mismatch: loading BentoServie bundle create with BentoML version 0.6.2,  but loading from BentoML version 0.6.2+5.g3cbab90
[2020-02-11 17:41:41,532] WARNING - BentoML local changes detected - Local BentoML repository including all code changes will be bundled together with the BentoService bundle. When used with docker, the base docker image will be default to same version as last PyPI release at version: 0.6.2. You can also force bentoml to use a specific version for deploying your BentoService bundle, by setting the config 'core/bentoml_deploy_version' to a pinned version or your custom BentoML on github, e.g.:'bentoml_deploy_version = git+https://github.com/{username}/[email protected]{branch}'
2020-02-11 17:41:41.542782: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
WARNING: Logging before flag parsing goes to stderr.
W0211 17:41:41.543488 4638137792 deprecation_wrapper.py:119] From /Users/bozhaoyu/src/bento/bentoml/artifact/keras_model_artifact.py:114: The name tf.keras.backend.set_session is deprecated. Please use tf.compat.v1.keras.backend.set_session instead.

W0211 17:41:41.546514 4638137792 deprecation.py:506] From /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages/tensorflow/python/keras/initializers.py:119: calling RandomUniform.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
W0211 17:41:41.559051 4638137792 deprecation.py:506] From /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages/tensorflow/python/ops/init_ops.py:97: calling GlorotUniform.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
W0211 17:41:41.559229 4638137792 deprecation.py:506] From /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages/tensorflow/python/ops/init_ops.py:1251: calling VarianceScaling.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
W0211 17:41:41.559610 4638137792 deprecation.py:506] From /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages/tensorflow/python/ops/init_ops.py:97: calling Orthogonal.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
W0211 17:41:41.559870 4638137792 deprecation.py:506] From /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages/tensorflow/python/ops/init_ops.py:97: calling Zeros.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
W0211 17:41:41.911606 4638137792 deprecation.py:323] From /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages/tensorflow/python/ops/nn_impl.py:180: add_dispatch_support.<locals>.wrapper (from tensorflow.python.ops.array_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.where in 2.0, which has the same broadcast rule as np.where
W0211 17:41:42.865767 4638137792 deprecation_wrapper.py:119] From /Users/bozhaoyu/src/bento/bentoml/artifact/keras_model_artifact.py:100: The name tf.keras.backend.get_session is deprecated. Please use tf.compat.v1.keras.backend.get_session instead.

[2020-02-11 17:41:42,892] WARNING - BentoML local changes detected - Local BentoML repository including all code changes will be bundled together with the BentoService bundle. When used with docker, the base docker image will be default to same version as last PyPI release at version: 0.6.2. You can also force bentoml to use a specific version for deploying your BentoService bundle, by setting the config 'core/bentoml_deploy_version' to a pinned version or your custom BentoML on github, e.g.:'bentoml_deploy_version = git+https://github.com/{username}/[email protected]{branch}'
[[0]]

Run REST API server locally

In [17]:
!bentoml serve KerasTextClassificationService:20200211173435_F31009
[2020-02-11 17:42:06,310] WARNING - BentoML local changes detected - Local BentoML repository including all code changes will be bundled together with the BentoService bundle. When used with docker, the base docker image will be default to same version as last PyPI release at version: 0.6.2. You can also force bentoml to use a specific version for deploying your BentoService bundle, by setting the config 'core/bentoml_deploy_version' to a pinned version or your custom BentoML on github, e.g.:'bentoml_deploy_version = git+https://github.com/{username}/[email protected]{branch}'
[2020-02-11 17:42:06,322] WARNING - Saved BentoService bundle version mismatch: loading BentoServie bundle create with BentoML version 0.6.2,  but loading from BentoML version 0.6.2+5.g3cbab90
[2020-02-11 17:42:08,514] WARNING - BentoML local changes detected - Local BentoML repository including all code changes will be bundled together with the BentoService bundle. When used with docker, the base docker image will be default to same version as last PyPI release at version: 0.6.2. You can also force bentoml to use a specific version for deploying your BentoService bundle, by setting the config 'core/bentoml_deploy_version' to a pinned version or your custom BentoML on github, e.g.:'bentoml_deploy_version = git+https://github.com/{username}/[email protected]{branch}'
2020-02-11 17:42:08.525705: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
WARNING: Logging before flag parsing goes to stderr.
W0211 17:42:08.526188 4520361408 deprecation_wrapper.py:119] From /Users/bozhaoyu/src/bento/bentoml/artifact/keras_model_artifact.py:114: The name tf.keras.backend.set_session is deprecated. Please use tf.compat.v1.keras.backend.set_session instead.

W0211 17:42:08.528490 4520361408 deprecation.py:506] From /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages/tensorflow/python/keras/initializers.py:119: calling RandomUniform.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
W0211 17:42:08.541333 4520361408 deprecation.py:506] From /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages/tensorflow/python/ops/init_ops.py:97: calling GlorotUniform.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
W0211 17:42:08.541527 4520361408 deprecation.py:506] From /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages/tensorflow/python/ops/init_ops.py:1251: calling VarianceScaling.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
W0211 17:42:08.542001 4520361408 deprecation.py:506] From /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages/tensorflow/python/ops/init_ops.py:97: calling Orthogonal.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
W0211 17:42:08.542296 4520361408 deprecation.py:506] From /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages/tensorflow/python/ops/init_ops.py:97: calling Zeros.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
W0211 17:42:08.936249 4520361408 deprecation.py:323] From /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages/tensorflow/python/ops/nn_impl.py:180: add_dispatch_support.<locals>.wrapper (from tensorflow.python.ops.array_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.where in 2.0, which has the same broadcast rule as np.where
W0211 17:42:09.931900 4520361408 deprecation_wrapper.py:119] From /Users/bozhaoyu/src/bento/bentoml/artifact/keras_model_artifact.py:100: The name tf.keras.backend.get_session is deprecated. Please use tf.compat.v1.keras.backend.get_session instead.

[2020-02-11 17:42:09,958] WARNING - BentoML local changes detected - Local BentoML repository including all code changes will be bundled together with the BentoService bundle. When used with docker, the base docker image will be default to same version as last PyPI release at version: 0.6.2. You can also force bentoml to use a specific version for deploying your BentoService bundle, by setting the config 'core/bentoml_deploy_version' to a pinned version or your custom BentoML on github, e.g.:'bentoml_deploy_version = git+https://github.com/{username}/[email protected]{branch}'
 * Serving Flask app "KerasTextClassificationService" (lazy loading)
 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.
 * Debug mode: off
I0211 17:42:09.992038 4520361408 _internal.py:122]  * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
^C

Send prediction request to REST API server

Run the following command in terminal to make a HTTP request to the API server

curl -i \
--header "Content-Type: application/json" \
--request POST \
--data '{"text": "best movie ever"}' \
localhost:5000/predict

"pip install" a BentoML archive

BentoML user can directly pip install saved BentoML archive with pip install $SAVED_PATH, and use it as a regular python package.

In [18]:
!pip install {saved_path}
Processing /Users/bozhaoyu/bentoml/repository/KerasTextClassificationService/20200211173435_F31009
Requirement already satisfied: bentoml==0.6.2 in /Users/bozhaoyu/src/bento (from KerasTextClassificationService===20200211173435-F31009) (0.6.2+5.g3cbab90)
Requirement already satisfied: tensorflow in /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages (from KerasTextClassificationService===20200211173435-F31009) (1.14.0)
Requirement already satisfied: numpy in /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages (from KerasTextClassificationService===20200211173435-F31009) (1.16.4)
Requirement already satisfied: pandas in /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages (from KerasTextClassificationService===20200211173435-F31009) (0.24.2)
Requirement already satisfied: ruamel.yaml>=0.15.0 in /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages (from bentoml==0.6.2->KerasTextClassificationService===20200211173435-F31009) (0.16.5)
Requirement already satisfied: flask in /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages (from bentoml==0.6.2->KerasTextClassificationService===20200211173435-F31009) (1.0.4)
Requirement already satisfied: gunicorn in /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages (from bentoml==0.6.2->KerasTextClassificationService===20200211173435-F31009) (19.9.0)
Requirement already satisfied: click>=7.0 in /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages (from bentoml==0.6.2->KerasTextClassificationService===20200211173435-F31009) (7.0)
Requirement already satisfied: prometheus_client in /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages (from bentoml==0.6.2->KerasTextClassificationService===20200211173435-F31009) (0.7.1)
Requirement already satisfied: python-json-logger in /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages (from bentoml==0.6.2->KerasTextClassificationService===20200211173435-F31009) (0.1.11)
Requirement already satisfied: boto3 in /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages (from bentoml==0.6.2->KerasTextClassificationService===20200211173435-F31009) (1.10.42)
Requirement already satisfied: requests in /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages (from bentoml==0.6.2->KerasTextClassificationService===20200211173435-F31009) (2.22.0)
Requirement already satisfied: packaging in /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages (from bentoml==0.6.2->KerasTextClassificationService===20200211173435-F31009) (19.0)
Requirement already satisfied: docker in /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages (from bentoml==0.6.2->KerasTextClassificationService===20200211173435-F31009) (4.1.0)
Requirement already satisfied: configparser in /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages (from bentoml==0.6.2->KerasTextClassificationService===20200211173435-F31009) (3.7.4)
Requirement already satisfied: sqlalchemy>=1.3.0 in /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages (from bentoml==0.6.2->KerasTextClassificationService===20200211173435-F31009) (1.3.6)
Requirement already satisfied: protobuf>=3.6.0 in /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages (from bentoml==0.6.2->KerasTextClassificationService===20200211173435-F31009) (3.7.0)
Requirement already satisfied: grpcio in /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages (from bentoml==0.6.2->KerasTextClassificationService===20200211173435-F31009) (1.22.0)
Requirement already satisfied: cerberus in /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages (from bentoml==0.6.2->KerasTextClassificationService===20200211173435-F31009) (1.3.1)
Requirement already satisfied: tabulate in /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages (from bentoml==0.6.2->KerasTextClassificationService===20200211173435-F31009) (0.8.3)
Requirement already satisfied: humanfriendly in /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages (from bentoml==0.6.2->KerasTextClassificationService===20200211173435-F31009) (4.18)
Requirement already satisfied: alembic in /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages (from bentoml==0.6.2->KerasTextClassificationService===20200211173435-F31009) (1.2.1)
Requirement already satisfied: python-dateutil<2.8.1,>=2.1 in /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages (from bentoml==0.6.2->KerasTextClassificationService===20200211173435-F31009) (2.8.0)
Requirement already satisfied: astor>=0.6.0 in /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages (from tensorflow->KerasTextClassificationService===20200211173435-F31009) (0.7.1)
Requirement already satisfied: keras-preprocessing>=1.0.5 in /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages (from tensorflow->KerasTextClassificationService===20200211173435-F31009) (1.0.9)
Requirement already satisfied: termcolor>=1.1.0 in /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages (from tensorflow->KerasTextClassificationService===20200211173435-F31009) (1.1.0)
Requirement already satisfied: keras-applications>=1.0.6 in /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages (from tensorflow->KerasTextClassificationService===20200211173435-F31009) (1.0.8)
Requirement already satisfied: gast>=0.2.0 in /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages (from tensorflow->KerasTextClassificationService===20200211173435-F31009) (0.2.2)
Requirement already satisfied: tensorflow-estimator<1.15.0rc0,>=1.14.0rc0 in /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages (from tensorflow->KerasTextClassificationService===20200211173435-F31009) (1.14.0)
Requirement already satisfied: absl-py>=0.7.0 in /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages (from tensorflow->KerasTextClassificationService===20200211173435-F31009) (0.7.1)
Requirement already satisfied: wrapt>=1.11.1 in /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages (from tensorflow->KerasTextClassificationService===20200211173435-F31009) (1.11.1)
Requirement already satisfied: google-pasta>=0.1.6 in /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages (from tensorflow->KerasTextClassificationService===20200211173435-F31009) (0.1.8)
Requirement already satisfied: six>=1.10.0 in /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages (from tensorflow->KerasTextClassificationService===20200211173435-F31009) (1.14.0)
Requirement already satisfied: wheel>=0.26 in /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages (from tensorflow->KerasTextClassificationService===20200211173435-F31009) (0.33.6)
Requirement already satisfied: tensorboard<1.15.0,>=1.14.0 in /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages (from tensorflow->KerasTextClassificationService===20200211173435-F31009) (1.14.0)
Requirement already satisfied: pytz>=2011k in /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages (from pandas->KerasTextClassificationService===20200211173435-F31009) (2019.1)
Requirement already satisfied: ruamel.yaml.clib>=0.1.2; platform_python_implementation == "CPython" and python_version < "3.8" in /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages (from ruamel.yaml>=0.15.0->bentoml==0.6.2->KerasTextClassificationService===20200211173435-F31009) (0.2.0)
Requirement already satisfied: Jinja2>=2.10 in /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages (from flask->bentoml==0.6.2->KerasTextClassificationService===20200211173435-F31009) (2.10.1)
Requirement already satisfied: itsdangerous>=0.24 in /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages (from flask->bentoml==0.6.2->KerasTextClassificationService===20200211173435-F31009) (1.1.0)
Requirement already satisfied: Werkzeug>=0.14 in /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages (from flask->bentoml==0.6.2->KerasTextClassificationService===20200211173435-F31009) (0.15.4)
Requirement already satisfied: botocore<1.14.0,>=1.13.42 in /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages (from boto3->bentoml==0.6.2->KerasTextClassificationService===20200211173435-F31009) (1.13.42)
Requirement already satisfied: s3transfer<0.3.0,>=0.2.0 in /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages (from boto3->bentoml==0.6.2->KerasTextClassificationService===20200211173435-F31009) (0.2.1)
Requirement already satisfied: jmespath<1.0.0,>=0.7.1 in /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages (from boto3->bentoml==0.6.2->KerasTextClassificationService===20200211173435-F31009) (0.9.4)
Requirement already satisfied: idna<2.9,>=2.5 in /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages (from requests->bentoml==0.6.2->KerasTextClassificationService===20200211173435-F31009) (2.8)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages (from requests->bentoml==0.6.2->KerasTextClassificationService===20200211173435-F31009) (3.0.4)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages (from requests->bentoml==0.6.2->KerasTextClassificationService===20200211173435-F31009) (2019.11.28)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages (from requests->bentoml==0.6.2->KerasTextClassificationService===20200211173435-F31009) (1.24.1)
Requirement already satisfied: pyparsing>=2.0.2 in /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages (from packaging->bentoml==0.6.2->KerasTextClassificationService===20200211173435-F31009) (2.4.0)
Requirement already satisfied: websocket-client>=0.32.0 in /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages (from docker->bentoml==0.6.2->KerasTextClassificationService===20200211173435-F31009) (0.57.0)
Requirement already satisfied: setuptools in /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages (from protobuf>=3.6.0->bentoml==0.6.2->KerasTextClassificationService===20200211173435-F31009) (45.1.0.post20200119)
Requirement already satisfied: Mako in /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages (from alembic->bentoml==0.6.2->KerasTextClassificationService===20200211173435-F31009) (1.1.0)
Requirement already satisfied: python-editor>=0.3 in /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages (from alembic->bentoml==0.6.2->KerasTextClassificationService===20200211173435-F31009) (1.0.4)
Requirement already satisfied: h5py in /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages (from keras-applications>=1.0.6->tensorflow->KerasTextClassificationService===20200211173435-F31009) (2.9.0)
Requirement already satisfied: markdown>=2.6.8 in /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages (from tensorboard<1.15.0,>=1.14.0->tensorflow->KerasTextClassificationService===20200211173435-F31009) (3.1)
Requirement already satisfied: MarkupSafe>=0.23 in /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages (from Jinja2>=2.10->flask->bentoml==0.6.2->KerasTextClassificationService===20200211173435-F31009) (1.1.1)
Requirement already satisfied: docutils<0.16,>=0.10 in /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages (from botocore<1.14.0,>=1.13.42->boto3->bentoml==0.6.2->KerasTextClassificationService===20200211173435-F31009) (0.15.2)
Building wheels for collected packages: KerasTextClassificationService
  Building wheel for KerasTextClassificationService (setup.py) ... done
  Created wheel for KerasTextClassificationService: filename=KerasTextClassificationService-20200211173435_F31009-py3-none-any.whl size=3762773 sha256=70100f150385c4c0f6c68ee496c5fc93ccf8dac5c9604f9df4e82567b5a71851
  Stored in directory: /private/var/folders/kn/xnc9k74x03567n1mx2tfqnpr0000gn/T/pip-ephem-wheel-cache-272d7tjf/wheels/4e/70/05/ac267d80973ce0e42544c4b38c72cde7413226574f2d18ef65
Successfully built KerasTextClassificationService
Installing collected packages: KerasTextClassificationService
Successfully installed KerasTextClassificationService-20200211173435-F31009
In [19]:
import KerasTextClassificationService

installed_svc = KerasTextClassificationService.load()
W0211 17:50:47.581211 4690394560 deprecation_wrapper.py:119] From /Users/bozhaoyu/src/bento/bentoml/artifact/keras_model_artifact.py:114: The name tf.keras.backend.set_session is deprecated. Please use tf.compat.v1.keras.backend.set_session instead.

W0211 17:50:47.602521 4690394560 deprecation.py:506] From /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages/tensorflow/python/ops/init_ops.py:97: calling GlorotUniform.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
W0211 17:50:47.603494 4690394560 deprecation.py:506] From /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages/tensorflow/python/ops/init_ops.py:97: calling Orthogonal.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
W0211 17:50:47.604168 4690394560 deprecation.py:506] From /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages/tensorflow/python/ops/init_ops.py:97: calling Zeros.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
In [20]:
installed_svc.predict({ 'text': 'the best movie I have ever seen' })
Out[20]:
array([[1]], dtype=int32)
In [21]:
installed_svc.predict({ 'text': 'This is a bad movie' })
Out[21]:
array([[0]], dtype=int32)

Additional CLI access from PyPI package

pip install $SAVED_PATH also installs a CLI tool for accessing the BentoML service

In [22]:
!KerasTextClassificationService --help
Usage: KerasTextClassificationService [OPTIONS] COMMAND [ARGS]...

  BentoML CLI tool

Options:
  --version  Show the version and exit.
  --help     Show this message and exit.

Commands:
  info            List APIs
  open-api-spec   Display OpenAPI/Swagger JSON specs
  run             Run API function
  serve           Start local rest server
  serve-gunicorn  Start local gunicorn server
In [23]:
!KerasTextClassificationService info
[2020-02-11 17:51:21,509] WARNING - BentoML local changes detected - Local BentoML repository including all code changes will be bundled together with the BentoService bundle. When used with docker, the base docker image will be default to same version as last PyPI release at version: 0.6.2. You can also force bentoml to use a specific version for deploying your BentoService bundle, by setting the config 'core/bentoml_deploy_version' to a pinned version or your custom BentoML on github, e.g.:'bentoml_deploy_version = git+https://github.com/{username}/[email protected]{branch}'
[2020-02-11 17:51:21,518] WARNING - Saved BentoService bundle version mismatch: loading BentoServie bundle create with BentoML version 0.6.2,  but loading from BentoML version 0.6.2+5.g3cbab90
{
  "name": "KerasTextClassificationService",
  "version": "20200211173435_F31009",
  "created_at": "2020-02-12T01:35:00.448136Z",
  "env": {
    "conda_env": "name: bentoml-KerasTextClassificationService\nchannels:\n- defaults\ndependencies:\n- python=3.7.3\n- pip\n",
    "pip_dependencies": "bentoml==0.6.2\ntensorflow\nnumpy\npandas",
    "python_version": "3.7.3"
  },
  "artifacts": [
    {
      "name": "model",
      "artifact_type": "KerasModelArtifact"
    },
    {
      "name": "word_index",
      "artifact_type": "PickleArtifact"
    }
  ],
  "apis": [
    {
      "name": "predict",
      "handler_type": "JsonHandler",
      "docs": "BentoService API"
    }
  ]
}

Run 'predict' api with json data:

In [26]:
!KerasTextClassificationService run predict --input='{"text": "bad movie"}'
[2020-02-11 17:51:43,969] WARNING - BentoML local changes detected - Local BentoML repository including all code changes will be bundled together with the BentoService bundle. When used with docker, the base docker image will be default to same version as last PyPI release at version: 0.6.2. You can also force bentoml to use a specific version for deploying your BentoService bundle, by setting the config 'core/bentoml_deploy_version' to a pinned version or your custom BentoML on github, e.g.:'bentoml_deploy_version = git+https://github.com/{username}/[email protected]{branch}'
[2020-02-11 17:51:43,977] WARNING - Saved BentoService bundle version mismatch: loading BentoServie bundle create with BentoML version 0.6.2,  but loading from BentoML version 0.6.2+5.g3cbab90
[2020-02-11 17:51:43,979] WARNING - BentoML local changes detected - Local BentoML repository including all code changes will be bundled together with the BentoService bundle. When used with docker, the base docker image will be default to same version as last PyPI release at version: 0.6.2. You can also force bentoml to use a specific version for deploying your BentoService bundle, by setting the config 'core/bentoml_deploy_version' to a pinned version or your custom BentoML on github, e.g.:'bentoml_deploy_version = git+https://github.com/{username}/[email protected]{branch}'
2020-02-11 17:51:43.994295: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
WARNING: Logging before flag parsing goes to stderr.
W0211 17:51:43.995043 4675591616 deprecation_wrapper.py:119] From /Users/bozhaoyu/src/bento/bentoml/artifact/keras_model_artifact.py:114: The name tf.keras.backend.set_session is deprecated. Please use tf.compat.v1.keras.backend.set_session instead.

W0211 17:51:43.999297 4675591616 deprecation.py:506] From /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages/tensorflow/python/keras/initializers.py:119: calling RandomUniform.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
W0211 17:51:44.013288 4675591616 deprecation.py:506] From /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages/tensorflow/python/ops/init_ops.py:97: calling GlorotUniform.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
W0211 17:51:44.013699 4675591616 deprecation.py:506] From /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages/tensorflow/python/ops/init_ops.py:1251: calling VarianceScaling.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
W0211 17:51:44.014296 4675591616 deprecation.py:506] From /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages/tensorflow/python/ops/init_ops.py:97: calling Orthogonal.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
W0211 17:51:44.014577 4675591616 deprecation.py:506] From /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages/tensorflow/python/ops/init_ops.py:97: calling Zeros.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
W0211 17:51:44.375693 4675591616 deprecation.py:323] From /usr/local/anaconda3/envs/dev-py3/lib/python3.7/site-packages/tensorflow/python/ops/nn_impl.py:180: add_dispatch_support.<locals>.wrapper (from tensorflow.python.ops.array_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.where in 2.0, which has the same broadcast rule as np.where
W0211 17:51:45.433894 4675591616 deprecation_wrapper.py:119] From /Users/bozhaoyu/src/bento/bentoml/artifact/keras_model_artifact.py:100: The name tf.keras.backend.get_session is deprecated. Please use tf.compat.v1.keras.backend.get_session instead.

[2020-02-11 17:51:45,469] WARNING - BentoML local changes detected - Local BentoML repository including all code changes will be bundled together with the BentoService bundle. When used with docker, the base docker image will be default to same version as last PyPI release at version: 0.6.2. You can also force bentoml to use a specific version for deploying your BentoService bundle, by setting the config 'core/bentoml_deploy_version' to a pinned version or your custom BentoML on github, e.g.:'bentoml_deploy_version = git+https://github.com/{username}/[email protected]{branch}'
[[0]]

Build docker container with BentoService

BentoService bundles generated Dockerfile. To build docker image, you simply navigate to BentoService directory and run docker build from there

In [47]:
!cd {saved_path} && docker build -t keras-text-classify .
Sending build context to Docker daemon   5.41MB
Step 1/12 : FROM continuumio/miniconda3:4.7.12
4.7.12: Pulling from continuumio/miniconda3
Digest: sha256:6c979670684d970f8ba934bf9b7bf42e77c30a22eb96af1f30a039b484719159
Status: Downloaded newer image for continuumio/miniconda3:4.7.12
 ---> 406f2b43ea59
Step 2/12 : ENTRYPOINT [ "/bin/bash", "-c" ]
 ---> Using cache
 ---> 28172be83c07
Step 3/12 : EXPOSE 5000
 ---> Using cache
 ---> 840844d191d4
Step 4/12 : RUN set -x      && apt-get update      && apt-get install --no-install-recommends --no-install-suggests -y libpq-dev build-essential      && rm -rf /var/lib/apt/lists/*
 ---> Using cache
 ---> 243c05e712f3
Step 5/12 : RUN conda install pip numpy scipy       && pip install gunicorn
 ---> Using cache
 ---> 8fab95ab34fc
Step 6/12 : COPY . /bento
 ---> Using cache
 ---> 7a31febe4214
Step 7/12 : WORKDIR /bento
 ---> Using cache
 ---> 6aa52702e48c
Step 8/12 : RUN if [ -f /bento/setup.sh ]; then /bin/bash -c /bento/setup.sh; fi
 ---> Using cache
 ---> 5b523cc0362e
Step 9/12 : RUN conda env update -n base -f /bento/environment.yml
 ---> Using cache
 ---> 91c38153ea7f
Step 10/12 : RUN pip install -r /bento/requirements.txt
 ---> Using cache
 ---> 6a4f14cfe4ca
Step 11/12 : RUN if [ -f /bento/bentoml_init.sh ]; then /bin/bash -c /bento/bentoml_init.sh; fi
 ---> Running in a84cc2ab7940
Processing ./bundled_pip_dependencies/BentoML-0.6.2+5.g3cbab90.tar.gz
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
    Preparing wheel metadata: started
    Preparing wheel metadata: finished with status 'done'
Requirement already satisfied, skipping upgrade: protobuf>=3.6.0 in /opt/conda/lib/python3.7/site-packages (from BentoML==0.6.2+5.g3cbab90) (3.11.3)
Requirement already satisfied, skipping upgrade: python-dateutil<2.8.1,>=2.1 in /opt/conda/lib/python3.7/site-packages (from BentoML==0.6.2+5.g3cbab90) (2.8.0)
Requirement already satisfied, skipping upgrade: ruamel.yaml>=0.15.0 in /opt/conda/lib/python3.7/site-packages (from BentoML==0.6.2+5.g3cbab90) (0.16.9)
Requirement already satisfied, skipping upgrade: humanfriendly in /opt/conda/lib/python3.7/site-packages (from BentoML==0.6.2+5.g3cbab90) (6.1)
Requirement already satisfied, skipping upgrade: numpy in /opt/conda/lib/python3.7/site-packages (from BentoML==0.6.2+5.g3cbab90) (1.18.1)
Requirement already satisfied, skipping upgrade: flask in /opt/conda/lib/python3.7/site-packages (from BentoML==0.6.2+5.g3cbab90) (1.1.1)
Requirement already satisfied, skipping upgrade: alembic in /opt/conda/lib/python3.7/site-packages (from BentoML==0.6.2+5.g3cbab90) (1.4.0)
Requirement already satisfied, skipping upgrade: configparser in /opt/conda/lib/python3.7/site-packages (from BentoML==0.6.2+5.g3cbab90) (4.0.2)
Requirement already satisfied, skipping upgrade: sqlalchemy>=1.3.0 in /opt/conda/lib/python3.7/site-packages (from BentoML==0.6.2+5.g3cbab90) (1.3.13)
Requirement already satisfied, skipping upgrade: click>=7.0 in /opt/conda/lib/python3.7/site-packages (from BentoML==0.6.2+5.g3cbab90) (7.0)
Requirement already satisfied, skipping upgrade: requests in /opt/conda/lib/python3.7/site-packages (from BentoML==0.6.2+5.g3cbab90) (2.22.0)
Requirement already satisfied, skipping upgrade: pandas in /opt/conda/lib/python3.7/site-packages (from BentoML==0.6.2+5.g3cbab90) (1.0.1)
Requirement already satisfied, skipping upgrade: cerberus in /opt/conda/lib/python3.7/site-packages (from BentoML==0.6.2+5.g3cbab90) (1.3.2)
Requirement already satisfied, skipping upgrade: grpcio in /opt/conda/lib/python3.7/site-packages (from BentoML==0.6.2+5.g3cbab90) (1.27.1)
Requirement already satisfied, skipping upgrade: boto3 in /opt/conda/lib/python3.7/site-packages (from BentoML==0.6.2+5.g3cbab90) (1.11.15)
Requirement already satisfied, skipping upgrade: docker in /opt/conda/lib/python3.7/site-packages (from BentoML==0.6.2+5.g3cbab90) (4.2.0)
Requirement already satisfied, skipping upgrade: gunicorn in /opt/conda/lib/python3.7/site-packages (from BentoML==0.6.2+5.g3cbab90) (20.0.4)
Requirement already satisfied, skipping upgrade: packaging in /opt/conda/lib/python3.7/site-packages (from BentoML==0.6.2+5.g3cbab90) (20.1)
Requirement already satisfied, skipping upgrade: python-json-logger in /opt/conda/lib/python3.7/site-packages (from BentoML==0.6.2+5.g3cbab90) (0.1.11)
Requirement already satisfied, skipping upgrade: tabulate in /opt/conda/lib/python3.7/site-packages (from BentoML==0.6.2+5.g3cbab90) (0.8.6)
Requirement already satisfied, skipping upgrade: prometheus-client in /opt/conda/lib/python3.7/site-packages (from BentoML==0.6.2+5.g3cbab90) (0.7.1)
Requirement already satisfied, skipping upgrade: setuptools in /opt/conda/lib/python3.7/site-packages (from protobuf>=3.6.0->BentoML==0.6.2+5.g3cbab90) (41.4.0)
Requirement already satisfied, skipping upgrade: six>=1.9 in /opt/conda/lib/python3.7/site-packages (from protobuf>=3.6.0->BentoML==0.6.2+5.g3cbab90) (1.12.0)
Requirement already satisfied, skipping upgrade: ruamel.yaml.clib>=0.1.2; platform_python_implementation == "CPython" and python_version < "3.9" in /opt/conda/lib/python3.7/site-packages (from ruamel.yaml>=0.15.0->BentoML==0.6.2+5.g3cbab90) (0.2.0)
Requirement already satisfied, skipping upgrade: itsdangerous>=0.24 in /opt/conda/lib/python3.7/site-packages (from flask->BentoML==0.6.2+5.g3cbab90) (1.1.0)
Requirement already satisfied, skipping upgrade: Jinja2>=2.10.1 in /opt/conda/lib/python3.7/site-packages (from flask->BentoML==0.6.2+5.g3cbab90) (2.11.1)
Requirement already satisfied, skipping upgrade: Werkzeug>=0.15 in /opt/conda/lib/python3.7/site-packages (from flask->BentoML==0.6.2+5.g3cbab90) (1.0.0)
Requirement already satisfied, skipping upgrade: Mako in /opt/conda/lib/python3.7/site-packages (from alembic->BentoML==0.6.2+5.g3cbab90) (1.1.1)
Requirement already satisfied, skipping upgrade: python-editor>=0.3 in /opt/conda/lib/python3.7/site-packages (from alembic->BentoML==0.6.2+5.g3cbab90) (1.0.4)
Requirement already satisfied, skipping upgrade: certifi>=2017.4.17 in /opt/conda/lib/python3.7/site-packages (from requests->BentoML==0.6.2+5.g3cbab90) (2019.11.28)
Requirement already satisfied, skipping upgrade: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /opt/conda/lib/python3.7/site-packages (from requests->BentoML==0.6.2+5.g3cbab90) (1.24.2)
Requirement already satisfied, skipping upgrade: chardet<3.1.0,>=3.0.2 in /opt/conda/lib/python3.7/site-packages (from requests->BentoML==0.6.2+5.g3cbab90) (3.0.4)
Requirement already satisfied, skipping upgrade: idna<2.9,>=2.5 in /opt/conda/lib/python3.7/site-packages (from requests->BentoML==0.6.2+5.g3cbab90) (2.8)
Requirement already satisfied, skipping upgrade: pytz>=2017.2 in /opt/conda/lib/python3.7/site-packages (from pandas->BentoML==0.6.2+5.g3cbab90) (2019.3)
Requirement already satisfied, skipping upgrade: s3transfer<0.4.0,>=0.3.0 in /opt/conda/lib/python3.7/site-packages (from boto3->BentoML==0.6.2+5.g3cbab90) (0.3.3)
Requirement already satisfied, skipping upgrade: botocore<1.15.0,>=1.14.15 in /opt/conda/lib/python3.7/site-packages (from boto3->BentoML==0.6.2+5.g3cbab90) (1.14.15)
Requirement already satisfied, skipping upgrade: jmespath<1.0.0,>=0.7.1 in /opt/conda/lib/python3.7/site-packages (from boto3->BentoML==0.6.2+5.g3cbab90) (0.9.4)
Requirement already satisfied, skipping upgrade: websocket-client>=0.32.0 in /opt/conda/lib/python3.7/site-packages (from docker->BentoML==0.6.2+5.g3cbab90) (0.57.0)
Requirement already satisfied, skipping upgrade: pyparsing>=2.0.2 in /opt/conda/lib/python3.7/site-packages (from packaging->BentoML==0.6.2+5.g3cbab90) (2.4.6)
Requirement already satisfied, skipping upgrade: MarkupSafe>=0.23 in /opt/conda/lib/python3.7/site-packages (from Jinja2>=2.10.1->flask->BentoML==0.6.2+5.g3cbab90) (1.1.1)
Requirement already satisfied, skipping upgrade: docutils<0.16,>=0.10 in /opt/conda/lib/python3.7/site-packages (from botocore<1.15.0,>=1.14.15->boto3->BentoML==0.6.2+5.g3cbab90) (0.15.2)
Building wheels for collected packages: BentoML
  Building wheel for BentoML (PEP 517): started
  Building wheel for BentoML (PEP 517): finished with status 'done'
  Created wheel for BentoML: filename=BentoML-0.6.2+5.g3cbab90-py3-none-any.whl size=507025 sha256=92061051de863225bb0535e25985b467ba7b5b19699b3ef3826465aac5026344
  Stored in directory: /root/.cache/pip/wheels/6b/81/48/1d80a33960a7af644fec71f930327983b3f2e079d1101e14a8
Successfully built BentoML
Installing collected packages: BentoML
  Attempting uninstall: BentoML
    Found existing installation: BentoML 0.6.2
    Uninstalling BentoML-0.6.2:
      Successfully uninstalled BentoML-0.6.2
Successfully installed BentoML-0.6.2+5.g3cbab90
Removing intermediate container a84cc2ab7940
 ---> 6eb0b7ca32d8
Step 12/12 : CMD ["bentoml serve-gunicorn /bento"]
 ---> Running in 825e35bc42e2
Removing intermediate container 825e35bc42e2
 ---> 91aa72136df5
Successfully built 91aa72136df5
Successfully tagged keras-text-classify:latest
In [48]:
!docker run -p 5000:5000 keras-text-classify
[2020-02-12 19:57:53,686] INFO - get_gunicorn_num_of_workers: 3, calculated by cpu count
[2020-02-12 19:57:54 +0000] [1] [INFO] Starting gunicorn 20.0.4
[2020-02-12 19:57:54 +0000] [1] [INFO] Listening at: http://0.0.0.0:5000 (1)
[2020-02-12 19:57:54 +0000] [1] [INFO] Using worker: sync
[2020-02-12 19:57:54 +0000] [8] [INFO] Booting worker with pid: 8
[2020-02-12 19:57:54 +0000] [9] [INFO] Booting worker with pid: 9
[2020-02-12 19:57:54 +0000] [10] [INFO] Booting worker with pid: 10
[2020-02-12 19:57:54,287] WARNING - Saved BentoService bundle version mismatch: loading BentoServie bundle create with BentoML version 0.6.2,  but loading from BentoML version 0.6.2+5.g3cbab90
[2020-02-12 19:57:54,411] WARNING - Saved BentoService bundle version mismatch: loading BentoServie bundle create with BentoML version 0.6.2,  but loading from BentoML version 0.6.2+5.g3cbab90
[2020-02-12 19:57:54,451] WARNING - Saved BentoService bundle version mismatch: loading BentoServie bundle create with BentoML version 0.6.2,  but loading from BentoML version 0.6.2+5.g3cbab90
2020-02-12 19:57:57.485249: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2020-02-12 19:57:57.485321: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2020-02-12 19:57:57.485321: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2020-02-12 19:57:57.493537: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2808000000 Hz
2020-02-12 19:57:57.493565: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2808000000 Hz
2020-02-12 19:57:57.493577: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2808000000 Hz
2020-02-12 19:57:57.494159: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x55816ac78fd0 executing computations on platform Host. Devices:
2020-02-12 19:57:57.494235: I tensorflow/compiler/xla/service/service.cc:175]   StreamExecutor device (0): <undefined>, <undefined>
2020-02-12 19:57:57.494498: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x55816ac78fd0 executing computations on platform Host. Devices:
2020-02-12 19:57:57.494498: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x55816a6baf50 executing computations on platform Host. Devices:
2020-02-12 19:57:57.494547: I tensorflow/compiler/xla/service/service.cc:175]   StreamExecutor device (0): <undefined>, <undefined>
2020-02-12 19:57:57.494624: I tensorflow/compiler/xla/service/service.cc:175]   StreamExecutor device (0): <undefined>, <undefined>
/opt/conda/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
/opt/conda/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/opt/conda/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
/opt/conda/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/opt/conda/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
/opt/conda/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
/opt/conda/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:541: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
/opt/conda/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:542: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/opt/conda/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:543: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
/opt/conda/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:544: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/opt/conda/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:545: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
/opt/conda/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:550: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
WARNING:tensorflow:From /opt/conda/lib/python3.7/site-packages/bentoml/artifact/keras_model_artifact.py:114: The name tf.keras.backend.set_session is deprecated. Please use tf.compat.v1.keras.backend.set_session instead.

/opt/conda/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
/opt/conda/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/opt/conda/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
/opt/conda/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/opt/conda/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
/opt/conda/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
/opt/conda/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:541: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
/opt/conda/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:542: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/opt/conda/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:543: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
/opt/conda/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:544: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/opt/conda/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:545: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
/opt/conda/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:550: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
WARNING:tensorflow:From /opt/conda/lib/python3.7/site-packages/bentoml/artifact/keras_model_artifact.py:114: The name tf.keras.backend.set_session is deprecated. Please use tf.compat.v1.keras.backend.set_session instead.

/opt/conda/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
/opt/conda/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/opt/conda/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
/opt/conda/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/opt/conda/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
/opt/conda/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
/opt/conda/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:541: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
/opt/conda/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:542: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/opt/conda/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:543: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
/opt/conda/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:544: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/opt/conda/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:545: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
/opt/conda/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:550: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
WARNING:tensorflow:From /opt/conda/lib/python3.7/site-packages/bentoml/artifact/keras_model_artifact.py:114: The name tf.keras.backend.set_session is deprecated. Please use tf.compat.v1.keras.backend.set_session instead.

WARNING:tensorflow:From /opt/conda/lib/python3.7/site-packages/tensorflow/python/keras/initializers.py:119: calling RandomUniform.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
WARNING:tensorflow:From /opt/conda/lib/python3.7/site-packages/tensorflow/python/keras/initializers.py:119: calling RandomUniform.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
WARNING:tensorflow:From /opt/conda/lib/python3.7/site-packages/tensorflow/python/keras/initializers.py:119: calling RandomUniform.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
WARNING:tensorflow:From /opt/conda/lib/python3.7/site-packages/tensorflow/python/ops/init_ops.py:97: calling GlorotUniform.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
WARNING:tensorflow:From /opt/conda/lib/python3.7/site-packages/tensorflow/python/ops/init_ops.py:1251: calling VarianceScaling.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
WARNING:tensorflow:From /opt/conda/lib/python3.7/site-packages/tensorflow/python/ops/init_ops.py:97: calling Orthogonal.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
WARNING:tensorflow:From /opt/conda/lib/python3.7/site-packages/tensorflow/python/ops/init_ops.py:97: calling GlorotUniform.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
WARNING:tensorflow:From /opt/conda/lib/python3.7/site-packages/tensorflow/python/ops/init_ops.py:1251: calling VarianceScaling.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
WARNING:tensorflow:From /opt/conda/lib/python3.7/site-packages/tensorflow/python/ops/init_ops.py:97: calling Zeros.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
WARNING:tensorflow:From /opt/conda/lib/python3.7/site-packages/tensorflow/python/ops/init_ops.py:97: calling Orthogonal.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
WARNING:tensorflow:From /opt/conda/lib/python3.7/site-packages/tensorflow/python/ops/init_ops.py:97: calling GlorotUniform.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
WARNING:tensorflow:From /opt/conda/lib/python3.7/site-packages/tensorflow/python/ops/init_ops.py:97: calling Zeros.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
WARNING:tensorflow:From /opt/conda/lib/python3.7/site-packages/tensorflow/python/ops/init_ops.py:1251: calling VarianceScaling.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
WARNING:tensorflow:From /opt/conda/lib/python3.7/site-packages/tensorflow/python/ops/init_ops.py:97: calling Orthogonal.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
WARNING:tensorflow:From /opt/conda/lib/python3.7/site-packages/tensorflow/python/ops/init_ops.py:97: calling Zeros.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
2020-02-12 19:57:58.191883: W tensorflow/compiler/jit/mark_for_compilation_pass.cc:1412] (One-time warning): Not using XLA:CPU for cluster because envvar TF_XLA_FLAGS=--tf_xla_cpu_global_jit was not set.  If you want XLA:CPU, either set that envvar, or use experimental_jit_scope to enable XLA:CPU.  To confirm that XLA is active, pass --vmodule=xla_compilation_cache=1 (as a proper command-line flag, not via TF_XLA_FLAGS) or set the envvar XLA_FLAGS=--xla_hlo_profile.
2020-02-12 19:57:58.191883: W tensorflow/compiler/jit/mark_for_compilation_pass.cc:1412] (One-time warning): Not using XLA:CPU for cluster because envvar TF_XLA_FLAGS=--tf_xla_cpu_global_jit was not set.  If you want XLA:CPU, either set that envvar, or use experimental_jit_scope to enable XLA:CPU.  To confirm that XLA is active, pass --vmodule=xla_compilation_cache=1 (as a proper command-line flag, not via TF_XLA_FLAGS) or set the envvar XLA_FLAGS=--xla_hlo_profile.
2020-02-12 19:57:58.218209: W tensorflow/compiler/jit/mark_for_compilation_pass.cc:1412] (One-time warning): Not using XLA:CPU for cluster because envvar TF_XLA_FLAGS=--tf_xla_cpu_global_jit was not set.  If you want XLA:CPU, either set that envvar, or use experimental_jit_scope to enable XLA:CPU.  To confirm that XLA is active, pass --vmodule=xla_compilation_cache=1 (as a proper command-line flag, not via TF_XLA_FLAGS) or set the envvar XLA_FLAGS=--xla_hlo_profile.
WARNING:tensorflow:From /opt/conda/lib/python3.7/site-packages/tensorflow/python/ops/nn_impl.py:180: add_dispatch_support.<locals>.wrapper (from tensorflow.python.ops.array_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.where in 2.0, which has the same broadcast rule as np.where
WARNING:tensorflow:From /opt/conda/lib/python3.7/site-packages/tensorflow/python/ops/nn_impl.py:180: add_dispatch_support.<locals>.wrapper (from tensorflow.python.ops.array_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.where in 2.0, which has the same broadcast rule as np.where
WARNING:tensorflow:From /opt/conda/lib/python3.7/site-packages/tensorflow/python/ops/nn_impl.py:180: add_dispatch_support.<locals>.wrapper (from tensorflow.python.ops.array_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.where in 2.0, which has the same broadcast rule as np.where
WARNING:tensorflow:From /opt/conda/lib/python3.7/site-packages/bentoml/artifact/keras_model_artifact.py:100: The name tf.keras.backend.get_session is deprecated. Please use tf.compat.v1.keras.backend.get_session instead.

WARNING:tensorflow:From /opt/conda/lib/python3.7/site-packages/bentoml/artifact/keras_model_artifact.py:100: The name tf.keras.backend.get_session is deprecated. Please use tf.compat.v1.keras.backend.get_session instead.

WARNING:tensorflow:From /opt/conda/lib/python3.7/site-packages/bentoml/artifact/keras_model_artifact.py:100: The name tf.keras.backend.get_session is deprecated. Please use tf.compat.v1.keras.backend.get_session instead.

^C
[2020-02-12 19:58:53 +0000] [1] [INFO] Handling signal: int
[2020-02-12 19:58:53 +0000] [8] [INFO] Worker exiting (pid: 8)
[2020-02-12 19:58:53 +0000] [9] [INFO] Worker exiting (pid: 9)
[2020-02-12 19:58:53 +0000] [10] [INFO] Worker exiting (pid: 10)

Deploy BentoService as REST API server to the cloud

BentoML support deployment to multiply cloud provider services, such as AWS Lambda, AWS Sagemaker, Google Cloudrun and etc. You can find the full list and guide on the documentation site at https://docs.bentoml.org/en/latest/deployment/index.html For this project, we are going to deploy to AWS Sagemaker

bentoml sagemaker deploy offers a single command to deployment

In [55]:
!bentoml sagemaker deploy keras-text-classify -b KerasTextClassificationService:20200211173435_F31009 \
    --api-name predict --verbose
[2020-02-12 12:06:56,707] DEBUG - Using BentoML with local Yatai server
[2020-02-12 12:06:56,802] DEBUG - Upgrading tables to the latest revision
Deploying Sagemaker deployment |[2020-02-12 12:06:57,890] DEBUG - Created temporary directory: /private/var/folders/kn/xnc9k74x03567n1mx2tfqnpr0000gn/T/bentoml-temp-kdbp6qz8
-[2020-02-12 12:06:58,120] DEBUG - Getting docker login info from AWS
[2020-02-12 12:06:58,120] DEBUG - Building docker image: 192023623294.dkr.ecr.us-west-2.amazonaws.com/kerastextclassificationservice-sagemaker:20200211173435_F31009
\[2020-02-12 12:06:58,765] INFO - Step 1/11 : FROM continuumio/miniconda3:4.7.12
[2020-02-12 12:06:58,765] INFO - 

-[2020-02-12 12:06:59,697] INFO -  ---> 406f2b43ea59

[2020-02-12 12:06:59,697] INFO - Step 2/11 : EXPOSE 8080
[2020-02-12 12:06:59,697] INFO - 

[2020-02-12 12:06:59,698] INFO -  ---> Using cache

[2020-02-12 12:06:59,698] INFO -  ---> 7c8096d6922f

[2020-02-12 12:06:59,698] INFO - Step 3/11 : RUN set -x      && apt-get update      && apt-get install --no-install-recommends --no-install-suggests -y libpq-dev build-essential     && apt-get install -y nginx      && rm -rf /var/lib/apt/lists/*
[2020-02-12 12:06:59,698] INFO - 

[2020-02-12 12:06:59,698] INFO -  ---> Using cache

[2020-02-12 12:06:59,699] INFO -  ---> 5b00a58f3bce

[2020-02-12 12:06:59,699] INFO - Step 4/11 : RUN conda install pip numpy scipy       && pip install gunicorn gevent
[2020-02-12 12:06:59,699] INFO - 

[2020-02-12 12:06:59,699] INFO -  ---> Using cache

[2020-02-12 12:06:59,699] INFO -  ---> 25aacb592861

[2020-02-12 12:06:59,699] INFO - Step 5/11 : COPY . /opt/program
[2020-02-12 12:06:59,699] INFO - 

[2020-02-12 12:06:59,704] INFO -  ---> Using cache

[2020-02-12 12:06:59,704] INFO -  ---> 2acafac5e50d

[2020-02-12 12:06:59,704] INFO - Step 6/11 : WORKDIR /opt/program
[2020-02-12 12:06:59,704] INFO - 

[2020-02-12 12:06:59,704] INFO -  ---> Using cache

[2020-02-12 12:06:59,704] INFO -  ---> 26e5aeee4c21

[2020-02-12 12:06:59,704] INFO - Step 7/11 : RUN conda env update -n base -f /opt/program/environment.yml
[2020-02-12 12:06:59,705] INFO - 

[2020-02-12 12:06:59,705] INFO -  ---> Using cache

[2020-02-12 12:06:59,705] INFO -  ---> 7afbe51cb6e4

[2020-02-12 12:06:59,705] INFO - Step 8/11 : RUN pip install -r /opt/program/requirements.txt
[2020-02-12 12:06:59,705] INFO - 

/[2020-02-12 12:06:59,849] INFO -  ---> Running in c67ec34728d6

\[2020-02-12 12:07:01,311] INFO - Collecting bentoml==0.6.2

-[2020-02-12 12:07:01,375] INFO -   Downloading BentoML-0.6.2-py3-none-any.whl (554 kB)

|[2020-02-12 12:07:01,959] INFO - Collecting tensorflow==1.14.0

\[2020-02-12 12:07:02,030] INFO -   Downloading tensorflow-1.14.0-cp37-cp37m-manylinux1_x86_64.whl (109.3 MB)

/[2020-02-12 12:07:25,276] INFO - Requirement already satisfied: numpy in /opt/conda/lib/python3.7/site-packages (from -r /opt/program/requirements.txt (line 3)) (1.18.1)

/[2020-02-12 12:07:25,653] INFO - Collecting pandas

[2020-02-12 12:07:25,663] INFO -   Downloading pandas-1.0.1-cp37-cp37m-manylinux1_x86_64.whl (10.1 MB)

\[2020-02-12 12:07:27,938] INFO - Collecting prometheus-client

-[2020-02-12 12:07:27,949] INFO -   Downloading prometheus_client-0.7.1.tar.gz (38 kB)

|[2020-02-12 12:07:28,998] INFO - Collecting grpcio

[2020-02-12 12:07:29,009] INFO -   Downloading grpcio-1.27.1-cp37-cp37m-manylinux2010_x86_64.whl (2.7 MB)

/[2020-02-12 12:07:30,137] INFO - Collecting ruamel.yaml>=0.15.0

[2020-02-12 12:07:30,150] INFO -   Downloading ruamel.yaml-0.16.10-py2.py3-none-any.whl (111 kB)

|[2020-02-12 12:07:30,239] INFO - Collecting python-json-logger

[2020-02-12 12:07:30,249] INFO -   Downloading python-json-logger-0.1.11.tar.gz (6.0 kB)

/[2020-02-12 12:07:30,536] INFO - Collecting configparser

[2020-02-12 12:07:30,549] INFO -   Downloading configparser-4.0.2-py2.py3-none-any.whl (22 kB)

|[2020-02-12 12:07:30,660] INFO - Collecting sqlalchemy>=1.3.0

[2020-02-12 12:07:30,672] INFO -   Downloading SQLAlchemy-1.3.13.tar.gz (6.0 MB)

-[2020-02-12 12:07:32,930] INFO - Collecting docker

[2020-02-12 12:07:32,942] INFO -   Downloading docker-4.2.0-py2.py3-none-any.whl (143 kB)

/[2020-02-12 12:07:33,076] INFO - Collecting packaging

|[2020-02-12 12:07:33,089] INFO -   Downloading packaging-20.1-py2.py3-none-any.whl (36 kB)

[2020-02-12 12:07:33,142] INFO - Collecting cerberus

\[2020-02-12 12:07:33,261] INFO -   Downloading Cerberus-1.3.2.tar.gz (52 kB)

|[2020-02-12 12:07:33,552] INFO - Requirement already satisfied: requests in /opt/conda/lib/python3.7/site-packages (from bentoml==0.6.2->-r /opt/program/requirements.txt (line 1)) (2.22.0)

\[2020-02-12 12:07:33,627] INFO - Collecting python-dateutil<2.8.1,>=2.1

[2020-02-12 12:07:33,640] INFO -   Downloading python_dateutil-2.8.0-py2.py3-none-any.whl (226 kB)

/[2020-02-12 12:07:33,874] INFO - Collecting protobuf>=3.6.0

[2020-02-12 12:07:33,888] INFO -   Downloading protobuf-3.11.3-cp37-cp37m-manylinux1_x86_64.whl (1.3 MB)

-[2020-02-12 12:07:34,205] INFO - Collecting tabulate

/[2020-02-12 12:07:34,218] INFO -   Downloading tabulate-0.8.6.tar.gz (45 kB)

/[2020-02-12 12:07:34,627] INFO - Collecting flask

[2020-02-12 12:07:34,640] INFO -   Downloading Flask-1.1.1-py2.py3-none-any.whl (94 kB)

|[2020-02-12 12:07:34,773] INFO - Collecting humanfriendly

[2020-02-12 12:07:34,784] INFO -   Downloading humanfriendly-6.1-py2.py3-none-any.whl (75 kB)

-[2020-02-12 12:07:35,425] INFO - Collecting boto3

/[2020-02-12 12:07:35,440] INFO -   Downloading boto3-1.11.15-py2.py3-none-any.whl (128 kB)

[2020-02-12 12:07:35,499] INFO - Requirement already satisfied: gunicorn in /opt/conda/lib/python3.7/site-packages (from bentoml==0.6.2->-r /opt/program/requirements.txt (line 1)) (20.0.4)

|[2020-02-12 12:07:35,551] INFO - Collecting click>=7.0

[2020-02-12 12:07:35,563] INFO -   Downloading Click-7.0-py2.py3-none-any.whl (81 kB)

\[2020-02-12 12:07:35,674] INFO - Collecting alembic

[2020-02-12 12:07:35,687] INFO -   Downloading alembic-1.4.0.tar.gz (1.1 MB)

/[2020-02-12 12:07:36,313] INFO - Collecting tensorflow-estimator<1.15.0rc0,>=1.14.0rc0

[2020-02-12 12:07:36,326] INFO -   Downloading tensorflow_estimator-1.14.0-py2.py3-none-any.whl (488 kB)

\[2020-02-12 12:07:36,507] INFO - Collecting tensorboard<1.15.0,>=1.14.0

[2020-02-12 12:07:36,525] INFO -   Downloading tensorboard-1.14.0-py3-none-any.whl (3.1 MB)

|[2020-02-12 12:07:37,206] INFO - Collecting keras-preprocessing>=1.0.5

[2020-02-12 12:07:37,218] INFO -   Downloading Keras_Preprocessing-1.1.0-py2.py3-none-any.whl (41 kB)

\[2020-02-12 12:07:37,339] INFO - Collecting astor>=0.6.0

[2020-02-12 12:07:37,352] INFO -   Downloading astor-0.8.1-py2.py3-none-any.whl (27 kB)

-[2020-02-12 12:07:37,400] INFO - Collecting keras-applications>=1.0.6

[2020-02-12 12:07:37,414] INFO -   Downloading Keras_Applications-1.0.8-py3-none-any.whl (50 kB)

[2020-02-12 12:07:37,441] INFO - Requirement already satisfied: wheel>=0.26 in /opt/conda/lib/python3.7/site-packages (from tensorflow==1.14.0->-r /opt/program/requirements.txt (line 2)) (0.33.6)

[2020-02-12 12:07:37,446] INFO - Requirement already satisfied: six>=1.10.0 in /opt/conda/lib/python3.7/site-packages (from tensorflow==1.14.0->-r /opt/program/requirements.txt (line 2)) (1.12.0)

[2020-02-12 12:07:37,478] INFO - Collecting absl-py>=0.7.0

/[2020-02-12 12:07:37,491] INFO -   Downloading absl-py-0.9.0.tar.gz (104 kB)

\[2020-02-12 12:07:37,787] INFO - Collecting wrapt>=1.11.1

-[2020-02-12 12:07:37,798] INFO -   Downloading wrapt-1.11.2.tar.gz (27 kB)

\[2020-02-12 12:07:38,108] INFO - Collecting gast>=0.2.0

[2020-02-12 12:07:38,118] INFO -   Downloading gast-0.3.3-py2.py3-none-any.whl (9.7 kB)

[2020-02-12 12:07:38,168] INFO - Collecting google-pasta>=0.1.6

[2020-02-12 12:07:38,178] INFO -   Downloading google_pasta-0.1.8-py3-none-any.whl (57 kB)

-[2020-02-12 12:07:38,227] INFO - Collecting termcolor>=1.1.0

[2020-02-12 12:07:38,237] INFO -   Downloading termcolor-1.1.0.tar.gz (3.9 kB)

-[2020-02-12 12:07:38,660] INFO - Collecting pytz>=2017.2

[2020-02-12 12:07:38,676] INFO -   Downloading pytz-2019.3-py2.py3-none-any.whl (509 kB)

\[2020-02-12 12:07:38,950] INFO - Collecting ruamel.yaml.clib>=0.1.2; platform_python_implementation == "CPython" and python_version < "3.9"

[2020-02-12 12:07:38,962] INFO -   Downloading ruamel.yaml.clib-0.2.0-cp37-cp37m-manylinux1_x86_64.whl (547 kB)

/[2020-02-12 12:07:39,149] INFO - Collecting websocket-client>=0.32.0

[2020-02-12 12:07:39,165] INFO -   Downloading websocket_client-0.57.0-py2.py3-none-any.whl (200 kB)

\[2020-02-12 12:07:39,360] INFO - Collecting pyparsing>=2.0.2

[2020-02-12 12:07:39,372] INFO -   Downloading pyparsing-2.4.6-py2.py3-none-any.whl (67 kB)

[2020-02-12 12:07:39,410] INFO - Requirement already satisfied: setuptools in /opt/conda/lib/python3.7/site-packages (from cerberus->bentoml==0.6.2->-r /opt/program/requirements.txt (line 1)) (41.4.0)

[2020-02-12 12:07:39,415] INFO - Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /opt/conda/lib/python3.7/site-packages (from requests->bentoml==0.6.2->-r /opt/program/requirements.txt (line 1)) (1.24.2)

[2020-02-12 12:07:39,422] INFO - Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /opt/conda/lib/python3.7/site-packages (from requests->bentoml==0.6.2->-r /opt/program/requirements.txt (line 1)) (3.0.4)

[2020-02-12 12:07:39,424] INFO - Requirement already satisfied: idna<2.9,>=2.5 in /opt/conda/lib/python3.7/site-packages (from requests->bentoml==0.6.2->-r /opt/program/requirements.txt (line 1)) (2.8)

[2020-02-12 12:07:39,427] INFO - Requirement already satisfied: certifi>=2017.4.17 in /opt/conda/lib/python3.7/site-packages (from requests->bentoml==0.6.2->-r /opt/program/requirements.txt (line 1)) (2019.11.28)

-[2020-02-12 12:07:39,459] INFO - Collecting itsdangerous>=0.24

[2020-02-12 12:07:39,487] INFO -   Downloading itsdangerous-1.1.0-py2.py3-none-any.whl (16 kB)

/[2020-02-12 12:07:39,577] INFO - Collecting Werkzeug>=0.15

[2020-02-12 12:07:39,600] INFO -   Downloading Werkzeug-1.0.0-py2.py3-none-any.whl (298 kB)

\[2020-02-12 12:07:39,832] INFO - Collecting Jinja2>=2.10.1

[2020-02-12 12:07:39,846] INFO -   Downloading Jinja2-2.11.1-py2.py3-none-any.whl (126 kB)

-[2020-02-12 12:07:39,929] INFO - Collecting s3transfer<0.4.0,>=0.3.0

[2020-02-12 12:07:39,942] INFO -   Downloading s3transfer-0.3.3-py2.py3-none-any.whl (69 kB)

|[2020-02-12 12:07:40,525] INFO - Collecting botocore<1.15.0,>=1.14.15

\[2020-02-12 12:07:40,589] INFO -   Downloading botocore-1.14.15-py2.py3-none-any.whl (5.9 MB)

/[2020-02-12 12:07:42,451] INFO - Collecting jmespath<1.0.0,>=0.7.1

[2020-02-12 12:07:42,464] INFO -   Downloading jmespath-0.9.4-py2.py3-none-any.whl (24 kB)

|[2020-02-12 12:07:42,529] INFO - Collecting Mako

[2020-02-12 12:07:42,541] INFO -   Downloading Mako-1.1.1.tar.gz (468 kB)

|[2020-02-12 12:07:42,994] INFO - Collecting python-editor>=0.3

[2020-02-12 12:07:43,004] INFO -   Downloading python_editor-1.0.4-py3-none-any.whl (4.9 kB)

\[2020-02-12 12:07:43,076] INFO - Collecting markdown>=2.6.8

[2020-02-12 12:07:43,089] INFO -   Downloading Markdown-3.2-py2.py3-none-any.whl (88 kB)

-[2020-02-12 12:07:43,211] INFO - Collecting h5py

/[2020-02-12 12:07:43,231] INFO -   Downloading h5py-2.10.0-cp37-cp37m-manylinux1_x86_64.whl (2.9 MB)

\[2020-02-12 12:07:43,861] INFO - Collecting MarkupSafe>=0.23

[2020-02-12 12:07:43,873] INFO -   Downloading MarkupSafe-1.1.1-cp37-cp37m-manylinux1_x86_64.whl (27 kB)

[2020-02-12 12:07:43,939] INFO - Collecting docutils<0.16,>=0.10

-[2020-02-12 12:07:43,957] INFO -   Downloading docutils-0.15.2-py3-none-any.whl (547 kB)

/[2020-02-12 12:07:44,126] INFO - Building wheels for collected packages: prometheus-client, python-json-logger, sqlalchemy, cerberus, tabulate, alembic, absl-py, wrapt, termcolor, Mako

[2020-02-12 12:07:44,127] INFO -   Building wheel for prometheus-client (setup.py): started

-[2020-02-12 12:07:44,436] INFO -   Building wheel for prometheus-client (setup.py): finished with status 'done'

[2020-02-12 12:07:44,437] INFO -   Created wheel for prometheus-client: filename=prometheus_client-0.7.1-py3-none-any.whl size=41402 sha256=38cbdf6e49fda9eb53ffc38b22cecd501fedb1332cd119a69d57669cfc4d2df2
  Stored in directory: /root/.cache/pip/wheels/30/0c/26/59ba285bf65dc79d195e9b25e2ddde4c61070422729b0cd914

[2020-02-12 12:07:44,439] INFO -   Building wheel for python-json-logger (setup.py): started

\[2020-02-12 12:07:44,718] INFO -   Building wheel for python-json-logger (setup.py): finished with status 'done'

[2020-02-12 12:07:44,718] INFO -   Created wheel for python-json-logger: filename=python_json_logger-0.1.11-py2.py3-none-any.whl size=5076 sha256=b6546fe45ab2f75c1086038a50b82bcf394944b87947ba22e1658f2534fd6aa3
  Stored in directory: /root/.cache/pip/wheels/fa/7f/fd/92ccdbb9d1a65486406e0363d2ba5b4ce52f400a915f602ecb

[2020-02-12 12:07:44,720] INFO -   Building wheel for sqlalchemy (setup.py): started

\[2020-02-12 12:07:46,310] INFO -   Building wheel for sqlalchemy (setup.py): finished with status 'done'

[2020-02-12 12:07:46,315] INFO -   Created wheel for sqlalchemy: filename=SQLAlchemy-1.3.13-cp37-cp37m-linux_x86_64.whl size=1223711 sha256=39ee2ac8a9acfece94e261f0a7e0637f098f240fa4d4a0a33a35cab02d9b87c4
  Stored in directory: /root/.cache/pip/wheels/b9/ba/77/163f10f14bd489351530603e750c195b0ceceed2f3be2b32f1

[2020-02-12 12:07:46,318] INFO -   Building wheel for cerberus (setup.py): started

|[2020-02-12 12:07:46,609] INFO -   Building wheel for cerberus (setup.py): finished with status 'done'

[2020-02-12 12:07:46,610] INFO -   Created wheel for cerberus: filename=Cerberus-1.3.2-py3-none-any.whl size=54335 sha256=8d3578927802aa5f6390d2e9738d089db21fd85592f909f3048fcbde7841da0f
  Stored in directory: /root/.cache/pip/wheels/17/3a/0d/e2fc48cf85cb858f5e65f1baa36180ebb5dce6397c35c4cfcb

[2020-02-12 12:07:46,613] INFO -   Building wheel for tabulate (setup.py): started

-[2020-02-12 12:07:46,881] INFO -   Building wheel for tabulate (setup.py): finished with status 'done'

[2020-02-12 12:07:46,882] INFO -   Created wheel for tabulate: filename=tabulate-0.8.6-py3-none-any.whl size=23273 sha256=984a64a5070d0b5cdd2f7f64b60afc83c0beb912b2bb6a50a7d6f2ba9e7870e5
  Stored in directory: /root/.cache/pip/wheels/09/b6/7e/08b4ee715a1239453e89a59081f0ac369a9036f232e013ecd8

[2020-02-12 12:07:46,884] INFO -   Building wheel for alembic (setup.py): started

-[2020-02-12 12:07:47,253] INFO -   Building wheel for alembic (setup.py): finished with status 'done'

[2020-02-12 12:07:47,254] INFO -   Created wheel for alembic: filename=alembic-1.4.0-py2.py3-none-any.whl size=157563 sha256=89d8d2f6f8451da7d7fb3cf863b1098db89e1285773a0e3acf14191f9c081dd5
  Stored in directory: /root/.cache/pip/wheels/33/a9/f9/a53f885636269db5b76cf7afa3a1ab86d9d2fe96610d09274e

[2020-02-12 12:07:47,257] INFO -   Building wheel for absl-py (setup.py): started

\[2020-02-12 12:07:47,571] INFO -   Building wheel for absl-py (setup.py): finished with status 'done'

[2020-02-12 12:07:47,572] INFO -   Created wheel for absl-py: filename=absl_py-0.9.0-py3-none-any.whl size=121931 sha256=d55fd9dd1ed5f2ad2d758762ebebc79afa14ef69a2892ca5ebfebef65a2caec5
  Stored in directory: /root/.cache/pip/wheels/cc/af/1a/498a24d0730ef484019e007bb9e8cef3ac00311a672c049a3e

[2020-02-12 12:07:47,574] INFO -   Building wheel for wrapt (setup.py): started

-[2020-02-12 12:07:48,512] INFO -   Building wheel for wrapt (setup.py): finished with status 'done'

[2020-02-12 12:07:48,514] INFO -   Created wheel for wrapt: filename=wrapt-1.11.2-cp37-cp37m-linux_x86_64.whl size=76117 sha256=b8aa2745a412b5ae4102f26acfb01146f610ad0a528c7057e2f1dedb1a8e5d21

[2020-02-12 12:07:48,514] INFO -   Stored in directory: /root/.cache/pip/wheels/23/5f/62/304b411f20be41821465a82bc98baabc5e68c3cdd1eb99db71

[2020-02-12 12:07:48,515] INFO -   Building wheel for termcolor (setup.py): started

\[2020-02-12 12:07:48,774] INFO -   Building wheel for termcolor (setup.py): finished with status 'done'

[2020-02-12 12:07:48,775] INFO -   Created wheel for termcolor: filename=termcolor-1.1.0-py3-none-any.whl size=4830 sha256=c710ae3677895119ac4f567c64281d79bb5e1eac8440f60bdeefb18f21d58187
  Stored in directory: /root/.cache/pip/wheels/3f/e3/ec/8a8336ff196023622fbcb36de0c5a5c218cbb24111d1d4c7f2

[2020-02-12 12:07:48,777] INFO -   Building wheel for Mako (setup.py): started

|[2020-02-12 12:07:49,110] INFO -   Building wheel for Mako (setup.py): finished with status 'done'

[2020-02-12 12:07:49,111] INFO -   Created wheel for Mako: filename=Mako-1.1.1-py3-none-any.whl size=75409 sha256=67e415303422970e2d7976be0c35faba7f855f953a9d43d0d926d8697e597e0f

[2020-02-12 12:07:49,112] INFO -   Stored in directory: /root/.cache/pip/wheels/11/fe/fa/3693b62cf5ec2b2784b6496734f0ee3e2321eb66d66607e5f9

[2020-02-12 12:07:49,113] INFO - Successfully built prometheus-client python-json-logger sqlalchemy cerberus tabulate alembic absl-py wrapt termcolor Mako

\[2020-02-12 12:07:49,626] INFO - Installing collected packages: prometheus-client, grpcio, ruamel.yaml.clib, ruamel.yaml, python-json-logger, configparser, sqlalchemy, websocket-client, docker, pyparsing, packaging, cerberus, python-dateutil, protobuf, tabulate, itsdangerous, Werkzeug, MarkupSafe, Jinja2, click, flask, humanfriendly, jmespath, docutils, botocore, s3transfer, boto3, pytz, pandas, Mako, python-editor, alembic, bentoml, tensorflow-estimator, markdown, absl-py, tensorboard, keras-preprocessing, astor, h5py, keras-applications, wrapt, gast, google-pasta, termcolor, tensorflow

|[2020-02-12 12:08:13,342] INFO - Successfully installed Jinja2-2.11.1 Mako-1.1.1 MarkupSafe-1.1.1 Werkzeug-1.0.0 absl-py-0.9.0 alembic-1.4.0 astor-0.8.1 bentoml-0.6.2 boto3-1.11.15 botocore-1.14.15 cerberus-1.3.2 click-7.0 configparser-4.0.2 docker-4.2.0 docutils-0.15.2 flask-1.1.1 gast-0.3.3 google-pasta-0.1.8 grpcio-1.27.1 h5py-2.10.0 humanfriendly-6.1 itsdangerous-1.1.0 jmespath-0.9.4 keras-applications-1.0.8 keras-preprocessing-1.1.0 markdown-3.2 packaging-20.1 pandas-1.0.1 prometheus-client-0.7.1 protobuf-3.11.3 pyparsing-2.4.6 python-dateutil-2.8.0 python-editor-1.0.4 python-json-logger-0.1.11 pytz-2019.3 ruamel.yaml-0.16.10 ruamel.yaml.clib-0.2.0 s3transfer-0.3.3 sqlalchemy-1.3.13 tabulate-0.8.6 tensorboard-1.14.0 tensorflow-1.14.0 tensorflow-estimator-1.14.0 termcolor-1.1.0 websocket-client-0.57.0 wrapt-1.11.2

/[2020-02-12 12:08:29,721] INFO -  ---> 2bcd24be9cb1

[2020-02-12 12:08:29,723] INFO - Step 9/11 : RUN if [ -f /bento/bentoml_init.sh ]; then /bin/bash -c /bento/bentoml_init.sh; fi
[2020-02-12 12:08:29,724] INFO - 

\[2020-02-12 12:08:29,865] INFO -  ---> Running in 508342b9bc74

\[2020-02-12 12:08:31,159] INFO -  ---> 2d337314a7c8

[2020-02-12 12:08:31,159] INFO - Step 10/11 : RUN if [ -f /opt/program/setup.sh ]; then /bin/bash -c /opt/program/setup.sh; fi
[2020-02-12 12:08:31,159] INFO - 

/[2020-02-12 12:08:31,281] INFO -  ---> Running in 9b82afbf79fc

|[2020-02-12 12:08:32,706] INFO -  ---> f984ff5382d2

[2020-02-12 12:08:32,706] INFO - Step 11/11 : ENV PATH="/opt/program:${PATH}"
[2020-02-12 12:08:32,706] INFO - 

-[2020-02-12 12:08:32,872] INFO -  ---> Running in d80640be8a63

\[2020-02-12 12:08:33,156] INFO -  ---> 2eff6fa9df16

[2020-02-12 12:08:33,176] INFO - Successfully built 2eff6fa9df16

[2020-02-12 12:08:33,183] INFO - Successfully tagged 192023623294.dkr.ecr.us-west-2.amazonaws.com/kerastextclassificationservice-sagemaker:20200211173435_F31009

|[2020-02-12 12:08:33,504] DEBUG - Pushing image to AWS ECR at 192023623294.dkr.ecr.us-west-2.amazonaws.com/kerastextclassificationservice-sagemaker:20200211173435_F31009
/[2020-02-12 12:09:41,929] DEBUG - Finished pushing image: 192023623294.dkr.ecr.us-west-2.amazonaws.com/kerastextclassificationservice-sagemaker:20200211173435_F31009
[2020-02-12 12:09:41,932] DEBUG - BentoML in debug mode, keeping temp directory "/private/var/folders/kn/xnc9k74x03567n1mx2tfqnpr0000gn/T/bentoml-temp-kdbp6qz8"
-[2020-02-12 12:09:43,082] DEBUG - AWS create model response: {'ModelArn': 'arn:aws:sagemaker:us-west-2:192023623294:model/bobo-keras-text-c-kerastextclassificat-20200211173435-f31009', 'ResponseMetadata': {'RequestId': 'af144e96-ed35-4e6d-867e-efdc10ca8699', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': 'af144e96-ed35-4e6d-867e-efdc10ca8699', 'content-type': 'application/x-amz-json-1.1', 'content-length': '122', 'date': 'Wed, 12 Feb 2020 20:09:42 GMT'}, 'RetryAttempts': 0}}
[2020-02-12 12:09:43,082] DEBUG - Creating Sagemaker endpoint bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009 configuration
/[2020-02-12 12:09:43,152] DEBUG - AWS create endpoint config response: {'EndpointConfigArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint-config/bobo-keras-text-c-kerastextclassificat-20200211173435-f31009', 'ResponseMetadata': {'RequestId': 'd700800c-d8f0-42b2-ae2d-35a5157a09f2', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': 'd700800c-d8f0-42b2-ae2d-35a5157a09f2', 'content-type': 'application/x-amz-json-1.1', 'content-length': '141', 'date': 'Wed, 12 Feb 2020 20:09:42 GMT'}, 'RetryAttempts': 0}}
[2020-02-12 12:09:43,152] DEBUG - Creating sagemaker endpoint bobo-keras-text-classify
|[2020-02-12 12:09:43,325] DEBUG - AWS create endpoint response: {'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'ResponseMetadata': {'RequestId': '5d3ab8ae-510e-411c-b925-09f80bab3efe', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '5d3ab8ae-510e-411c-b925-09f80bab3efe', 'content-type': 'application/x-amz-json-1.1', 'content-length': '92', 'date': 'Wed, 12 Feb 2020 20:09:43 GMT'}, 'RetryAttempts': 0}}
[2020-02-12 12:09:43,342] INFO - ApplyDeployment (keras-text-classify, namespace bobo) succeeded
-[2020-02-12 12:09:43,571] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '5a90db62-bf51-4765-abb7-5ff9bdffa482', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '5a90db62-bf51-4765-abb7-5ff9bdffa482', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:09:42 GMT'}, 'RetryAttempts': 0}}
\[2020-02-12 12:09:48,775] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '7afa4a4f-a658-439b-bea3-daa69a5b5c3b', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '7afa4a4f-a658-439b-bea3-daa69a5b5c3b', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:09:47 GMT'}, 'RetryAttempts': 0}}
|[2020-02-12 12:09:53,982] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': 'b66d3b51-adf9-4801-b66a-8fa43faf0090', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': 'b66d3b51-adf9-4801-b66a-8fa43faf0090', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:09:53 GMT'}, 'RetryAttempts': 0}}
/[2020-02-12 12:09:59,302] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '2c61da90-0a62-47ec-8a00-cbe80e9ea2c5', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '2c61da90-0a62-47ec-8a00-cbe80e9ea2c5', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:09:58 GMT'}, 'RetryAttempts': 0}}
-[2020-02-12 12:10:04,869] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '22e373a5-c16c-4d45-8944-e1e20075c15a', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '22e373a5-c16c-4d45-8944-e1e20075c15a', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:10:03 GMT'}, 'RetryAttempts': 0}}
|[2020-02-12 12:10:10,091] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '161a4c03-188a-41cd-992f-c6ef7c4234a9', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '161a4c03-188a-41cd-992f-c6ef7c4234a9', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:10:10 GMT'}, 'RetryAttempts': 0}}
/[2020-02-12 12:10:15,354] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '77852139-18be-4cf9-ab8c-4488442147f3', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '77852139-18be-4cf9-ab8c-4488442147f3', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:10:15 GMT'}, 'RetryAttempts': 0}}
\[2020-02-12 12:10:20,876] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '6443aca4-9842-4082-9964-accdfb5ab9ee', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '6443aca4-9842-4082-9964-accdfb5ab9ee', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:10:19 GMT'}, 'RetryAttempts': 0}}
|[2020-02-12 12:10:26,150] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': 'f8b8a5cb-4287-4057-b266-81f0bd76cf33', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': 'f8b8a5cb-4287-4057-b266-81f0bd76cf33', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:10:25 GMT'}, 'RetryAttempts': 0}}
|[2020-02-12 12:10:31,936] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '8c216444-0d17-4f98-b70d-af5b192587a3', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '8c216444-0d17-4f98-b70d-af5b192587a3', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:10:31 GMT'}, 'RetryAttempts': 0}}
\[2020-02-12 12:10:37,399] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '5cd706ed-3be5-43eb-aebf-637523887435', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '5cd706ed-3be5-43eb-aebf-637523887435', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:10:37 GMT'}, 'RetryAttempts': 0}}
|[2020-02-12 12:10:42,604] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': 'f5fd772d-78fb-497c-8278-0df98236dee5', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': 'f5fd772d-78fb-497c-8278-0df98236dee5', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:10:41 GMT'}, 'RetryAttempts': 0}}
-[2020-02-12 12:10:47,828] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '3b473554-8202-4fbf-bc85-41d4a69cbb22', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '3b473554-8202-4fbf-bc85-41d4a69cbb22', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:10:47 GMT'}, 'RetryAttempts': 0}}
\[2020-02-12 12:10:53,082] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '7357194a-1882-4ab2-a9fb-1519fb56d176', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '7357194a-1882-4ab2-a9fb-1519fb56d176', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:10:52 GMT'}, 'RetryAttempts': 0}}
|[2020-02-12 12:10:58,321] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '0bf16ecd-2b17-4462-a520-6dc39bb584cf', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '0bf16ecd-2b17-4462-a520-6dc39bb584cf', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:10:58 GMT'}, 'RetryAttempts': 0}}
|[2020-02-12 12:11:03,681] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '44ecbf87-6a7e-45bf-bab5-56cefaae504f', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '44ecbf87-6a7e-45bf-bab5-56cefaae504f', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:11:03 GMT'}, 'RetryAttempts': 0}}
/[2020-02-12 12:11:08,895] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': 'd12bdf14-8c57-4754-a833-4e4ce5cb0c0d', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': 'd12bdf14-8c57-4754-a833-4e4ce5cb0c0d', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:11:08 GMT'}, 'RetryAttempts': 0}}
-[2020-02-12 12:11:14,165] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '21e600a6-3076-4794-8bb5-f3d0c0a3f8c6', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '21e600a6-3076-4794-8bb5-f3d0c0a3f8c6', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:11:14 GMT'}, 'RetryAttempts': 0}}
|[2020-02-12 12:11:19,365] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '2c4e74e6-1be1-4804-9e6a-90de94faf2b7', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '2c4e74e6-1be1-4804-9e6a-90de94faf2b7', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:11:19 GMT'}, 'RetryAttempts': 0}}
/[2020-02-12 12:11:24,604] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '1cbd1336-305b-4358-9412-bebf071c1d85', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '1cbd1336-305b-4358-9412-bebf071c1d85', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:11:24 GMT'}, 'RetryAttempts': 0}}
-[2020-02-12 12:11:29,798] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': 'f692cea8-13d2-42ae-b806-2383f1f61e32', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': 'f692cea8-13d2-42ae-b806-2383f1f61e32', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:11:29 GMT'}, 'RetryAttempts': 0}}
|[2020-02-12 12:11:34,978] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '8bf4a6fd-d5b7-49ad-a6eb-e67fac44dbaf', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '8bf4a6fd-d5b7-49ad-a6eb-e67fac44dbaf', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:11:34 GMT'}, 'RetryAttempts': 0}}
/[2020-02-12 12:11:40,196] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': 'e28d9ef8-3021-44c4-930b-9177b348d0e1', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': 'e28d9ef8-3021-44c4-930b-9177b348d0e1', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:11:39 GMT'}, 'RetryAttempts': 0}}
\[2020-02-12 12:11:45,382] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '5d8eaa83-d784-4538-b538-caba92f1a449', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '5d8eaa83-d784-4538-b538-caba92f1a449', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:11:44 GMT'}, 'RetryAttempts': 0}}
|[2020-02-12 12:11:50,585] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '532e5432-13e5-4378-b078-33926f267a1d', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '532e5432-13e5-4378-b078-33926f267a1d', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:11:50 GMT'}, 'RetryAttempts': 0}}
/[2020-02-12 12:11:55,845] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': 'b6e500bf-10d5-4c8d-9644-eb55b584030e', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': 'b6e500bf-10d5-4c8d-9644-eb55b584030e', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:11:55 GMT'}, 'RetryAttempts': 0}}
\[2020-02-12 12:12:01,067] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '56551dad-9752-434b-a61f-27656c10c021', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '56551dad-9752-434b-a61f-27656c10c021', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:12:00 GMT'}, 'RetryAttempts': 0}}
|[2020-02-12 12:12:06,254] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': 'a517e519-de8e-4f15-8512-04432166c0e0', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': 'a517e519-de8e-4f15-8512-04432166c0e0', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:12:05 GMT'}, 'RetryAttempts': 0}}
-[2020-02-12 12:12:11,449] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '629d9595-c6ae-463a-8c6b-00df368affdc', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '629d9595-c6ae-463a-8c6b-00df368affdc', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:12:10 GMT'}, 'RetryAttempts': 0}}
|[2020-02-12 12:12:16,627] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '87c5ede8-58e2-481a-a7fc-ca092cb2751e', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '87c5ede8-58e2-481a-a7fc-ca092cb2751e', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:12:16 GMT'}, 'RetryAttempts': 0}}
/[2020-02-12 12:12:21,899] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': 'd9cf8d2a-6868-4469-839c-86c49ef67f2b', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': 'd9cf8d2a-6868-4469-839c-86c49ef67f2b', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:12:20 GMT'}, 'RetryAttempts': 0}}
\[2020-02-12 12:12:27,086] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': 'd6f814e5-288a-4f97-9319-864b4854bc92', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': 'd6f814e5-288a-4f97-9319-864b4854bc92', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:12:26 GMT'}, 'RetryAttempts': 0}}
/[2020-02-12 12:12:32,269] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '5fce84fd-e0f5-40c9-aa4c-b8336fa49e03', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '5fce84fd-e0f5-40c9-aa4c-b8336fa49e03', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:12:32 GMT'}, 'RetryAttempts': 0}}
-[2020-02-12 12:12:37,456] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '053ddd70-a730-4f27-9a85-717139805a05', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '053ddd70-a730-4f27-9a85-717139805a05', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:12:36 GMT'}, 'RetryAttempts': 0}}
|[2020-02-12 12:12:42,672] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '03009dfb-1f18-4c7c-b745-e3397946d4b2', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '03009dfb-1f18-4c7c-b745-e3397946d4b2', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:12:42 GMT'}, 'RetryAttempts': 0}}
-[2020-02-12 12:12:47,858] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '4aaea1f1-6ef4-497c-85f0-953335ca7bbe', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '4aaea1f1-6ef4-497c-85f0-953335ca7bbe', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:12:47 GMT'}, 'RetryAttempts': 0}}
\[2020-02-12 12:12:53,048] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '500280eb-c87f-481c-9b31-fe43245184f4', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '500280eb-c87f-481c-9b31-fe43245184f4', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:12:52 GMT'}, 'RetryAttempts': 0}}
/[2020-02-12 12:12:58,235] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '50df17ba-e464-4a12-b435-b1f12b027150', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '50df17ba-e464-4a12-b435-b1f12b027150', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:12:58 GMT'}, 'RetryAttempts': 0}}
\[2020-02-12 12:13:03,434] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '773bf262-bf4c-4c74-ae81-ea883494a08c', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '773bf262-bf4c-4c74-ae81-ea883494a08c', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:13:03 GMT'}, 'RetryAttempts': 0}}
|[2020-02-12 12:13:08,661] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': 'a09fc9b3-036e-4033-a209-fd086724115a', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': 'a09fc9b3-036e-4033-a209-fd086724115a', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:13:07 GMT'}, 'RetryAttempts': 0}}
/[2020-02-12 12:13:13,856] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '53b297fc-f3ba-41c2-a4d6-dd9f4bd0d228', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '53b297fc-f3ba-41c2-a4d6-dd9f4bd0d228', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:13:13 GMT'}, 'RetryAttempts': 0}}
\[2020-02-12 12:13:19,034] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '14763233-087b-4983-a2cc-8f244e519d6b', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '14763233-087b-4983-a2cc-8f244e519d6b', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:13:18 GMT'}, 'RetryAttempts': 0}}
|[2020-02-12 12:13:24,252] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '11535b6a-5a6a-49b5-8bc1-124a7c7ca155', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '11535b6a-5a6a-49b5-8bc1-124a7c7ca155', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:13:23 GMT'}, 'RetryAttempts': 0}}
-[2020-02-12 12:13:29,445] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': 'df2526b3-c024-47b9-81ab-44c604b250a2', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': 'df2526b3-c024-47b9-81ab-44c604b250a2', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:13:29 GMT'}, 'RetryAttempts': 0}}
\[2020-02-12 12:13:34,618] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '8a9ac511-7809-4145-b2a6-ba97b6359cdf', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '8a9ac511-7809-4145-b2a6-ba97b6359cdf', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:13:34 GMT'}, 'RetryAttempts': 0}}
/[2020-02-12 12:13:39,821] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '90733cc1-2ab9-4e66-a73c-45137905d802', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '90733cc1-2ab9-4e66-a73c-45137905d802', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:13:38 GMT'}, 'RetryAttempts': 0}}
-[2020-02-12 12:13:45,019] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '7804c42b-9a51-4135-833a-162af328a205', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '7804c42b-9a51-4135-833a-162af328a205', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:13:44 GMT'}, 'RetryAttempts': 0}}
|[2020-02-12 12:13:50,208] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': 'aa947895-6e7e-42c8-ae2d-3036fec2dacc', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': 'aa947895-6e7e-42c8-ae2d-3036fec2dacc', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:13:49 GMT'}, 'RetryAttempts': 0}}
/[2020-02-12 12:13:55,395] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': 'c4799dc4-79dd-4710-8c14-6ed6e9e44cee', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': 'c4799dc4-79dd-4710-8c14-6ed6e9e44cee', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:13:55 GMT'}, 'RetryAttempts': 0}}
\[2020-02-12 12:14:00,573] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '18a08516-a21f-4cee-9f8c-e96583159e9b', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '18a08516-a21f-4cee-9f8c-e96583159e9b', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:14:00 GMT'}, 'RetryAttempts': 0}}
|[2020-02-12 12:14:05,757] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '1aedff21-e17d-410b-b493-f388de014419', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '1aedff21-e17d-410b-b493-f388de014419', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:14:05 GMT'}, 'RetryAttempts': 0}}
-[2020-02-12 12:14:10,947] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': 'c5d9d956-0bb7-4151-a273-999fff9f854a', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': 'c5d9d956-0bb7-4151-a273-999fff9f854a', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:14:10 GMT'}, 'RetryAttempts': 0}}
|[2020-02-12 12:14:16,141] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '074ba6a9-3121-4544-857c-9ad2c2f9cfc0', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '074ba6a9-3121-4544-857c-9ad2c2f9cfc0', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:14:15 GMT'}, 'RetryAttempts': 0}}
/[2020-02-12 12:14:21,328] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': 'f2ba6ecc-bb83-47e8-8c8b-810bf5c85998', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': 'f2ba6ecc-bb83-47e8-8c8b-810bf5c85998', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:14:20 GMT'}, 'RetryAttempts': 0}}
\[2020-02-12 12:14:26,568] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': 'c451778b-93f9-4205-9d91-a2fb169678bf', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': 'c451778b-93f9-4205-9d91-a2fb169678bf', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:14:26 GMT'}, 'RetryAttempts': 0}}
/[2020-02-12 12:14:31,755] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '9e9aa1b5-9637-4971-ba0e-e9d8ee14569e', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '9e9aa1b5-9637-4971-ba0e-e9d8ee14569e', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:14:31 GMT'}, 'RetryAttempts': 0}}
-[2020-02-12 12:14:36,954] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '54b1b9f9-cc38-4185-b282-10b0b75f841e', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '54b1b9f9-cc38-4185-b282-10b0b75f841e', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:14:36 GMT'}, 'RetryAttempts': 0}}
|[2020-02-12 12:14:42,136] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '59e12428-441f-4801-b8e9-5674e8ad3069', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '59e12428-441f-4801-b8e9-5674e8ad3069', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:14:41 GMT'}, 'RetryAttempts': 0}}
/[2020-02-12 12:14:47,315] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '25b80454-901b-4ef0-a2f9-478c355d936d', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '25b80454-901b-4ef0-a2f9-478c355d936d', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:14:47 GMT'}, 'RetryAttempts': 0}}
\[2020-02-12 12:14:52,512] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': 'bfa7a8a6-0998-42ce-b9e5-576088b8c3d7', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': 'bfa7a8a6-0998-42ce-b9e5-576088b8c3d7', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:14:52 GMT'}, 'RetryAttempts': 0}}
|[2020-02-12 12:14:57,717] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '0cd6cc89-9709-4851-95be-c5ff1ac1ce2c', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '0cd6cc89-9709-4851-95be-c5ff1ac1ce2c', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:14:57 GMT'}, 'RetryAttempts': 0}}
/[2020-02-12 12:15:02,904] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '00b5a871-8523-4c64-9704-88ce3c8348fc', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '00b5a871-8523-4c64-9704-88ce3c8348fc', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:15:02 GMT'}, 'RetryAttempts': 0}}
\[2020-02-12 12:15:08,090] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '626acb71-410d-4050-a02a-2d3bcb9b1eac', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '626acb71-410d-4050-a02a-2d3bcb9b1eac', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:15:07 GMT'}, 'RetryAttempts': 0}}
|[2020-02-12 12:15:13,288] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '544f4b37-3072-46ac-abaf-f1a88f6d9bd5', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '544f4b37-3072-46ac-abaf-f1a88f6d9bd5', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:15:12 GMT'}, 'RetryAttempts': 0}}
-[2020-02-12 12:15:18,479] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '305be8e8-5801-4bb6-8cba-d2fb027f806c', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '305be8e8-5801-4bb6-8cba-d2fb027f806c', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:15:17 GMT'}, 'RetryAttempts': 0}}
/[2020-02-12 12:15:23,898] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': 'bf74f7c8-c24d-4af4-b408-209f6c902621', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': 'bf74f7c8-c24d-4af4-b408-209f6c902621', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:15:23 GMT'}, 'RetryAttempts': 0}}
-[2020-02-12 12:15:29,088] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '4339f2c2-50a4-4fb7-9b43-d90d64b7af95', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '4339f2c2-50a4-4fb7-9b43-d90d64b7af95', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:15:28 GMT'}, 'RetryAttempts': 0}}
\[2020-02-12 12:15:34,273] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '16d6effe-9d24-4163-b61a-84860e7d700b', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '16d6effe-9d24-4163-b61a-84860e7d700b', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:15:33 GMT'}, 'RetryAttempts': 0}}
/[2020-02-12 12:15:39,466] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '258c30bc-555c-4eca-beb5-9b835ffabe04', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '258c30bc-555c-4eca-beb5-9b835ffabe04', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:15:38 GMT'}, 'RetryAttempts': 0}}
-[2020-02-12 12:15:44,649] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': 'c6323db6-7e74-4837-9014-985c36ceb41a', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': 'c6323db6-7e74-4837-9014-985c36ceb41a', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:15:43 GMT'}, 'RetryAttempts': 0}}
|[2020-02-12 12:15:49,834] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': 'b6db6aa8-6378-41d3-8a6d-5c812441fe2f', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': 'b6db6aa8-6378-41d3-8a6d-5c812441fe2f', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:15:48 GMT'}, 'RetryAttempts': 0}}
/[2020-02-12 12:15:55,014] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '4d163315-1586-461a-93bd-d77229d0e70e', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '4d163315-1586-461a-93bd-d77229d0e70e', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:15:54 GMT'}, 'RetryAttempts': 0}}
\[2020-02-12 12:16:00,211] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '79ceb70f-f3f7-412f-a71e-37fb176c544c', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '79ceb70f-f3f7-412f-a71e-37fb176c544c', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:15:59 GMT'}, 'RetryAttempts': 0}}
|[2020-02-12 12:16:05,405] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '3a020d8b-131b-488b-89d3-fc19dac048d5', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '3a020d8b-131b-488b-89d3-fc19dac048d5', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:16:04 GMT'}, 'RetryAttempts': 0}}
-[2020-02-12 12:16:10,590] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': 'bd6eaa69-6761-42c0-9716-006a2d490d98', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': 'bd6eaa69-6761-42c0-9716-006a2d490d98', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:16:10 GMT'}, 'RetryAttempts': 0}}
-[2020-02-12 12:16:15,850] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '60ee4e5e-c76e-4c05-b187-a2918a2b0e0e', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '60ee4e5e-c76e-4c05-b187-a2918a2b0e0e', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:16:15 GMT'}, 'RetryAttempts': 0}}
|[2020-02-12 12:16:21,026] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': 'f77a07e3-4ee2-4311-993b-d14e6fc34f7a', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': 'f77a07e3-4ee2-4311-993b-d14e6fc34f7a', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:16:20 GMT'}, 'RetryAttempts': 0}}
-[2020-02-12 12:16:26,212] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': 'a2b70059-cb9e-46a2-b92e-da6dd191a5e4', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': 'a2b70059-cb9e-46a2-b92e-da6dd191a5e4', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:16:25 GMT'}, 'RetryAttempts': 0}}
\[2020-02-12 12:16:31,396] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '3acb3ca0-286a-4f3a-a9c9-840c565f6c53', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '3acb3ca0-286a-4f3a-a9c9-840c565f6c53', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:16:31 GMT'}, 'RetryAttempts': 0}}
/[2020-02-12 12:16:36,578] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '3ec9a75c-a71d-47b8-9df4-0486280afa18', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '3ec9a75c-a71d-47b8-9df4-0486280afa18', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:16:36 GMT'}, 'RetryAttempts': 0}}
-[2020-02-12 12:16:41,771] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '0cb7459c-a23a-4eac-8363-e9dfea67edf7', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '0cb7459c-a23a-4eac-8363-e9dfea67edf7', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:16:41 GMT'}, 'RetryAttempts': 0}}
|[2020-02-12 12:16:46,958] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '87069e97-b124-4502-abf9-4eb311951954', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '87069e97-b124-4502-abf9-4eb311951954', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:16:45 GMT'}, 'RetryAttempts': 0}}
-[2020-02-12 12:16:52,142] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '7df585d0-2b09-40f4-8231-4edebe3be029', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '7df585d0-2b09-40f4-8231-4edebe3be029', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:16:51 GMT'}, 'RetryAttempts': 0}}
\[2020-02-12 12:16:57,324] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': 'd6ff790a-4730-4b17-b38e-1c526b32af18', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': 'd6ff790a-4730-4b17-b38e-1c526b32af18', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:16:56 GMT'}, 'RetryAttempts': 0}}
/[2020-02-12 12:17:02,505] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '6dfbd20a-c191-4bca-9712-643dd3a48d74', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '6dfbd20a-c191-4bca-9712-643dd3a48d74', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:17:01 GMT'}, 'RetryAttempts': 0}}
-[2020-02-12 12:17:07,742] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': 'c9fd5d73-451a-469d-b6da-637148d7a69b', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': 'c9fd5d73-451a-469d-b6da-637148d7a69b', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:17:07 GMT'}, 'RetryAttempts': 0}}
\[2020-02-12 12:17:12,946] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': 'fc834c31-7730-4616-92fd-5f9276100c91', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': 'fc834c31-7730-4616-92fd-5f9276100c91', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:17:12 GMT'}, 'RetryAttempts': 0}}
/[2020-02-12 12:17:18,137] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '6e1832ed-a676-4b1f-bbf1-f955f9011828', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '6e1832ed-a676-4b1f-bbf1-f955f9011828', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:17:18 GMT'}, 'RetryAttempts': 0}}
\[2020-02-12 12:17:23,326] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': 'bfe370f9-83e3-4a8a-9f54-f943e9c5e1a4', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': 'bfe370f9-83e3-4a8a-9f54-f943e9c5e1a4', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:17:22 GMT'}, 'RetryAttempts': 0}}
/[2020-02-12 12:17:28,514] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '1036090e-3c1e-4e1d-9fc5-7ee64d43e611', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '1036090e-3c1e-4e1d-9fc5-7ee64d43e611', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:17:28 GMT'}, 'RetryAttempts': 0}}
/[2020-02-12 12:17:34,184] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '43c69420-969a-405f-80f5-dfaff23f6c11', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '43c69420-969a-405f-80f5-dfaff23f6c11', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:17:33 GMT'}, 'RetryAttempts': 0}}
\[2020-02-12 12:17:39,378] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': 'b46639b4-5fc9-46e4-b232-902b4cd39923', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': 'b46639b4-5fc9-46e4-b232-902b4cd39923', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:17:38 GMT'}, 'RetryAttempts': 0}}
|[2020-02-12 12:17:44,561] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '60eb7e18-8fe9-4baa-83fd-f7037b4eff72', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '60eb7e18-8fe9-4baa-83fd-f7037b4eff72', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:17:43 GMT'}, 'RetryAttempts': 0}}
-[2020-02-12 12:17:49,750] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '901ae4a0-e8ad-4899-93f6-e540f7cde058', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '901ae4a0-e8ad-4899-93f6-e540f7cde058', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:17:49 GMT'}, 'RetryAttempts': 0}}
|[2020-02-12 12:17:54,922] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'EndpointStatus': 'Creating', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '06549299-52c2-4b24-b09e-1c0131f5b26e', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '06549299-52c2-4b24-b09e-1c0131f5b26e', 'content-type': 'application/x-amz-json-1.1', 'content-length': '314', 'date': 'Wed, 12 Feb 2020 20:17:54 GMT'}, 'RetryAttempts': 0}}
/[2020-02-12 12:18:00,134] DEBUG - AWS describe endpoint response: {'EndpointName': 'bobo-keras-text-classify', 'EndpointArn': 'arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify', 'EndpointConfigName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'ProductionVariants': [{'VariantName': 'bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009', 'DeployedImages': [{'SpecifiedImage': '192023623294.dkr.ecr.us-west-2.amazonaws.com/kerastextclassificationservice-sagemaker:20200211173435_F31009', 'ResolvedImage': '192023623294.dkr.ecr.us-west-2.amazonaws.com/[email protected]:46acd36a60d948932547e299a7d4f3d5222edd5e97d288fc0f382e72ef104b6b', 'ResolutionTime': datetime.datetime(2020, 2, 12, 12, 9, 46, 139000, tzinfo=tzlocal())}], 'CurrentWeight': 1.0, 'DesiredWeight': 1.0, 'CurrentInstanceCount': 1, 'DesiredInstanceCount': 1}], 'EndpointStatus': 'InService', 'CreationTime': datetime.datetime(2020, 2, 12, 12, 9, 43, 287000, tzinfo=tzlocal()), 'LastModifiedTime': datetime.datetime(2020, 2, 12, 12, 17, 59, 859000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '8c356508-07e7-4bca-b8a1-5b0dbcf25d0e', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '8c356508-07e7-4bca-b8a1-5b0dbcf25d0e', 'content-type': 'application/x-amz-json-1.1', 'content-length': '865', 'date': 'Wed, 12 Feb 2020 20:17:59 GMT'}, 'RetryAttempts': 0}}
Successfully created AWS Sagemaker deployment keras-text-classify
{
  "namespace": "bobo",
  "name": "keras-text-classify",
  "spec": {
    "bentoName": "KerasTextClassificationService",
    "bentoVersion": "20200211173435_F31009",
    "operator": "AWS_SAGEMAKER",
    "sagemakerOperatorConfig": {
      "region": "us-west-2",
      "instanceType": "ml.m4.xlarge",
      "instanceCount": 1,
      "apiName": "predict"
    }
  },
  "state": {
    "state": "RUNNING",
    "infoJson": {
      "EndpointName": "bobo-keras-text-classify",
      "EndpointArn": "arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify",
      "EndpointConfigName": "bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009",
      "ProductionVariants": [
        {
          "VariantName": "bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009",
          "DeployedImages": [
            {
              "SpecifiedImage": "192023623294.dkr.ecr.us-west-2.amazonaws.com/kerastextclassificationservice-sagemaker:20200211173435_F31009",
              "ResolvedImage": "192023623294.dkr.ecr.us-west-2.amazonaws.com/[email protected]:46acd36a60d948932547e299a7d4f3d5222edd5e97d288fc0f382e72ef104b6b",
              "ResolutionTime": "2020-02-12 12:09:46.139000-08:00"
            }
          ],
          "CurrentWeight": 1.0,
          "DesiredWeight": 1.0,
          "CurrentInstanceCount": 1,
          "DesiredInstanceCount": 1
        }
      ],
      "EndpointStatus": "InService",
      "CreationTime": "2020-02-12 12:09:43.287000-08:00",
      "LastModifiedTime": "2020-02-12 12:17:59.859000-08:00",
      "ResponseMetadata": {
        "RequestId": "8c356508-07e7-4bca-b8a1-5b0dbcf25d0e",
        "HTTPStatusCode": 200,
        "HTTPHeaders": {
          "x-amzn-requestid": "8c356508-07e7-4bca-b8a1-5b0dbcf25d0e",
          "content-type": "application/x-amz-json-1.1",
          "content-length": "865",
          "date": "Wed, 12 Feb 2020 20:17:59 GMT"
        },
        "RetryAttempts": 0
      }
    },
    "timestamp": "2020-02-12T20:18:00.135448Z"
  },
  "createdAt": "2020-02-12T20:06:56.831590Z",
  "lastUpdatedAt": "2020-02-12T20:06:56.831636Z"
}

Use bentoml sagemaker list to display all sagemaker deployments with BentoML

In [ ]:
!bentoml sagemaker list

To get the latest deployment state and information, use bentoml sagemaker get command

In [57]:
!bentoml sagemaker get keras-text-classify
{
  "namespace": "bobo",
  "name": "keras-text-classify",
  "spec": {
    "bentoName": "KerasTextClassificationService",
    "bentoVersion": "20200211173435_F31009",
    "operator": "AWS_SAGEMAKER",
    "sagemakerOperatorConfig": {
      "region": "us-west-2",
      "instanceType": "ml.m4.xlarge",
      "instanceCount": 1,
      "apiName": "predict"
    }
  },
  "state": {
    "state": "RUNNING",
    "infoJson": {
      "EndpointName": "bobo-keras-text-classify",
      "EndpointArn": "arn:aws:sagemaker:us-west-2:192023623294:endpoint/bobo-keras-text-classify",
      "EndpointConfigName": "bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009",
      "ProductionVariants": [
        {
          "VariantName": "bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009",
          "DeployedImages": [
            {
              "SpecifiedImage": "192023623294.dkr.ecr.us-west-2.amazonaws.com/kerastextclassificationservice-sagemaker:20200211173435_F31009",
              "ResolvedImage": "192023623294.dkr.ecr.us-west-2.amazonaws.com/[email protected]:46acd36a60d948932547e299a7d4f3d5222edd5e97d288fc0f382e72ef104b6b",
              "ResolutionTime": "2020-02-12 12:09:46.139000-08:00"
            }
          ],
          "CurrentWeight": 1.0,
          "DesiredWeight": 1.0,
          "CurrentInstanceCount": 1,
          "DesiredInstanceCount": 1
        }
      ],
      "EndpointStatus": "InService",
      "CreationTime": "2020-02-12 12:09:43.287000-08:00",
      "LastModifiedTime": "2020-02-12 12:17:59.859000-08:00",
      "ResponseMetadata": {
        "RequestId": "7292d575-b65d-443e-8788-76d755e00b95",
        "HTTPStatusCode": 200,
        "HTTPHeaders": {
          "x-amzn-requestid": "7292d575-b65d-443e-8788-76d755e00b95",
          "content-type": "application/x-amz-json-1.1",
          "content-length": "865",
          "date": "Wed, 12 Feb 2020 20:18:51 GMT"
        },
        "RetryAttempts": 0
      }
    },
    "timestamp": "2020-02-12T20:18:52.376872Z"
  },
  "createdAt": "2020-02-12T20:06:56.831590Z",
  "lastUpdatedAt": "2020-02-12T20:06:56.831636Z"
}

We will use AWS CLI tool to test the deployment with sample data

In [58]:
!aws sagemaker-runtime invoke-endpoint --endpoint-name bobo-keras-text-classify \
--body '{"text": "best movie ever"}' --content-type application/json output.json && cat output.json
{
    "ContentType": "application/json",
    "InvokedProductionVariant": "bobo-keras-text-c-KerasTextClassificat-20200211173435-F31009"
}
[[1]]

bentoml sagemaker delete will delete the sagemaker deployment and related resources

In [59]:
!bentoml sagemaker delete keras-text-classify
Successfully deleted AWS Sagemaker deployment "keras-text-classify"
In [ ]: