Multi-class roc_auc_score raises error when y_true is not sampled with all label of classes

### Describe the bug

Sometimes we would like to train or validate a multi-class classification model without using large batch size or the term **n_sample** in scikit-learn but with too many number of classes **n_classes**. Let's say **n_sample**  < **n_classes**.  For the example below, `n_sample = 2` and `n_classes = 3`.  

In deep learning, huge model with high resolution input could lead to this situation easily. The [condition](https://github.com/scikit-learn/scikit-learn/blob/main/sklearn/metrics/_ranking.py#L682) might be too strong.

### Steps/Code to Reproduce

```
from sklearn.metrics import roc_auc_score
import numpy as np
from scipy.special import softmax
label = np.array([1, 2]) # ground truth label (n_sample,)
pred = softmax(np.random.random((2, 3)), axis=1) # model prediction (n_sample, n_class)
roc_auc_score(label, pred, average=None, multi_class="ovr")
```

### Expected Results

`array([auc1, auc2, 0])`

### Actual Results

```
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/conda/lib/python3.8/site-packages/sklearn/metrics/_ranking.py", line 565, in roc_auc_score
    return _multiclass_roc_auc_score(
  File "/opt/conda/lib/python3.8/site-packages/sklearn/metrics/_ranking.py", line 674, in _multiclass_roc_auc_score
    raise ValueError(
ValueError: Number of classes in y_true not equal to the number of columns in 'y_score'
```

### Versions

```shell
System:
    python: 3.8.13 | packaged by conda-forge | (default, Mar 25 2022, 06:04:10)  [GCC 10.3.0]
executable: /opt/conda/bin/python
   machine: Linux-4.15.0-171-generic-x86_64-with-glibc2.10

Python dependencies:
      sklearn: 1.1.2
          pip: 22.2.2
   setuptools: 59.5.0
        numpy: 1.22.3
        scipy: 1.6.3
       Cython: 0.29.28
       pandas: 1.3.5
   matplotlib: 3.5.2
       joblib: 1.1.0
threadpoolctl: 3.1.0

Built with OpenMP: True

threadpoolctl info:
       user_api: openmp
   internal_api: openmp
         prefix: libgomp
       filepath: /opt/conda/lib/python3.8/site-packages/scikit_learn.libs/libgomp-a34b3233.so.1.0.0
        version: None
    num_threads: 48

       user_api: blas
   internal_api: openblas
         prefix: libopenblas
       filepath: /opt/conda/lib/libopenblasp-r0.3.20.so
        version: 0.3.20
threading_layer: pthreads
   architecture: SkylakeX
    num_threads: 48
```

COMMENT:
You could try to pass `labels=[1, 2, 3]` but you will get another error:

```python
In [3]: from sklearn.metrics import roc_auc_score
   ...: import numpy as np
   ...: from scipy.special import softmax
   ...: label = np.array([1, 2]) # ground truth label (n_sample,)
   ...: pred = softmax(np.random.random((2, 3)), axis=1) # model prediction (n_sample, n_class)
   ...: roc_auc_score(label, pred, labels=[1, 2, 3], average=None, multi_class="ovr")
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-3-7815a4fc17c9> in <module>
      4 label = np.array([1, 2]) # ground truth label (n_sample,)
      5 pred = softmax(np.random.random((2, 3)), axis=1) # model prediction (n_sample, n_class)
----> 6 roc_auc_score(label, pred, labels=[1, 2, 3], average=None, multi_class="ovr")

~/Documents/packages/scikit-learn/sklearn/metrics/_ranking.py in roc_auc_score(y_true, y_score, average, sample_weight, max_fpr, multi_class, labels)
    564         if multi_class == "raise":
    565             raise ValueError("multi_class must be in ('ovo', 'ovr')")
--> 566         return _multiclass_roc_auc_score(
    567             y_true, y_score, labels, multi_class, average, sample_weight
    568         )

~/Documents/packages/scikit-learn/sklearn/metrics/_ranking.py in _multiclass_roc_auc_score(y_true, y_score, labels, multi_class, average, sample_weight)
    701         # ovr is same as multi-label
    702         y_true_multilabel = label_binarize(y_true, classes=classes)
--> 703         return _average_binary_score(
    704             _binary_roc_auc_score,
    705             y_true_multilabel,

~/Documents/packages/scikit-learn/sklearn/metrics/_base.py in _average_binary_score(binary_metric, y_true, y_score, average, sample_weight)
    116         y_true_c = y_true.take([c], axis=not_average_axis).ravel()
    117         y_score_c = y_score.take([c], axis=not_average_axis).ravel()
--> 118         score[c] = binary_metric(y_true_c, y_score_c, sample_weight=score_weight)
    119 
    120     # Average the results

~/Documents/packages/scikit-learn/sklearn/metrics/_ranking.py in _binary_roc_auc_score(y_true, y_score, sample_weight, max_fpr)
    337     """Binary roc auc score."""
    338     if len(np.unique(y_true)) != 2:
--> 339         raise ValueError(
    340             "Only one class present in y_true. ROC AUC score "
    341             "is not defined in that case."

ValueError: Only one class present in y_true. ROC AUC score is not defined in that case.
```

The reason is that OvR will binarize the problem. For one of the combinations, you will therefore end up with only a single class in `y_true` and the ROC AUC is not defined for this case. So here nothing can be done.

Labels: Bug, Needs Triage