Class: OnnxRuby::Configuration
- Inherits:
-
Object
- Object
- OnnxRuby::Configuration
- Defined in:
- lib/onnx_ruby/configuration.rb
Instance Attribute Summary collapse
-
#default_log_level ⇒ Object
Returns the value of attribute default_log_level.
-
#default_providers ⇒ Object
Returns the value of attribute default_providers.
-
#models_path ⇒ Object
Returns the value of attribute models_path.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #pool_size ⇒ Object
- #pool_size=(value) ⇒ Object
- #pool_timeout ⇒ Object
- #pool_timeout=(value) ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
7 8 9 10 11 12 13 |
# File 'lib/onnx_ruby/configuration.rb', line 7 def initialize @models_path = "app/models/onnx" @default_providers = [:cpu] @default_log_level = :warning @pool_size = 5 @pool_timeout = 5 end |
Instance Attribute Details
#default_log_level ⇒ Object
Returns the value of attribute default_log_level.
5 6 7 |
# File 'lib/onnx_ruby/configuration.rb', line 5 def default_log_level @default_log_level end |
#default_providers ⇒ Object
Returns the value of attribute default_providers.
5 6 7 |
# File 'lib/onnx_ruby/configuration.rb', line 5 def default_providers @default_providers end |
#models_path ⇒ Object
Returns the value of attribute models_path.
5 6 7 |
# File 'lib/onnx_ruby/configuration.rb', line 5 def models_path @models_path end |
Instance Method Details
#pool_size ⇒ Object
15 16 17 |
# File 'lib/onnx_ruby/configuration.rb', line 15 def pool_size @pool_size end |
#pool_size=(value) ⇒ Object
19 20 21 22 23 |
# File 'lib/onnx_ruby/configuration.rb', line 19 def pool_size=(value) raise ArgumentError, "pool_size must be a positive Integer" unless value.is_a?(Integer) && value > 0 @pool_size = value end |
#pool_timeout ⇒ Object
25 26 27 |
# File 'lib/onnx_ruby/configuration.rb', line 25 def pool_timeout @pool_timeout end |
#pool_timeout=(value) ⇒ Object
29 30 31 32 33 |
# File 'lib/onnx_ruby/configuration.rb', line 29 def pool_timeout=(value) raise ArgumentError, "pool_timeout must be a positive Numeric" unless value.is_a?(Numeric) && value > 0 @pool_timeout = value end |