Reference documentation and code samples for the Vision AI V1 API class Google::Cloud::VisionAI::V1::ResourceSpecification.
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.
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#cpu
def cpu() -> ::String
-
(::String) — 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.
#cpu=
def cpu=(value) -> ::String
-
value (::String) — 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.
-
(::String) — 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.
#cpu_limits
def cpu_limits() -> ::String
-
(::String) — CPU limit.
Examples: "100m", "0.5", "1", "2", ... correspond to 0.1, half, 1, or 2 cpus.
Leave empty to indicate no limit.
#cpu_limits=
def cpu_limits=(value) -> ::String
-
value (::String) — CPU limit.
Examples: "100m", "0.5", "1", "2", ... correspond to 0.1, half, 1, or 2 cpus.
Leave empty to indicate no limit.
-
(::String) — CPU limit.
Examples: "100m", "0.5", "1", "2", ... correspond to 0.1, half, 1, or 2 cpus.
Leave empty to indicate no limit.
#gpus
def gpus() -> ::Integer
- (::Integer) — Number of gpus.
#gpus=
def gpus=(value) -> ::Integer
- value (::Integer) — Number of gpus.
- (::Integer) — Number of gpus.
#latency_budget_ms
def latency_budget_ms() -> ::Integer
-
(::Integer) — 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.
#latency_budget_ms=
def latency_budget_ms=(value) -> ::Integer
-
value (::Integer) — 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.
-
(::Integer) — 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.
#memory
def memory() -> ::String
-
(::String) — 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.
#memory=
def memory=(value) -> ::String
-
value (::String) — 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.
-
(::String) — 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.
#memory_limits
def memory_limits() -> ::String
-
(::String) — Memory usage limits.
Examples: "128974848", "129e6", "129M", "123Mi", ... correspond to 128974848 bytes, 129000000 bytes, 129 mebibytes, 123 megabytes.
Leave empty to indicate no limit.
#memory_limits=
def memory_limits=(value) -> ::String
-
value (::String) — Memory usage limits.
Examples: "128974848", "129e6", "129M", "123Mi", ... correspond to 128974848 bytes, 129000000 bytes, 129 mebibytes, 123 megabytes.
Leave empty to indicate no limit.
-
(::String) — Memory usage limits.
Examples: "128974848", "129e6", "129M", "123Mi", ... correspond to 128974848 bytes, 129000000 bytes, 129 mebibytes, 123 megabytes.
Leave empty to indicate no limit.