Merge pull request #393 from jpata/wrapper-dict-fix

fix wrapper dict issue #392 thanks! merged
This commit is contained in:
Tianqi Chen 2015-07-14 08:53:37 -07:00
commit 71cd9b9000

View File

@ -777,7 +777,7 @@ def train(params, dtrain, num_boost_round=10, evals=(), obj=None, feval=None,
bst = Booster(params, [dtrain] + [d[0] for d in evals]) bst = Booster(params, [dtrain] + [d[0] for d in evals])
if evals_result is not None: if evals_result is not None:
if isinstance(evals_result, dict): if not isinstance(evals_result, dict):
raise TypeError('evals_result has to be a dictionary') raise TypeError('evals_result has to be a dictionary')
else: else:
evals_name = [d[1] for d in evals] evals_name = [d[1] for d in evals]