class_docstr: Handle end-to-end training and deployment of custom RLEstimator code.
class_docstr_tok: ["Handle","end-to-end","training","and","deployment","of","custom","RLEstimator","code","."]
docstr: Provides default metric definitions based on provided toolkit.
  
  Args:
      toolkit (sagemaker.rl.RLToolkit): RL Toolkit to be used for
          training.
  
  Returns:
      list: metric definitions
  
  Raises:
      ValueError: If toolkit enum is not valid.
docstr_tok: ["Provides","default","metric","definitions","based","on","provided","toolkit",".","Args",":","toolkit","(","sagemaker.rl.RLToolkit",")",":","RL","Toolkit","to","be","used","for","training",".","Returns",":","list",":","metric","definitions","Raises",":","ValueError",":","If","toolkit","enum","is","not","valid","."]
code: def default_metric_definitions(cls, toolkit):
      """Provides default metric definitions based on provided toolkit.
  
      Args:
          toolkit (sagemaker.rl.RLToolkit): RL Toolkit to be used for
              training.
  
      Returns:
          list: metric definitions
  
      Raises:
          ValueError: If toolkit enum is not valid.
      """
      if toolkit is RLToolkit.COACH:
          return [
              {
                  "Name": "reward-training",
                  "Regex": "^Training>.*Total reward=(.*?),",
              },
              {
                  "Name": "reward-testing",
                  "Regex": "^Testing>.*Total reward=(.*?),",
              },
          ]
      if toolkit is RLToolkit.RAY:
          float_regex = "[-+]?[0-9]*[.]?[0-9]+([eE][-+]?[0-9]+)?"  # noqa: W605, E501
  
          return [
              {
                  "Name": "episode_reward_mean",
                  "Regex": "episode_reward_mean: (%s)" % float_regex,
              },
              {
                  "Name": "episode_reward_max",
                  "Regex": "episode_reward_max: (%s)" % float_regex,
              },
          ]
      raise ValueError(
          "An unknown RLToolkit enum was passed in. toolkit: {}".format(
              toolkit
          )
      )
  
imports: from __future__ import absolute_import
  import enum
  import logging
  import re
  from typing import Union, Optional, List, Dict
  from sagemaker import image_uris, fw_utils
  from sagemaker.estimator import Framework, EstimatorBase
  from sagemaker.model import FrameworkModel, SAGEMAKER_OUTPUT_LOCATION
  from sagemaker.mxnet.model import MXNetModel
  from sagemaker.tensorflow.model import TensorFlowModel
  from sagemaker.vpc_utils import VPC_CONFIG_DEFAULT
  from sagemaker.workflow.entities import PipelineVariable
label_desc: Use image node_id 13 for calling the RLEstimator obj's underlying member method code with example usage: obj.default_metric_definitions(cls, toolkit) and returns: list, list