class_docstr: Placeholder docstring
class_docstr_tok: ["Placeholder","docstring"]
docstr: Placeholder docstring
docstr_tok: ["Placeholder","docstring"]
code: def to_dict(self):
      """Placeholder docstring"""
  
      if self.optimizer_metadata is None:
          self.optimizer_metadata = {}
  
      base = {
          "Version": self.version,
          "PythonVersion": self.python_version,
          "Framework": self.framework,
          "FrameworkVersion": self.framework_version,
          "Model": self.model_file,
          "ModelHMAC": self.model_hmac,
          "Requirements": self.requirements_file,
          "Schema": self.schema_file,
          "SchemaHMAC": self.schema_hmac,
          "Task": self.task,
          "ModelType": self.model_type,
          "OptimizerInputs": dict(self.optimizer_metadata),
      }
  
      if self.inference_spec_file:
          base["InferenceSpec"] = self.inference_spec_file
          base["InferenceSpecHMAC"] = self.inference_spec_hmac
  
      return base
  
file_path: sagemaker-python-sdk/src/sagemaker/serve/save_retrive/version_1_0_0/metadata/metadata.py
imports: from __future__ import absolute_import
  from typing import Optional
  from dataclasses import dataclass, field
  from pathlib import Path
  import platform
  import yaml
label_desc: Use image node_id 1 for calling the XGBoostMetadata obj's underlying member method code with example usage: obj.to_dict() and returns: base