class_docstr: Accepts model metrics parameters for conversion to request dict.
class_docstr_tok: ["Accepts","model","metrics","parameters","for","conversion","to","request","dict","."]
docstr: Generates a request dictionary using the parameters provided to the class.
docstr_tok: ["Generates","a","request","dictionary","using","the","parameters","provided","to","the","class","."]
code: def _to_request_dict(self):
      """Generates a request dictionary using the parameters provided to the class."""
      model_metrics_request = {}
  
      model_quality = {}
      if self.model_statistics is not None:
          model_quality[
              "Statistics"
          ] = self.model_statistics._to_request_dict()
      if self.model_constraints is not None:
          model_quality[
              "Constraints"
          ] = self.model_constraints._to_request_dict()
      if model_quality:
          model_metrics_request["ModelQuality"] = model_quality
  
      model_data_quality = {}
      if self.model_data_statistics is not None:
          model_data_quality[
              "Statistics"
          ] = self.model_data_statistics._to_request_dict()
      if self.model_data_constraints is not None:
          model_data_quality[
              "Constraints"
          ] = self.model_data_constraints._to_request_dict()
      if model_data_quality:
          model_metrics_request["ModelDataQuality"] = model_data_quality
  
      bias = {}
      if self.bias is not None:
          bias["Report"] = self.bias._to_request_dict()
      if self.bias_pre_training is not None:
          bias[
              "PreTrainingReport"
          ] = self.bias_pre_training._to_request_dict()
      if self.bias_post_training is not None:
          bias[
              "PostTrainingReport"
          ] = self.bias_post_training._to_request_dict()
      model_metrics_request["Bias"] = bias
  
      explainability = {}
      if self.explainability is not None:
          explainability[
              "Report"
          ] = self.explainability._to_request_dict()
      model_metrics_request["Explainability"] = explainability
  
      return model_metrics_request
  
file_path: sagemaker-python-sdk/src/sagemaker/model_metrics.py
imports: from __future__ import absolute_import
  from typing import Optional, Union
  from sagemaker.workflow.entities import PipelineVariable
label_desc: Use image node_id 2 for calling the ModelMetrics obj's underlying member method code with example usage: obj._to_request_dict() and returns: model_metrics_request