Commit 17261566 authored by Yuxin Wu's avatar Yuxin Wu

don't warn too much about deprecation

parent b325e257
......@@ -12,6 +12,7 @@ from ..tfutils.tower import TowerContext
from ..input_source import PlaceholderInput
from ..utils.develop import log_deprecated
from ..utils.argtools import log_once
from ..utils.utils import execute_only_once
__all__ = ['PredictorBase', 'AsyncPredictorBase',
'OnlinePredictor', 'OfflinePredictor',
......@@ -41,6 +42,7 @@ class PredictorBase(object):
"""
if len(args) == 1 and isinstance(args[0], (list, tuple)):
dp = args[0] # backward-compatibility
if execute_only_once():
log_deprecated(
"Calling a predictor with one datapoint",
"Call it with positional arguments instead!",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment