Skip to content

remove unused dependencies#25

Merged
rapids-bot[bot] merged 4 commits intorapidsai:mainfrom
jameslamb:dependencies
Jan 14, 2026
Merged

remove unused dependencies#25
rapids-bot[bot] merged 4 commits intorapidsai:mainfrom
jameslamb:dependencies

Conversation

@jameslamb
Copy link
Copy Markdown
Member

In a couple reviews here, I've noticed what look like unnecessary dependencies carried over from cuML's configuration.

This removes those.

@jameslamb jameslamb added improvement Improves an existing functionality non-breaking Introduces a non-breaking change labels Jan 12, 2026
@copy-pr-bot

This comment was marked as resolved.

@github-actions github-actions Bot added conda Relates to conda packaging Cython / Python labels Jan 12, 2026
Comment thread dependencies.yaml
- depends_on_rapids_logger
- depends_on_rmm
- develop
- docs
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This project doesn't have any docs in source control. For now, let's remove the docs: group to avoid installing unnecessary packages.

It can be restored, hopefully with a more minimal set of dependencies focused on this repo, once there are docs to build.

Comment thread dependencies.yaml
- depends_on_cupy
- depends_on_libcuforest
- depends_on_pylibraft
- depends_on_rmm
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Nothing in this project uses the rmm Python package.

git grep rmm

Comment thread dependencies.yaml
includes:
- cuda_wheels
- depends_on_libraft
- depends_on_librmm
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

There's a direct use of this here:

https://github.com/rapidsai/cuforest/blob/415a61c08fa4bc4394a2f30842f95be387bcf635/python/libcuforest/libcuforest/load.py#L40-L42

That's been working because libraft pulls in librmm transitively, but for completeness and protection against refactorings, every direct usage should be declared as a direct dependency.

Comment thread dependencies.yaml
Comment on lines -246 to -250
- joblib>=0.11
- &numpy numpy>=1.23,<3.0a0
- scipy>=1.8.0
- packaging
- rich
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

None of these are directly imported in cuforest.

Comment thread dependencies.yaml
Comment on lines -391 to -411
- certifi
- *cython
- hdbscan>=0.8.39,<0.8.40
- hypothesis>=6.0,<7
- nltk
# upstream sklearn docstring tests require numpydoc<1.9
- numpydoc<1.9
# 'nvidia-ml-py' provides the 'pynvml' module
- nvidia-ml-py>=12
- pyyaml
- pytest
- pytest-benchmark
- pytest-cases
- pytest-cov
- pytest-xdist
- seaborn
- *scikit_learn
- statsmodels
- tenacity
- umap-learn==0.5.7
- pynndescent
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

None of these are needed for cuforest's tests. Seeing stuff like hdbscan and pynndescent makes me think this was probably just copied from cuML.

Comment thread dependencies.yaml
# 'nvidia-ml-py' provides the 'pynvml' module
- nvidia-ml-py>=12
- pyyaml
- pandas
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Looks like there is some direct usage of pandas in tests.

ERROR python/cuforest/tests/test_cuforest.py - ImportError while importing test module '/__w/cuforest/cuforest/python/cuforest/tests/test_cuforest.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/opt/conda/envs/test/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
python/cuforest/tests/test_cuforest.py:10: in <module>
    import pandas as pd
E   ModuleNotFoundError: No module named 'pandas'

(build link)

Here:

https://github.com/rapidsai/cuforest/blob/415a61c08fa4bc4394a2f30842f95be387bcf635/python/cuforest/tests/test_cuforest.py#L10

That was probably satisfied before by pandas being a dependency of one of these other test-time dependencies.

@jameslamb jameslamb changed the title WIP: remove unused dependencies remove unused dependencies Jan 13, 2026
@jameslamb jameslamb requested a review from csadorf January 13, 2026 14:31
@jameslamb jameslamb marked this pull request as ready for review January 13, 2026 14:31
@jameslamb jameslamb requested a review from a team as a code owner January 13, 2026 14:31
@jameslamb jameslamb requested a review from gforsyth January 13, 2026 14:31
Copy link
Copy Markdown
Contributor

@gforsyth gforsyth left a comment

Choose a reason for hiding this comment

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

:shipit:

@jameslamb
Copy link
Copy Markdown
Member Author

Thanks Gil! I'd like to give @csadorf a chance to review this before we merge.

Copy link
Copy Markdown
Contributor

@csadorf csadorf left a comment

Choose a reason for hiding this comment

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

Thanks a lot for working on this cleanup!

@csadorf
Copy link
Copy Markdown
Contributor

csadorf commented Jan 14, 2026

/merge

@rapids-bot rapids-bot Bot merged commit df1b961 into rapidsai:main Jan 14, 2026
145 of 153 checks passed
@csadorf csadorf deleted the dependencies branch January 14, 2026 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conda Relates to conda packaging Cython / Python improvement Improves an existing functionality non-breaking Introduces a non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants