class_docstr: Represents the configuration or type of machine to be used.
class_docstr_tok: ["Represents","the","configuration","or","type","of","machine","to","be","used","."]
docstr: Constructor.
  
  Args:
    cpu_cores: Number of virtual CPU cores. Defaults to 8.
    memory: Amount of memory in GB. Defaults to 30GB.
    accelerator_type: Type of the accelerator to be used
      ('K80', 'P100', 'V100', 'P4', 'T4', 'TPU_V2', 'TPU_V3') or 'CPU'
      for no accelerator. Defaults to 'auto', which maps to a standard
      gpu config such as 'P100'.
    accelerator_count: Number of accelerators. Defaults to 1.
docstr_tok: ["Constructor",".","Args",":","cpu_cores",":","Number","of","virtual","CPU","cores",".","Defaults","to","8.","memory",":","Amount","of","memory","in","GB",".","Defaults","to","30GB",".","accelerator_type",":","Type","of","the","accelerator","to","be","used","(","'K80","'",",","'P100","'",",","'V100","'",",","'P4","'",",","'T4","'",",","'TPU_V2","'",",","'TPU_V3","'",")","or","'CPU'","for","no","accelerator",".","Defaults","to","'auto","'",",","which","maps","to","a","standard","gpu","config","such","as","'P100","'",".","accelerator_count",":","Number","of","accelerators",".","Defaults","to","1","."]
code: def __init__(
      self,
      cpu_cores=8,
      memory=30,
      accelerator_type="auto",
      accelerator_count=1,
  ):
      """Constructor.
  
      Args:
        cpu_cores: Number of virtual CPU cores. Defaults to 8.
        memory: Amount of memory in GB. Defaults to 30GB.
        accelerator_type: Type of the accelerator to be used
          ('K80', 'P100', 'V100', 'P4', 'T4', 'TPU_V2', 'TPU_V3') or 'CPU'
          for no accelerator. Defaults to 'auto', which maps to a standard
          gpu config such as 'P100'.
        accelerator_count: Number of accelerators. Defaults to 1.
      """
      self.cpu_cores = cpu_cores
      self.memory = memory
      self.accelerator_type = accelerator_type
      self.accelerator_count = accelerator_count
  
      if self.accelerator_type == "auto":
          self.accelerator_type = AcceleratorType.NVIDIA_TESLA_P100
  
      self.validate()
  
file_path: cloud/src/python/tensorflow_cloud/core/machine_config.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import enum
  from .None import gcp
label_desc: Use image node_id 1 to create a new MachineConfig object from inherited base classes: object with example: obj = MachineConfig(cpu_cores, memory, accelerator_type, accelerator_count)