No attribute classes_ during multi-class scoring

### Describe the bug

Regression we hit in MNE-Python's `pip-pre` run and bisected locally:

https://github.com/mne-tools/mne-python/actions/runs/4894775241/jobs/8739516519#step:17:4138

Local bisect suggests the culprit is #26037 by @glemaitre

It's entirely possible we're doing something wrong at the MNE-Python end but this code has worked for years :shrug: 

cc @agramfort who might also know the problem quickly

### Steps/Code to Reproduce

Not really minimal, but after cloning MNE-Python you can do:
```
pytest mne/decoding/tests/test_base.py -k multiclass_full
```
And it will fail.

Can try to whittle it down more if it would help...

### Expected Results

No error

### Actual Results

```pytb
mne/decoding/tests/test_base.py:323: in test_get_coef_multiclass_full
    scores = cross_val_multiscore(time_gen, X, y, cv=cv, verbose=True)
...
mne/decoding/base.py:567: in _score
    score = scorer(estimator, X_test, y_test)
/opt/hostedtoolcache/Python/3.11.3/x64/lib/python3.11/site-packages/sklearn/metrics/_scorer.py:411: in _passthrough_scorer
    return estimator.score(*args, **kwargs)
mne/decoding/search_light.py:581: in score
    score = parallel(
/opt/hostedtoolcache/Python/3.11.3/x64/lib/python3.11/site-packages/joblib/parallel.py:1085: in __call__
    if self.dispatch_one_batch(iterator):
/opt/hostedtoolcache/Python/3.11.3/x64/lib/python3.11/site-packages/joblib/parallel.py:901: in dispatch_one_batch
    self._dispatch(tasks)
/opt/hostedtoolcache/Python/3.11.3/x64/lib/python3.11/site-packages/joblib/parallel.py:819: in _dispatch
    job = self._backend.apply_async(batch, callback=cb)
/opt/hostedtoolcache/Python/3.11.3/x64/lib/python3.11/site-packages/joblib/_parallel_backends.py:208: in apply_async
    result = ImmediateResult(func)
/opt/hostedtoolcache/Python/3.11.3/x64/lib/python3.11/site-packages/joblib/_parallel_backends.py:597: in __init__
    self.results = batch()
/opt/hostedtoolcache/Python/3.11.3/x64/lib/python3.11/site-packages/joblib/parallel.py:288: in __call__
    return [func(*args, **kwargs)
/opt/hostedtoolcache/Python/3.11.3/x64/lib/python3.11/site-packages/joblib/parallel.py:288: in <listcomp>
    return [func(*args, **kwargs)
mne/decoding/search_light.py:676: in _gl_score
    _score = scoring(est, X[..., jj], y)
/opt/hostedtoolcache/Python/3.11.3/x64/lib/python3.11/site-packages/sklearn/metrics/_scorer.py:211: in __call__
    return self._score(
/opt/hostedtoolcache/Python/3.11.3/x64/lib/python3.11/site-packages/sklearn/metrics/_scorer.py:291: in _score
    y_pred = method_caller(clf, "predict_proba", X, pos_label=self._get_pos_label())
/opt/hostedtoolcache/Python/3.11.3/x64/lib/python3.11/site-packages/sklearn/metrics/_scorer.py:77: in _cached_call
    result, _ = _get_response_values(
/opt/hostedtoolcache/Python/3.11.3/x64/lib/python3.11/site-packages/sklearn/utils/_response.py:74: in _get_response_values
    classes = estimator.classes_
/opt/hostedtoolcache/Python/3.11.3/x64/lib/python3.11/site-packages/sklearn/pipeline.py:744: in classes_
    return self.steps[-1][1].classes_
E   AttributeError: 'LinearModel' object has no attribute 'classes_'
```

### Versions

```shell
Dev
```

COMMENT:
Thanks for reporting.
A contract in scikit-learn (enforce by `check_estimator`) is that a classifier must have a `classes_` that is a NumPy array.

Could you provide what is the class of `estimator` here such that we see if we don't take right branch or if the `estimator` is in some way not `scikit-learn` compatible?

Labels: Bug, Needs Triage