You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The example code in the python docstrings isn't being automatically tested right now. This can cause the example docstrings to break over time as the codebase is updated (#980)
We should add tests to make sure that the example code blocks in our python docstrings can run successfully
Describe the solution you'd like
We can run the example docstrings with our unittests using doctest via the --doctest-modules option in pytest. This is consistent with other rapids projects like cudf
Additional context
This requires changing the format of the docstring code blocks to the numpydoc format ( rapidsai/cudf#652 )
The text was updated successfully, but these errors were encountered:
Similar to rapidsai/cudf#9815, this change uses doctest
to test that the pylibraft example docstrings run without issue.
This caught several errors in the example docstrings, that are also fixed in this PR:
* a missing ‘device_ndarray’ import in kmeans fit when the centroids weren’t explicitly passed in
* an error in the fused_l2_nn_argmin docstring where output wasn’t defined
* An `AttributeError: module 'pylibraft.neighbors.ivf_pq' has no attribute 'np'` error in ivf_pq
Closesrapidsai#981
Similar to rapidsai/cudf#9815, this change uses doctest to test that the pylibraft example docstrings run without issue.
This caught several errors in the example docstrings, that are also fixed in this PR:
* a missing ‘device_ndarray’ import in kmeans fit when the centroids weren’t explicitly passed in
* an error in the fused_l2_nn_argmin docstring where output wasn’t defined
* An `AttributeError: module 'pylibraft.neighbors.ivf_pq' has no attribute 'np'` error in ivf_pq
Closes#981
Authors:
- Ben Frederickson (https://github.com/benfred)
Approvers:
- Corey J. Nolet (https://github.com/cjnolet)
URL: #1073
Is your feature request related to a problem? Please describe.
The example code in the python docstrings isn't being automatically tested right now. This can cause the example docstrings to break over time as the codebase is updated (#980)
We should add tests to make sure that the example code blocks in our python docstrings can run successfully
Describe the solution you'd like
We can run the example docstrings with our unittests using doctest via the
--doctest-modules
option in pytest. This is consistent with other rapids projects like cudfAdditional context
This requires changing the format of the docstring code blocks to the
numpydoc
format ( rapidsai/cudf#652 )The text was updated successfully, but these errors were encountered: