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
        """
        if toolkit is RLToolkit.COACH:
            return [
                {'Name': 'reward-training',
                 'Regex': '^Training>.*Total reward=(.*?),'},
                {'Name': 'reward-testing',
                 'Regex': '^Testing>.*Total reward=(.*?),'}
            ]
        elif toolkit is RLToolkit.RAY:
            float_regex = "[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?"  # noqa: W605, E501 pylint: disable=anomalous-backslash-in-string
            return [
                {'Name': 'episode_reward_mean',
                 'Regex': 'episode_reward_mean: (%s)' % float_regex},
                {'Name': 'episode_reward_max',
                 'Regex': 'episode_reward_max: (%s)' % float_regex}
            ]
def default_metric_definitions ( cls , toolkit ) : if toolkit is RLToolkit . COACH : return [ { 'Name' : 'reward-training' , 'Regex' : '^Training>.*Total reward=(.*?),' } , { 'Name' : 'reward-testing' , 'Regex' : '^Testing>.*Total reward=(.*?),' } ] elif toolkit is RLToolkit . RAY : float_regex = "[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?" return [ { 'Name' : 'episode_reward_mean' , 'Regex' : 'episode_reward_mean: (%s)' % float_regex } , { 'Name' : 'episode_reward_max' , 'Regex' : 'episode_reward_max: (%s)' % float_regex } ]
Provides default metric definitions based on provided toolkit.

        Args:
            toolkit(sagemaker.rl.RLToolkit): RL Toolkit to be used for training.

        Returns:
            list: metric definitions