From eb97dfbd96c24b361a7a1d7cd537ee8b11fa9197 Mon Sep 17 00:00:00 2001 From: guru4elephant Date: Sun, 22 Mar 2020 07:58:49 +0800 Subject: [PATCH] add check feed and fetch value --- python/paddle_serving_client/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python/paddle_serving_client/__init__.py b/python/paddle_serving_client/__init__.py index d9a4a3ff..3fe508f7 100644 --- a/python/paddle_serving_client/__init__.py +++ b/python/paddle_serving_client/__init__.py @@ -156,6 +156,9 @@ class Client(object): key)) def predict(self, feed=None, fetch=None): + if feed is None or fetch is None: + raise ValueError("You should specify feed and fetch for prediction") + fetch_list = [] if isinstance(fetch, str): fetch_list = [fetch] -- GitLab