Conversation
Add blanklines again
TomAugspurger
left a comment
There was a problem hiding this comment.
Thanks! Gave a quick pass through. Will look more later.
| X: ArrayLike, Y: ArrayLike, precomputed: bool = False | ||
| ) -> Tuple[ArrayLike, ArrayLike]: |
There was a problem hiding this comment.
I don't know typing well enough, but I think there's a way to say that the Type[X] will exactly match the type of the first element of the result tuple? So you know that if you put in a dask.Array you'll get back a dask.Array rather than an numpy.ndarray?
There was a problem hiding this comment.
I am not sure about this :/ .
| y_true: ArrayLike, | ||
| y_pred: ArrayLike, | ||
| sample_weight: Optional[ArrayLike] = None, | ||
| multioutput: Optional[str] = "uniform_average", |
There was a problem hiding this comment.
Would be good to check with scikit-learn what the actual supported types are. Can this be an array, which just isn't implemented yet?
There was a problem hiding this comment.
https://scikit-learn.org/stable/modules/generated/sklearn.metrics.mean_squared_error.html
multi_output is a string
|
If you merge master then the unrelated CI issues should be fixed. |
|
@TomAugspurger , Request your review. |
|
Can you add And there are some linting issues there which aren't failing the build. https://dev.azure.com/dask-dev/dask/_build/results?buildId=818&view=logs&j=34469798-9dec-5482-c96c-ad1eda9ec58d&t=3856b5af-eaa9-56ed-b4cc-e7b6fad51231&l=12 Can you fix those? I'll figure out why CI isn't failing. |
|
Thanks @TomAugspurger . I am working on the changes. |
|
Can you merge master? There will be a merge conflict with |
|
I think it should have worked. |
I think Or... perhaps add an Just FYI @rth @thomasjpfan. IIRC you're investigating type annotations for scikit-learn. I'm not sure if there's a way for us to share types, since we have different definitions of "ArrayLike", but we can coordinate in places where we overlap. |
|
Thanks :) |
|
@TomAugspurger , It's all good now :) |
|
Thanks, this looks good! |
@TomAugspurger As far as I know, in scikit-learn we won't type array like objects for now precisely because it's unclear what the type for "ArrayLike" input should be. So at least there shouldn't be an issue of types being over-constrained on the scikit-learn side. |
This is true of most things I think :) |
* Add annotations for metrics module
Changes made:
Partially fixes #607