diff --git a/dependencies.yaml b/dependencies.yaml index db5556af88..44e8a3537d 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -513,7 +513,6 @@ dependencies: - ipython - ipykernel - nbsphinx - - numpydoc - &onnxruntime onnxruntime - recommonmark - *scikit_learn @@ -525,6 +524,7 @@ dependencies: - output_types: conda packages: - doxygen=1.9.1 + - numpydoc - matplotlib-base - pip: - nvidia-sphinx-theme @@ -663,8 +663,6 @@ dependencies: - hypothesis>=6.0,<7 - msgspec - nltk - # upstream sklearn docstring tests require numpydoc<1.9 - - numpydoc<1.9 # 'nvidia-ml-py' provides the 'pynvml' module - nvidia-ml-py>=12 - *onnxruntime @@ -683,6 +681,10 @@ dependencies: - output_types: conda packages: - cuvs==26.10.*,>=0.0.0a0 + # upstream sklearn docstring tests require numpydoc<1.9 + # + # 'numpydoc' is intentionally conda-only, see https://github.com/NVIDIA/cuml/issues/7710 + - numpydoc<1.9 test_python_accel_sklearn: # Exact pin the sklearn versions used for running upstream sklearn tests # in cuml.accel. We exact pin here since our xfail list is tightly coupled diff --git a/python/cuml/pyproject.toml b/python/cuml/pyproject.toml index 0e7874345d..b59036cf91 100644 --- a/python/cuml/pyproject.toml +++ b/python/cuml/pyproject.toml @@ -121,7 +121,6 @@ test = [ "lightgbm", "msgspec", "nltk", - "numpydoc<1.9", "nvidia-ml-py>=12", "onnxruntime", "pynndescent", diff --git a/python/cuml/tests/test_base.py b/python/cuml/tests/test_base.py index 0c2f7441e0..f6bdfc349c 100644 --- a/python/cuml/tests/test_base.py +++ b/python/cuml/tests/test_base.py @@ -4,7 +4,6 @@ import inspect import numpy as np -import numpydoc.docscrape import pandas as pd import pylibraft.common.handle import pytest @@ -54,6 +53,8 @@ class that derives from `Base`, We ensure that 1) the base arguments exist "the base arguments in constructors." ) + numpydoc_docscrape = pytest.importorskip("numpydoc.docscrape") + # To quickly find and replace all instances in the documentation, the below # regex's may be useful # output_type: r"^[ ]{4}output_type :.*\n(^(?![ ]{0,4}(?![ ]{4,})).*(\n))+" @@ -71,12 +72,12 @@ def get_param_doc(param_doc_obj, name: str): # Load the base class signature, parse the docstring and pull out params base_sig = inspect.signature(cuml.Base, follow_wrapped=True) - base_doc = numpydoc.docscrape.NumpyDocString(cuml.Base.__doc__) + base_doc = numpydoc_docscrape.NumpyDocString(cuml.Base.__doc__) base_doc_params = base_doc["Parameters"] # Load the current class signature, parse the docstring and pull out params klass_sig = inspect.signature(klass, follow_wrapped=True) - klass_doc = numpydoc.docscrape.NumpyDocString(klass.__doc__ or "") + klass_doc = numpydoc_docscrape.NumpyDocString(klass.__doc__ or "") klass_doc_params = klass_doc["Parameters"] for name, param in base_sig.parameters.items():

AltStyle によって変換されたページ (->オリジナル) /