class_docstr: A mixin class for SageMaker ``Inference Recommender`` that will be extended by ``Model``
class_docstr_tok: ["A","mixin","class","for","SageMaker","``","Inference","Recommender","``","that","will","be","extended","by","``","Model","``"]
docstr: Get recommendation from model
docstr_tok: ["Get","recommendation","from","model"]
code: def _get_model_recommendation(
      self,
      sage_client,
      job_or_model_name,
      inference_recommendation_id,
  ):
      """Get recommendation from model"""
      model_recommendation = None
      try:
          model_res = sage_client.describe_model(
              ModelName=job_or_model_name
          )
          if model_res:
              model_recommendation = self._search_recommendation(
                  recommendation_list=model_res[
                      "DeploymentRecommendation"
                  ]["RealTimeInferenceRecommendations"],
                  inference_recommendation_id=inference_recommendation_id,
              )
      except sage_client.exceptions.ResourceNotFound:
          pass
  
      return model_recommendation
  
imports: from __future__ import absolute_import
  import logging
  import re
  from typing import List, Dict, Optional
  import sagemaker
  from sagemaker.parameter import CategoricalParameter
label_desc: Use image node_id 11 for calling the InferenceRecommenderMixin obj's underlying member method code with example usage: obj._get_model_recommendation(sage_client, job_or_model_name, inference_recommendation_id) and returns: model_recommendation