code: def test_reduce_on_plateau_error_throw_when_no_metrics_exist(self):
      with pytest.raises(
          ConfigurationError,
          match="learning rate scheduler requires a validation metric",
      ):
          LearningRateScheduler.from_params(
              optimizer=Optimizer.from_params(
                  model_parameters=self.model.named_parameters(),
                  params=Params({"type": "adam"}),
              ),
              params=Params({"type": "reduce_on_plateau"}),
          ).step(None)
  
file_path: allennlp/tests/training/learning_rate_schedulers/learning_rate_scheduler_test.py
imports: import torch
  import pytest
  from allennlp.common.checks import ConfigurationError
  from allennlp.training.optimizers import Optimizer
  from allennlp.common.testing import AllenNlpTestCase
  from allennlp.training.learning_rate_schedulers import LearningRateScheduler
  from allennlp.common.params import Params
label_desc: Use image node_id 2 for calling the LearningRateSchedulersTest obj's underlying member method code with example usage: obj.test_reduce_on_plateau_error_throw_when_no_metrics_exist() without return types