Class: Google::Cloud::VisionAI::V1::ResourceSpecification
- Inherits:
-
Object
- Object
- Google::Cloud::VisionAI::V1::ResourceSpecification
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/cloud/visionai/v1/lva.rb
Overview
ResourceSpec collects a set of resources that can be used to specify requests and requirements.
Note: Highly experimental as this can be runtime dependent. Can use the "extras" field to experiment first before trying to abstract it.
Instance Attribute Summary collapse
-
#cpu ⇒ ::String
CPU specification.
-
#cpu_limits ⇒ ::String
CPU limit.
-
#gpus ⇒ ::Integer
Number of gpus.
-
#latency_budget_ms ⇒ ::Integer
The maximum latency that this operator may use to process an element.
-
#memory ⇒ ::String
Memory specification (in bytes).
-
#memory_limits ⇒ ::String
Memory usage limits.
Instance Attribute Details
#cpu ⇒ ::String
Returns CPU specification.
Examples: "100m", "0.5", "1", "2", ... correspond to 0.1, half, 1, or 2 cpus.
Leave empty to let the system decide.
Note that this does not determine the cpu vender/make, or its underlying clock speed and specific SIMD features. It is only the amount time it requires in timeslicing.
154 155 156 157 |
# File 'proto_docs/google/cloud/visionai/v1/lva.rb', line 154 class ResourceSpecification include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end |
#cpu_limits ⇒ ::String
Returns CPU limit.
Examples: "100m", "0.5", "1", "2", ... correspond to 0.1, half, 1, or 2 cpus.
Leave empty to indicate no limit.
154 155 156 157 |
# File 'proto_docs/google/cloud/visionai/v1/lva.rb', line 154 class ResourceSpecification include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end |
#gpus ⇒ ::Integer
Returns Number of gpus.
154 155 156 157 |
# File 'proto_docs/google/cloud/visionai/v1/lva.rb', line 154 class ResourceSpecification include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end |
#latency_budget_ms ⇒ ::Integer
Returns The maximum latency that this operator may use to process an element.
If non positive, then a system default will be used. Operator developers should arrange for the system compute resources to be aligned with this latency budget; e.g. if you want a ML model to produce results within 500ms, then you should make sure you request enough cpu/gpu/memory to achieve that.
154 155 156 157 |
# File 'proto_docs/google/cloud/visionai/v1/lva.rb', line 154 class ResourceSpecification include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end |
#memory ⇒ ::String
Returns Memory specification (in bytes).
Examples: "128974848", "129e6", "129M", "123Mi", ... correspond to 128974848 bytes, 129000000 bytes, 129 mebibytes, 123 megabytes.
Leave empty to let the system decide.
154 155 156 157 |
# File 'proto_docs/google/cloud/visionai/v1/lva.rb', line 154 class ResourceSpecification include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end |
#memory_limits ⇒ ::String
Returns Memory usage limits.
Examples: "128974848", "129e6", "129M", "123Mi", ... correspond to 128974848 bytes, 129000000 bytes, 129 mebibytes, 123 megabytes.
Leave empty to indicate no limit.
154 155 156 157 |
# File 'proto_docs/google/cloud/visionai/v1/lva.rb', line 154 class ResourceSpecification include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end |