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 right size job and model
docstr_tok: ["Get","recommendation","from","right","size","job","and","model"]
code: def _get_recommendation(
      self, sage_client, job_or_model_name, inference_recommendation_id
  ):
      """Get recommendation from right size job and model"""
      (
          right_size_recommendation,
          model_recommendation,
          right_size_job_res,
      ) = (None, None, None)
      (
          right_size_recommendation,
          right_size_job_res,
      ) = self._get_right_size_recommendation(
          sage_client=sage_client,
          job_or_model_name=job_or_model_name,
          inference_recommendation_id=inference_recommendation_id,
      )
      if right_size_recommendation is None:
          model_recommendation = self._get_model_recommendation(
              sage_client=sage_client,
              job_or_model_name=job_or_model_name,
              inference_recommendation_id=inference_recommendation_id,
          )
          if model_recommendation is None:
              raise ValueError(
                  "inference_recommendation_id is not valid"
              )
  
      return (
          right_size_recommendation,
          model_recommendation,
          right_size_job_res,
      )
  
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 9 for calling the InferenceRecommenderMixin obj's underlying member method code with example usage: obj._get_recommendation(sage_client, job_or_model_name, inference_recommendation_id) and returns: right_size_recommendation,  model_recommendation,  right_size_job_res