class_docstr: Tests prediction utilities.
code: def test_predict_by_features_with_non_predicting_model(
      self,
      # pyre-fixme[2]: Parameter must be annotated.
      model_bridge_mock,
      # pyre-fixme[2]: Parameter must be annotated.
      predict_mock,
  ):
      ax_client = (
          _set_up_client_for_get_model_predictions_no_next_trial()
      )
      _attach_completed_trials(ax_client)
  
      # Do not call get_next_trial or get_model_predictions.
      # This test is for handling the use case where no model
      # is instantiated.
  
      observation_features_dict = {
          18: ObservationFeatures(parameters={"x1": 0.3, "x2": 0.5}),
          19: ObservationFeatures(parameters={"x1": 0.4, "x2": 0.5}),
          20: ObservationFeatures(parameters={"x1": 0.8, "x2": 0.5}),
      }
  
      predict_mock.side_effect = NotImplementedError()
      self.assertRaises(
          NotImplementedError,
          predict_by_features,
          **{
              "model": model_bridge_mock,
              "label_to_feature_dict": observation_features_dict,
              "metric_names": ["test_metric1"],
          },
      )
  
file_path: Ax/ax/modelbridge/tests/test_prediction_utils.py
imports: from unittest import mock
  import numpy
  from ax.core.observation import ObservationFeatures
  from ax.core.types import TEvaluationOutcome, TParameterization
  from ax.modelbridge.prediction_utils import predict_at_point, predict_by_features
  from ax.service.ax_client import AxClient
  from ax.utils.common.testutils import TestCase
  from ax.utils.common.typeutils import not_none
label_desc: Use image node_id 3 for calling the TestPredictionUtils obj's underlying member method code with example usage: obj.test_predict_by_features_with_non_predicting_model(model_bridge_mock, predict_mock) without return types