class_docstr: Configures the compute resources for a Model.
docstr: Returns a dict of resource requirements.
docstr_tok: ["Returns","a","dict","of","resource","requirements","."]
code: def get_compute_resource_requirements(self) -> dict:
      """Returns a dict of resource requirements."""
      resource_requirements = {
          "MinMemoryRequiredInMb": self.min_memory,
      }
  
      if self.max_memory:
          resource_requirements.update(
              {"MaxMemoryRequiredInMb": self.max_memory}
          )
      if self.num_cpus:
          resource_requirements.update(
              {"NumberOfCpuCoresRequired": self.num_cpus}
          )
      if self.num_accelerators:
          resource_requirements.update(
              {
                  "NumberOfAcceleratorDevicesRequired": self.num_accelerators
              }
          )
  
      return resource_requirements
  
file_path: sagemaker-python-sdk/src/sagemaker/compute_resource_requirements/resource_requirements.py
imports: from __future__ import absolute_import
  import logging
  from typing import Optional, Dict
  from sagemaker.utils import stringify_object
label_desc: Use image node_id 4 for calling the ResourceRequirements obj's underlying member method code with example usage: obj.get_compute_resource_requirements() and returns: resource_requirements