code: def metric_definitions(self) -> str:
      if self.framework == "pytorch":
          return [
              {
                  "Name": "train_runtime",
                  "Regex": "train_runtime.*=\D*(.*?)$",
              },
              {
                  "Name": "eval_accuracy",
                  "Regex": "eval_accuracy.*=\D*(.*?)$",
              },
              {"Name": "eval_loss", "Regex": "eval_loss.*=\D*(.*?)$"},
          ]
      else:
          return [
              {
                  "Name": "train_runtime",
                  "Regex": "train_runtime.*=\D*(.*?)$",
              },
              {"Name": "eval_accuracy", "Regex": "loss.*=\D*(.*?)]?$"},
              {
                  "Name": "eval_loss",
                  "Regex": "sparse_categorical_accuracy.*=\D*(.*?)]?$",
              },
          ]
  
file_path: H2O/h2o_flexgen/benchmark/third_party/transformers/tests/sagemaker/conftest.py
imports: import os
  import pytest
  from attr import dataclass
label_desc: Use image node_id 1 for calling the SageMakerTestEnvironment obj's underlying member method code with example usage: obj.metric_definitions() and returns: list, list