class_docstr: Metric Parser for data following the model card evaluation metrics schema
class_docstr_tok: ["Metric","Parser","for","data","following","the","model","card","evaluation","metrics","schema"]
docstr: Implement ParserBase._validate.
  
  Args:
      json_data (dict): Metric data to be validated.
  
  Raises:
      ValueError: Missing metric_group key.
      ValueError: metric_group object is not a list.
docstr_tok: ["Implement","ParserBase._validate",".","Args",":","json_data","(","dict",")",":","Metric","data","to","be","validated",".","Raises",":","ValueError",":","Missing","metric_group","key",".","ValueError",":","metric_group","object","is","not","a","list","."]
code: def _validate(self, json_data: dict):
      """Implement ParserBase._validate.
  
      Args:
          json_data (dict): Metric data to be validated.
  
      Raises:
          ValueError: Missing metric_group key.
          ValueError: metric_group object is not a list.
      """
      if "metric_groups" not in json_data:
          raise ValueError("Missing metric_group in the metric data.")
      if not isinstance(json_data["metric_groups"], list):
          raise ValueError(
              'Invalid metric data format. {"metric_groups": [......]} is expected'
          )
  
imports: from __future__ import absolute_import
  from abc import ABC, abstractmethod
  from enum import Enum
  from collections import defaultdict
  from typing import Union, List
  from sagemaker.model_card.schema_constraints import PYTHON_TYPE_TO_METRIC_VALUE_TYPE, METRIC_VALUE_TYPE_MAP, MetricTypeEnum
label_desc: Use image node_id 1 for calling the DefaultParser obj's underlying member method code with example usage: obj._validate(json_data) without return types