sample_weight is silently ignored in LogisticRegressionCV.score when metadata routing is enabled

### Describe the bug

I'm not sure if it is a proper bug, or my lack of understanding of the metadata routing API ;)

When `enable_metadata_routing=True`, the `score` method of a `LogisticRegressionCV` estimator will ignore `sample_weight`.
```python
set_config(enable_metadata_routing=True)
logreg_cv = LogisticRegressionCV().fit(X, y)
logreg_cv.score(X, y, sample_weight=sw)==logreg_cv.score(X, y) #unweighted accuracy
```
I found it surprising, because the `score` method works fine when `enable_metadata_routing=False`, so the same piece of code behaves differently depending on the metadata routing config.
```python
set_config(enable_metadata_routing=False)
logreg_cv = LogisticRegressionCV().fit(X, y)
logreg_cv.score(X, y, sample_weight=sw) #weighted accuracy
```

If I understood the metadata routing API correctly, to make the `score` method `sample_weight` aware we need to explicitly pass a scorer that request it:
```python
set_config(enable_metadata_routing=True)
weighted_accuracy = make_scorer(accuracy_score).set_score_request(sample_weight=True)
logreg_cv = LogisticRegressionCV(scoring=weighted_accuracy).fit(X, y)
logreg_cv.score(X, y, sample_weight=sw) #weighted accuracy
```

If it's the intended behavior of the metadata routing API, maybe we should warn the user or raise an error in the first case, instead of silently ignoring `sample_weight` ?

### Steps/Code to Reproduce

```python
from sklearn import set_config
from sklearn.metrics import make_scorer, accuracy_score
from sklearn.linear_model import LogisticRegressionCV
import numpy as np

rng = np.random.RandomState(22)
n_samples, n_features = 10, 4
X = rng.rand(n_samples, n_features)
y = rng.randint(0, 2, size=n_samples)
sw = rng.randint(0, 5, size=n_samples)

set_config(enable_metadata_routing=True)
logreg_cv = LogisticRegressionCV()
logreg_cv.fit(X, y)
# sample_weight is silently ignored in logreg_cv.score
assert logreg_cv.score(X, y) == logreg_cv.score(X, y, sample_weight=sw) 
assert not logreg_cv.score(X, y, sample_weight=sw)==accuracy_score(logreg_cv.predict(X),y, sample_weight=sw)
```

### Expected Results

Either `logreg_cv.score(X, y, sample_weight=sw)` raises an error/warning or the assertions are false.

### Actual Results

The assertions are true.

### Versions

```shell
sklearn: 1.7.dev0
```

COMMENT:
@adrinjalali I was reading about the problem, and it lies in the way the score function works. It calls process_routing, passing the sample_weights in the **kwargs of the function. However, inside that function, the **kwargs are not processed properly. The easy (and lazy) solution is simply to add:

```python 
if sample_weight is not None: 
    routed_params.scorer.score["sample_weight"] = sample_weight
```

in the score method for the LogisticRegressionCV class.  It looks like this in the full conditional:

```python 
if _routing_enabled():
    routed_params = process_routing(
        self,
        "score",
        sample_weight=sample_weight,
        **score_params,
    )
    if sample_weight is not None: 
        routed_params.scorer.score["sample_weight"] = sample_weight # Add sample_weight in the MetadataRouter
else:
    routed_params = Bunch()
    routed_params.scorer = Bunch(score={})
    if sample_weight is not None:
        routed_params.scorer.score["sample_weight"] = sample_weight
```

But this is only a solution for the current variable "sample_weight" in the "score" function for this specific class (LogisticRegressionCV). This means other classes and functions using metadata routing might have the same problem. 

I suggest implementing this change for correct behavior in this class. However, I'm also exploring a way to fix this inside the "process_routing" function, because that affects more classes than LogisticRegressionCV (like ridge, omp, ransac, etc.). For example, if you call the process_routing function directly on the LogisticRegressionCV object for the "score" method like this:

```python 

from sklearn import set_config, get_config
from sklearn.metrics import make_scorer, accuracy_score
from sklearn.linear_model import LogisticRegressionCV
from sklearn.utils.metadata_routing import (
    process_routing,
)
import numpy as np

rng = np.random.RandomState(22)
n_samples, n_features = 10, 4
X = rng.rand(n_samples, n_features)
y = rng.randint(0, 2, size=n_samples)
sw = rng.randint(0, 5, size=n_samples)

set_config(enable_metadata_routing=True)
logreg_cv = LogisticRegressionCV()
logreg_cv.fit(X, y)

process_routing(logreg_cv, "score", sample_weight = sw) # call routing for score method
```

It currently returns:

```{'splitter': {}, 'scorer': {'score': {}}}```

but the expected result is:

``` 'splitter': {}, 'scorer': {'score': {'sample_weight': sw}}}```

I suspect that is related to the "get_metadata_routing" function, that is called in this way:

process_routing (from _metadata_routing.py) calls:
get_routing_for_object (from _metadata_routing.py), which calls:
get_metadata_routing (a method of the MetadataRouter object).  Therefore, this is where process_routing's behavior is inheritable by all MetadataRouter objects (i.e., LogisticRegressionCV, RidgeCV, etc.).

That function is responsible for assigning the scorer (and other **kwargs) values in the Router object.

```python
def get_metadata_routing(self):
        """Get metadata routing of this object.

        Please check :ref:`User Guide <metadata_routing>` on how the routing
        mechanism works.

        .. versionadded:: 1.4

        Returns
        -------
        routing : MetadataRouter
            A :class:`~sklearn.utils.metadata_routing.MetadataRouter` encapsulating
            routing information.
        """

        router = (
            MetadataRouter(owner=self.__class__.__name__)
            .add_self_request(self)
            .add(
                splitter=self.cv,
                method_mapping=MethodMapping().add(caller="fit", callee="split"),
            )
            .add(
                scorer=self._get_scorer(),
                method_mapping=MethodMapping()
                .add(caller="score", callee="score")
                .add(caller="fit", callee="score"),
            )
        )
        return router
```

And probably there is the source of the real problem.

Currently, RidgeCV handles this error with a similar method to the one I suggested here.
I just checked, and it uses a method named set_score_request that essentially does the same thing as what I'm doing:

 ```python 
def set_score_request(self, **kwargs):
        """Set requested parameters by the scorer.

        Please see :ref:`User Guide <metadata_routing>` on how the routing
        mechanism works.

        .. versionadded:: 1.5

        Parameters
        ----------
        kwargs : dict
            Arguments should be of the form ``param_name=alias``, and `alias`
            can be one of ``{True, False, None, str}``.
        """
        if not _routing_enabled():
            raise RuntimeError(
                "This method is only available when metadata routing is enabled."
                " You can enable it using"
                " sklearn.set_config(enable_metadata_routing=True)."
            )

        for param, alias in kwargs.items():
            self._metadata_request.score.add_request(param=param, alias=alias) 
        return self
 ```

This is similar to routed_params.scorer.score["sample_weight"] = sample_weight, but it forces the passing of a sample_weight value, as stated in a comment inside _ridge.py:

 ```python
        if _routing_enabled() and self.scoring is None:
            # This estimator passes an array of 1s as sample_weight even if
            # sample_weight is not provided by the user. Therefore we need to
            # always request it. But we don't set it if it's passed explicitly
            # by the user.
            scorer.set_score_request(sample_weight=True)
        return scorer
 ```

I will create a pull request with the "quick fix," but I think it's necessary to unify the way methods handle these metadata requests. (Sorry for all the text, but I consider this relevant for improving future code maintenance.)

Labels: Bug, Metadata Routing