For [DeployedModel][] this field is optional, and the default
value is n1-standard-2. For [BatchPredictionJob][] or as part of
[WorkerPoolSpec][] this field is required.
#machine_type=
defmachine_type=(value)->::String
Parameter
value (::String) — Immutable. The type of the machine.
For [DeployedModel][] this field is optional, and the default
value is n1-standard-2. For [BatchPredictionJob][] or as part of
[WorkerPoolSpec][] this field is required.
For [DeployedModel][] this field is optional, and the default
value is n1-standard-2. For [BatchPredictionJob][] or as part of
[WorkerPoolSpec][] this field is required.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-09 UTC."],[],[],null,["# Vision AI V1 API - Class Google::Cloud::VisionAI::V1::MachineSpec (v1.1.1)\n\nVersion latestkeyboard_arrow_down\n\n- [1.1.1 (latest)](/ruby/docs/reference/google-cloud-vision_ai-v1/latest/Google-Cloud-VisionAI-V1-MachineSpec)\n- [1.1.0](/ruby/docs/reference/google-cloud-vision_ai-v1/1.1.0/Google-Cloud-VisionAI-V1-MachineSpec)\n- [1.0.1](/ruby/docs/reference/google-cloud-vision_ai-v1/1.0.1/Google-Cloud-VisionAI-V1-MachineSpec)\n- [0.4.0](/ruby/docs/reference/google-cloud-vision_ai-v1/0.4.0/Google-Cloud-VisionAI-V1-MachineSpec)\n- [0.3.0](/ruby/docs/reference/google-cloud-vision_ai-v1/0.3.0/Google-Cloud-VisionAI-V1-MachineSpec)\n- [0.2.0](/ruby/docs/reference/google-cloud-vision_ai-v1/0.2.0/Google-Cloud-VisionAI-V1-MachineSpec)\n- [0.1.0](/ruby/docs/reference/google-cloud-vision_ai-v1/0.1.0/Google-Cloud-VisionAI-V1-MachineSpec) \nReference documentation and code samples for the Vision AI V1 API class Google::Cloud::VisionAI::V1::MachineSpec.\n\nSpecification of a single machine. \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #accelerator_count\n\n def accelerator_count() -\u003e ::Integer\n\n**Returns**\n\n- (::Integer) --- The number of accelerators to attach to the machine.\n\n### #accelerator_count=\n\n def accelerator_count=(value) -\u003e ::Integer\n\n**Parameter**\n\n- **value** (::Integer) --- The number of accelerators to attach to the machine. \n**Returns**\n\n- (::Integer) --- The number of accelerators to attach to the machine.\n\n### #accelerator_type\n\n def accelerator_type() -\u003e ::Google::Cloud::VisionAI::V1::AcceleratorType\n\n**Returns**\n\n- ([::Google::Cloud::VisionAI::V1::AcceleratorType](./Google-Cloud-VisionAI-V1-AcceleratorType)) --- Immutable. The type of accelerator(s) that may be attached to the machine as per [accelerator_count](/ruby/docs/reference/google-cloud-vision_ai-v1/latest/Google-Cloud-VisionAI-V1-MachineSpec#Google__Cloud__VisionAI__V1__MachineSpec_accelerator_count_instance_ \"Google::Cloud::VisionAI::V1::MachineSpec#accelerator_count (method)\").\n\n### #accelerator_type=\n\n def accelerator_type=(value) -\u003e ::Google::Cloud::VisionAI::V1::AcceleratorType\n\n**Parameter**\n\n- **value** ([::Google::Cloud::VisionAI::V1::AcceleratorType](./Google-Cloud-VisionAI-V1-AcceleratorType)) --- Immutable. The type of accelerator(s) that may be attached to the machine as per [accelerator_count](/ruby/docs/reference/google-cloud-vision_ai-v1/latest/Google-Cloud-VisionAI-V1-MachineSpec#Google__Cloud__VisionAI__V1__MachineSpec_accelerator_count_instance_ \"Google::Cloud::VisionAI::V1::MachineSpec#accelerator_count (method)\"). \n**Returns**\n\n- ([::Google::Cloud::VisionAI::V1::AcceleratorType](./Google-Cloud-VisionAI-V1-AcceleratorType)) --- Immutable. The type of accelerator(s) that may be attached to the machine as per [accelerator_count](/ruby/docs/reference/google-cloud-vision_ai-v1/latest/Google-Cloud-VisionAI-V1-MachineSpec#Google__Cloud__VisionAI__V1__MachineSpec_accelerator_count_instance_ \"Google::Cloud::VisionAI::V1::MachineSpec#accelerator_count (method)\").\n\n### #machine_type\n\n def machine_type() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Immutable. The type of the machine.\n\n See the [list of machine types supported for\n prediction](https://cloud.google.com/vertex-ai/docs/predictions/configure-compute#machine-types)\n\n See the [list of machine types supported for custom\n training](https://cloud.google.com/vertex-ai/docs/training/configure-compute#machine-types).\n\n For \\[DeployedModel\\]\\[\\] this field is optional, and the default\n value is `n1-standard-2`. For \\[BatchPredictionJob\\]\\[\\] or as part of\n \\[WorkerPoolSpec\\]\\[\\] this field is required.\n\n### #machine_type=\n\n def machine_type=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- Immutable. The type of the machine.\n\n\n See the [list of machine types supported for\n prediction](https://cloud.google.com/vertex-ai/docs/predictions/configure-compute#machine-types)\n\n See the [list of machine types supported for custom\n training](https://cloud.google.com/vertex-ai/docs/training/configure-compute#machine-types).\n\n For \\[DeployedModel\\]\\[\\] this field is optional, and the default\n value is `n1-standard-2`. For \\[BatchPredictionJob\\]\\[\\] or as part of\n\\[WorkerPoolSpec\\]\\[\\] this field is required. \n**Returns**\n\n- (::String) --- Immutable. The type of the machine.\n\n See the [list of machine types supported for\n prediction](https://cloud.google.com/vertex-ai/docs/predictions/configure-compute#machine-types)\n\n See the [list of machine types supported for custom\n training](https://cloud.google.com/vertex-ai/docs/training/configure-compute#machine-types).\n\n For \\[DeployedModel\\]\\[\\] this field is optional, and the default\n value is `n1-standard-2`. For \\[BatchPredictionJob\\]\\[\\] or as part of\n \\[WorkerPoolSpec\\]\\[\\] this field is required."]]