[tune] Fully deprecate raw function literals in Tune (#3788)

Related: https://github.com/ray-project/ray/issues/3785
This commit is contained in:
Eric Liang
2019-01-19 17:09:36 -08:00
committed by Richard Liaw
parent 16f7ca45e4
commit aad48ee5a5
4 changed files with 17 additions and 18 deletions
+2 -2
View File
@@ -238,8 +238,8 @@ def _is_resolved(v):
def _try_resolve(v):
if isinstance(v, types.FunctionType):
logger.warning(
"Deprecation warning: Function values are ambiguous in Tune "
raise DeprecationWarning(
"Function values are ambiguous in Tune "
"configuations. Either wrap the function with "
"`tune.function(func)` to specify a function literal, or "
"`tune.sample_from(func)` to tell Tune to "