View source on GitHub |
Represents the configuration or type of machine to be used.
tfc.MachineConfig(
cpu_cores=8, memory=30, accelerator_type='auto', accelerator_count=1
)
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. |
Methods
validate
validate()
Checks that the machine configuration created is valid for GCP.