diff --git a/python/examples/bert/benchmark_batch.py b/python/examples/bert/benchmark_batch.py index 872799e64ea599554e42264c37ab5f574c0acb13..265521d484259b0e6ea2b182dbf61e2a5cf43b8d 100644 --- a/python/examples/bert/benchmark_batch.py +++ b/python/examples/bert/benchmark_batch.py @@ -57,8 +57,7 @@ def single_func(idx, resource): os.getpid(), int(round(b_start * 1000000)), int(round(b_end * 1000000)))) - result = client.batch_predict( - feed_batch=feed_batch, fetch=fetch) + result = client.predict(feed_batch=feed_batch, fetch=fetch) else: print("unsupport batch size {}".format(args.batch_size)) diff --git a/python/examples/criteo_ctr/benchmark_batch.py b/python/examples/criteo_ctr/benchmark_batch.py index 47b63a6ade0c21bdc82a5c67d65b39ffc614e06c..ab67507355d0eba187d47ec9577eb5a3eda5dc46 100644 --- a/python/examples/criteo_ctr/benchmark_batch.py +++ b/python/examples/criteo_ctr/benchmark_batch.py @@ -55,8 +55,7 @@ def single_func(idx, resource): for i in range(1, 27): feed_dict["sparse_{}".format(i - 1)] = data[0][i] feed_batch.append(feed_dict) - result = client.batch_predict( - feed_batch=feed_batch, fetch=fetch) + result = client.predict(feed_batch=feed_batch, fetch=fetch) else: print("unsupport batch size {}".format(args.batch_size)) diff --git a/python/examples/imagenet/benchmark_batch.py b/python/examples/imagenet/benchmark_batch.py index 7477100971d1a098bb075c94f75490c16b53b862..915544d4f6f9d4636b14f4be92ad75ba08013389 100644 --- a/python/examples/imagenet/benchmark_batch.py +++ b/python/examples/imagenet/benchmark_batch.py @@ -50,8 +50,7 @@ def single_func(idx, resource): img = reader.process_image(img_list[i]) img = img.reshape(-1) feed_batch.append({"image": img}) - result = client.batch_predict( - feed_batch=feed_batch, fetch=fetch) + result = client.predict(feed_batch=feed_batch, fetch=fetch) else: print("unsupport batch size {}".format(args.batch_size)) diff --git a/python/examples/imdb/benchmark_batch.py b/python/examples/imdb/benchmark_batch.py index 302d63352ca20bf7e455ad1a66ead22f63dbe846..3ac52ec5472ff97f5d273dc230494223f3a71907 100644 --- a/python/examples/imdb/benchmark_batch.py +++ b/python/examples/imdb/benchmark_batch.py @@ -42,7 +42,7 @@ def single_func(idx, resource): for bi in range(args.batch_size): word_ids, label = imdb_dataset.get_words_and_label(line) feed_batch.append({"words": word_ids}) - result = client.batch_predict( + result = client.predict( feed_batch=feed_batch, fetch=["prediction"]) else: print("unsupport batch size {}".format(args.batch_size))