diff --git a/python/paddle_serving_client/__init__.py b/python/paddle_serving_client/__init__.py index d9a4a3ff2d3550dfc2696c23d4ca208d8fa395dc..3fe508f707ca90d0291823d3a52e2d8dbc9fe71e 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]