GUDHI / gudhi-devel

The GUDHI library is a generic open source C++ library, with a Python interface, for Topological Data Analysis (TDA) and Higher Dimensional Geometry Understanding.
https://gudhi.inria.fr/
MIT License
245 stars 65 forks source link

WARNING: undefined label: 'metadata_routing' #1071

Open mglisse opened 2 weeks ago

mglisse commented 2 weeks ago

With recent (1.3+) versions of scikit-learn, building the documentation prints

docstring of sklearn.utils._metadata_requests._MetadataRequester.get_metadata_routing:3: WARNING: undefined label: 'metadata_routing' docstring of sklearn.utils._metadata_requests.RequestMethod.get..func:3: WARNING: undefined label: 'metadata_routing'

for Atol, MapperComplex, GraphInducedComplex and NerveComplex. New functions also get added to the documentation: get_metadata_routing, set_fit_request, set_transform_request. I don't know what criteria cause these to appear for some classes and not others.

Explanation is available at https://github.com/scikit-learn/scikit-learn/pull/26747

Some options for what we can do

  1. ignore the warning
  2. enable intersphinx
  3. tell sphinx that we do not want those functions in the doc

We should probably check first what this new metadata_routing thing is about and whether it is relevant to us (if it is, we may want code changes, not just the doc).

mglisse commented 2 weeks ago

According to their doc, the goal of this feature is to be able to pass extra arguments (not just X and y) to fit or transform, when they are not called directly but through a pipeline, grid-search, or other similar meta-objects. The classes listed in this issue seem to be precisely those for which fit takes extra arguments (sample_weight in Atol, filter(s), color(s), assignments in the cover complex classes), i.e. the ones that could benefit.

The developer doc gives more information about how this works and what may be needed in our classes to enable it.

The whole feature is marked as experimental and likely to break at each release, so we probably shouldn't try to support it yet. I would be in favor of option 3 above, for now.