Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dask] Add unit tests that signatures are the same between Dask and scikit-learn estimators #3911

Merged
merged 20 commits into from Feb 7, 2021

Conversation

ghost
Copy link

@ghost ghost commented Feb 5, 2021

I tried to check for a sublist in sklearn's args which matches dask's (this ensures that order is checked), the same goes for the
default values.

fixes #3907

@ghost
Copy link

ghost commented Feb 5, 2021

CLA assistant check
All CLA requirements met.

@ghost
Copy link
Author

ghost commented Feb 5, 2021

bunch of syntax and styling mistakes, my bad

Copy link
Collaborator

@jameslamb jameslamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for picking this up! I like the way you set this up with pytest.mark.parametrize. I left some suggestions for your consideration.

tests/python_package_test/test_dask.py Outdated Show resolved Hide resolved
tests/python_package_test/test_dask.py Outdated Show resolved Hide resolved
tests/python_package_test/test_dask.py Outdated Show resolved Hide resolved
@jameslamb
Copy link
Collaborator

I've edited your pull request description to include fixes #3907. This creates a link to that issue and will automatically close that issue when the PR is merged.

Copy link
Collaborator

@jameslamb jameslamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Please see my newest comments.

tests/python_package_test/test_dask.py Outdated Show resolved Hide resolved
tests/python_package_test/test_dask.py Outdated Show resolved Hide resolved
tests/python_package_test/test_dask.py Outdated Show resolved Hide resolved
tests/python_package_test/test_dask.py Outdated Show resolved Hide resolved
tests/python_package_test/test_dask.py Outdated Show resolved Hide resolved
tests/python_package_test/test_dask.py Outdated Show resolved Hide resolved
@ghost
Copy link
Author

ghost commented Feb 6, 2021

Now I understand why I was getting the TypeError: object of type 'NoneType' has no len().
It was because of that same issue that sklearn's fit() methods don't have **kwargs pass-through.

Copy link
Collaborator

@jameslamb jameslamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks! Please see my newest suggestion

tests/python_package_test/test_dask.py Outdated Show resolved Hide resolved
@jameslamb jameslamb marked this pull request as ready for review February 7, 2021 17:32
@jameslamb jameslamb self-requested a review February 7, 2021 17:35
Copy link
Collaborator

@jameslamb jameslamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks great, thanks very much for the contribution!

@jameslamb jameslamb merged commit 6f12784 into microsoft:master Feb 7, 2021
@ghost
Copy link
Author

ghost commented Feb 8, 2021

Thanks a lot for the guidance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[dask] Add unit tests that signatures are the same between Dask and scikit-learn estimators
2 participants