rapidsai / cuml

cuML - RAPIDS Machine Learning Library
https://docs.rapids.ai/api/cuml/stable/
Apache License 2.0
4.22k stars 530 forks source link

[BUG] Test failures when env contains treelite > 0.9, but XGBoost is not installed #2466

Closed brandon-b-miller closed 6 months ago

brandon-b-miller commented 4 years ago

Describe the bug A few cuML tests in test_fil.py are marked as xfail if the treelite version is wrong. However if the test is not skipped it expects the function simulate_data to be defined, which only happens if xgboost is also installed at the same time. Therefore if your environment is configured with treelite>0.9 but is missing xgboost these tests fail with a NameError.

Steps/Code to reproduce bug Configure the environment as described above and run:

py.test test_fil.py -k test_fil_skl_classification

# NameError: name 'simulate_data' is not defined

Expected behavior Tests should pass or at least fail with an expected error.

Environment details (please complete the following information):

Additional context Environment file used to reproduce this error:

name: cudf_dev
channels:
  - rapidsai
  - nvidia
  - rapidsai-nightly
  - conda-forge
  - defaults
dependencies:
  - clang=8.0.1
  - clang-tools=8.0.1
  - cupy>=6.6.0,<8.0.0a0,!=7.1.0
  - rmm=0.15.*
  - cmake_setuptools>=0.1.3
  - python>=3.6,<3.8
  - numba>=0.49.0
  - numpy
  - pandas>=1.0,<1.1.0a0
  - pyarrow=0.17.1
  - fastavro>=0.22.9
  - notebook>=0.5.0
  - cython>=0.29,<0.30
  - fsspec>=0.6.0
  - sphinx
  - sphinx_rtd_theme
  - sphinxcontrib-websupport
  - nbsphinx
  - numpydoc
  - ipython
  - recommonmark
  - pandoc=<2.0.0
  - cudatoolkit=10.2
  - partd
  - flake8
  - black
  - isort
  - pre_commit
  - dask>=2.15.0
  - distributed>=2.15.0
  - streamz
  - dlpack
  - arrow-cpp=0.17.1
  - arrow-cpp-proc * cuda
  - boost-cpp>=1.72.0
  - double-conversion
  - rapidjson
  - flatbuffers
  - hypothesis
  - sphinx-markdown-tables
  - sphinx-copybutton
  - cmake=3.14.5
  - pytest>=4.6
  - pytest-timeout
  - scikit-learn>=0.21
  - umap-learn>=0.3.9
  - dask-cuda=0.15*
  - ucx-py=0.15*
  - nccl>=2.5
  - libcumlprims=0.15*
  - statsmodels
  - protobuf >=3.4.1,<4.0.0
  - treelite=0.92
  - doxygen
  - pip
  - pip:
      - git+https://github.com/dask/dask.git
      - git+https://github.com/dask/distributed.git
      - git+https://github.com/python-streamz/streamz.git
hcho3 commented 4 years ago

A few cuML tests in test_fil.py are marked as xfail if the treelite version is wrong

FYI, Treelite is now a hard dependency of cuML, and the tests are no longer marked with xfail. See commit https://github.com/rapidsai/cuml/commit/5772a491fa2825c9d032169c0a1e11afc3e0b7cb.

We still need to fix the problem of missing simulate_data().

dantegd commented 3 years ago

@hcho3 I believe this issue should be safe to close, right?

github-actions[bot] commented 3 years ago

This issue has been labeled inactive-30d due to no recent activity in the past 30 days. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed. This issue will be labeled inactive-90d if there is no activity in the next 60 days.