Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WARNING: undefined label: 'metadata_routing' #1071

Open
mglisse opened this issue Jun 15, 2024 · 1 comment
Open

WARNING: undefined label: 'metadata_routing' #1071

mglisse opened this issue Jun 15, 2024 · 1 comment
Labels
doc A documentation issue

Comments

@mglisse
Copy link
Member

mglisse commented Jun 15, 2024

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 scikit-learn/scikit-learn#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 mglisse added the doc A documentation issue label Jun 15, 2024
@mglisse
Copy link
Member Author

mglisse commented Jun 15, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc A documentation issue
Projects
None yet
Development

No branches or pull requests

1 participant