diff --git a/README.md b/README.md index c867298e7e1a8c6bbc06aaba2ad2dc8f73518ae4..34e22a726282f9167e70a30cb792335ad171b34f 100644 --- a/README.md +++ b/README.md @@ -184,11 +184,6 @@ Here, `client.predict` function has two arguments. `feed` is a `python dict` wit
PaddleServing交流QQ群 PaddleServing微信群
### Slack diff --git a/python/examples/criteo_ctr_with_cube/test_client.py b/python/examples/criteo_ctr_with_cube/test_client.py index ca752b763e067b6a73e28c1d2ab9f58b9b98ba5d..8518db55572196e470da014a02797ae9e200c988 100755 --- a/python/examples/criteo_ctr_with_cube/test_client.py +++ b/python/examples/criteo_ctr_with_cube/test_client.py @@ -20,6 +20,8 @@ import criteo as criteo import time from paddle_serving_client.metric import auc +py_version = sys.version_info[0] + client = Client() client.load_client_config(sys.argv[1]) client.connect(["127.0.0.1:9292"]) @@ -34,7 +36,10 @@ label_list = [] prob_list = [] start = time.time() for ei in range(10000): - data = reader().next() + if py_version == 2: + data = reader().next() + else: + data = reader().__next__() feed_dict = {} feed_dict['dense_input'] = data[0][0] for i in range(1, 27):