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: Bundle right_size() parameters into stopping conditions for Advanced job
docstr_tok: ["Bundle","right_size","(",")","parameters","into","stopping","conditions","for","Advanced","job"]
code: def _convert_to_stopping_conditions_json(
      self,
      max_invocations: int,
      model_latency_thresholds: List[ModelLatencyThreshold],
  ):
      """Bundle right_size() parameters into stopping conditions for Advanced job"""
      if not max_invocations and not model_latency_thresholds:
          return None
      stopping_conditions = {}
      if max_invocations:
          stopping_conditions["MaxInvocations"] = max_invocations
      if model_latency_thresholds:
          stopping_conditions["ModelLatencyThresholds"] = [
              threshold.to_json
              for threshold in model_latency_thresholds
          ]
      return stopping_conditions
  
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 8 for calling the InferenceRecommenderMixin obj's underlying member method code with example usage: obj._convert_to_stopping_conditions_json(max_invocations, model_latency_thresholds) and returns: stopping_conditions, None