[dask] Add type hints. (#6519)

* Add validate_features.
* Show type hints in doc.

Co-authored-by: Hyunsu Cho <chohyu01@cs.washington.edu>
This commit is contained in:
Jiaming Yuan
2020-12-29 19:41:02 +08:00
committed by GitHub
parent 610ee632cc
commit de8fd852a5
9 changed files with 676 additions and 383 deletions

View File

@@ -171,10 +171,15 @@ jobs:
architecture: 'x64'
- name: Install Python packages
run: |
python -m pip install wheel setuptools mypy
python -m pip install wheel setuptools mypy dask[complete] distributed
- name: Run mypy
run: |
cd python-package && mypy . || true
cd python-package
# dask is required to pass, others are not
mypy ./xgboost/dask.py ../tests/python/test_with_dask.py --follow-imports=silent
mypy ../tests/python-gpu/test_gpu_with_dask.py --follow-imports=silent
# If any of the above failed, contributor won't see the next error.
mypy . || true
doxygen:
runs-on: ubuntu-latest