class_docstr: Tests prediction utilities.
code: def test_predict_at_point(self) -> None:
      ax_client = (
          _set_up_client_for_get_model_predictions_no_next_trial()
      )
      _attach_completed_trials(ax_client)
      ax_client.get_model_predictions()  # Ensures model is instantiated
  
      observation_features = ObservationFeatures(
          parameters={"x1": 0.3, "x2": 0.5}
      )
      y_hat, se_hat = predict_at_point(
          model=not_none(ax_client.generation_strategy.model),
          obsf=observation_features,
          metric_names={"test_metric1"},
      )
  
      self.assertEqual(len(y_hat), 1)
      self.assertEqual(len(se_hat), 1)
  
      y_hat, se_hat = predict_at_point(
          model=not_none(ax_client.generation_strategy.model),
          obsf=observation_features,
          metric_names={
              "test_metric1",
              "test_metric2",
              "test_metric:agg",
          },
          scalarized_metric_config=[
              {
                  "name": "test_metric:agg",
                  "weight": {"test_metric1": 0.5, "test_metric2": 0.5},
              },
          ],
      )
      self.assertEqual(len(y_hat), 3)
      self.assertEqual(len(se_hat), 3)
  
      y_hat, se_hat = predict_at_point(
          model=not_none(ax_client.generation_strategy.model),
          obsf=observation_features,
          metric_names={"test_metric1"},
          scalarized_metric_config=[
              {
                  "name": "test_metric:agg",
                  "weight": {"test_metric1": 0.5, "test_metric2": 0.5},
              },
          ],
      )
      self.assertEqual(len(y_hat), 1)
      self.assertEqual(len(se_hat), 1)
  
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 1 for calling the TestPredictionUtils obj's underlying member method code with example usage: obj.test_predict_at_point() without return types