Skip to content

Conversation

@thomasjpfan
Copy link
Contributor

Fixes failing test on the main branch

@stsievert
Copy link
Member

stsievert commented Feb 9, 2021

Thanks for the PR @thomasjpfan.

Looks like the tests are CI tests are failing because of an unrelated linting issue w/ mypy.

linux38 CI job: linting output
Checking flake8...
Checking flake8... DONE
Checking black...
black, version 19.10b0
All done! ✨ 🍰 ✨
100 files would be left unchanged.
Checking black... DONE
Checking isort...
4.3.21
Skipped 2 files
Checking isort... DONE
Checking mypy...
dask_ml/metrics/regression.py:102: error: "ndarray" has no attribute "chunks"
dask_ml/metrics/pairwise.py:30: error: "ndarray" has no attribute "to_delayed"
dask_ml/metrics/pairwise.py:37: error: "ndarray" has no attribute "chunks"
dask_ml/metrics/pairwise.py:42: error: "ndarray" has no attribute "chunks"
dask_ml/metrics/pairwise.py:58: error: "ndarray" has no attribute "chunks"
dask_ml/metrics/pairwise.py:59: error: "ndarray" has no attribute "map_blocks"
dask_ml/metrics/pairwise.py:136: error: Argument 2 to "check_pairwise_arrays" has incompatible type "Optional[ndarray]"; expected "ndarray"
dask_ml/metrics/pairwise.py:144: error: Argument 2 to "check_pairwise_arrays" has incompatible type "Optional[ndarray]"; expected "ndarray"
dask_ml/metrics/pairwise.py:161: error: Argument 2 to "check_pairwise_arrays" has incompatible type "Optional[ndarray]"; expected "ndarray"
dask_ml/metrics/pairwise.py:176: error: Argument 2 to "check_pairwise_arrays" has incompatible type "Optional[ndarray]"; expected "ndarray"
dask_ml/metrics/pairwise.py:211: error: Argument 2 to "check_pairwise_arrays" has incompatible type "Optional[ndarray]"; expected "ndarray"
Found 11 errors in 2 files (checked 5 source files)
dask_ml/preprocessing/label.py:200: error: Incompatible default for argument "uniques" (default has type "None", argument has type "ndarray")
dask_ml/preprocessing/label.py:202: error: "ndarray" has no attribute "cat"
dask_ml/preprocessing/label.py:212: error: "ndarray" has no attribute "cat"
dask_ml/preprocessing/data.py:39: error: Incompatible types in assignment (expression has type "float", variable has type "ndarray")
dask_ml/preprocessing/data.py:78: error: Need type annotation for 'n_features_in_'
dask_ml/preprocessing/data.py:145: error: Need type annotation for 'n_features_in_'
dask_ml/preprocessing/data.py:229: error: Argument 1 to "_handle_zeros_in_scale" has incompatible type "List[float]"; expected "ndarray"
dask_ml/preprocessing/data.py:230: error: Need type annotation for 'n_features_in_'
dask_ml/preprocessing/_encoders.py:119: error: Incompatible default for argument "dtype" (default has type "Type[floating[Any]]", argument has type "dtype[Any]")
dask_ml/preprocessing/_block_transformer.py:74: error: Need type annotation for 'func'
Found 19 errors in 4 files (checked 5 source files)
Checking mypy... DONE
##[error]Bash exited with code '1'.

    Finishing: Lint

@jsignell
Copy link
Member

It seems like this one is good to merge then?

@stsievert
Copy link
Member

This PR LGTM.

@jsignell
Copy link
Member

Do you have merge access @stsievert? I don't :)

@stsievert
Copy link
Member

Nope, no merge access. I know @TomAugspurger does though.

@jsignell
Copy link
Member

And probably @jrbourbeau as well :) Seems like this one is good to go

Copy link
Member

@jrbourbeau jrbourbeau left a comment

Choose a reason for hiding this comment

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

Thanks @thomasjpfan! Merging as this is a definite improvement over our current CI failure situation. However I did want to point out that it appears this test isn't run on CI and is instead skipped here

pytestmark = pytest.mark.skip(reason="Missing tensorflow or scikeras")

In the future it'd be good to make sure we have a CI build with tensorflow and scikeras installed

@jrbourbeau jrbourbeau merged commit c964587 into dask:main Feb 24, 2021
@jsignell
Copy link
Member

Good point @jrbourbeau. It looks like keras and tensorflow are only installed when the branch is main. So the test ran once it was merged. I am not sure if that is intentional or not.

@thomasjpfan when it ran there it passed on all builds except earliest: https://dev.azure.com/dask-dev/6d1a2a76-7181-452f-943c-c034bbab2bfa/_apis/build/builds/1961/logs/39 this might just be an instance of we should bump the minimum requirements.

@stsievert
Copy link
Member

stsievert commented Feb 24, 2021

Hm... SciKeras raises an error if loss is None, but KerasClassifier defaults to loss=None. More discussion will happen in adriangb/scikeras#206.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants