Unverified Commit 23da5fc5 authored by James Lamb's avatar James Lamb Committed by GitHub
Browse files

[python] add type hints on sklearn metric and eval wrappers (#5238)

parent 1a3afd2d
......@@ -83,7 +83,7 @@ class _ObjectiveFunctionWrapper:
"""
self.func = func
def __call__(self, preds, dataset):
def __call__(self, preds: np.ndarray, dataset: Dataset) -> Tuple[np.ndarray, np.ndarray]:
"""Call passed function with appropriate arguments.
Parameters
......@@ -165,7 +165,7 @@ class _EvalFunctionWrapper:
"""
self.func = func
def __call__(self, preds, dataset):
def __call__(self, preds: np.ndarray, dataset: Dataset) -> Tuple[str, float, bool]:
"""Call passed function with appropriate arguments.
Parameters
......
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