Class: Legion::LLM::Routing::Rank::RankedLane
- Inherits:
-
Object
- Object
- Legion::LLM::Routing::Rank::RankedLane
- Defined in:
- lib/legion/llm/routing/rank.rb
Overview
Immutable result of ranking one eligible lane: the lane plus the scalar ranking inputs that produced its effective weight and its rendezvous score.
Instance Attribute Summary collapse
-
#base_weight ⇒ Object
readonly
Returns the value of attribute base_weight.
-
#effective_weight ⇒ Object
readonly
Returns the value of attribute effective_weight.
-
#lane ⇒ Object
readonly
Returns the value of attribute lane.
-
#preference_ppm ⇒ Object
readonly
Returns the value of attribute preference_ppm.
-
#rendezvous_score ⇒ Object
readonly
Returns the value of attribute rendezvous_score.
-
#weight_inputs ⇒ Object
readonly
Returns the value of attribute weight_inputs.
Instance Method Summary collapse
-
#initialize(lane:, weight_inputs:, base_weight:, preference_ppm:, effective_weight:, rendezvous_score:) ⇒ RankedLane
constructor
A new instance of RankedLane.
Constructor Details
#initialize(lane:, weight_inputs:, base_weight:, preference_ppm:, effective_weight:, rendezvous_score:) ⇒ RankedLane
Returns a new instance of RankedLane.
35 36 37 38 39 40 41 42 43 44 |
# File 'lib/legion/llm/routing/rank.rb', line 35 def initialize(lane:, weight_inputs:, base_weight:, preference_ppm:, effective_weight:, rendezvous_score:, **) @lane = lane @weight_inputs = weight_inputs&.freeze @base_weight = base_weight @preference_ppm = preference_ppm @effective_weight = effective_weight @rendezvous_score = rendezvous_score freeze end |
Instance Attribute Details
#base_weight ⇒ Object (readonly)
Returns the value of attribute base_weight.
32 33 34 |
# File 'lib/legion/llm/routing/rank.rb', line 32 def base_weight @base_weight end |
#effective_weight ⇒ Object (readonly)
Returns the value of attribute effective_weight.
32 33 34 |
# File 'lib/legion/llm/routing/rank.rb', line 32 def effective_weight @effective_weight end |
#lane ⇒ Object (readonly)
Returns the value of attribute lane.
32 33 34 |
# File 'lib/legion/llm/routing/rank.rb', line 32 def lane @lane end |
#preference_ppm ⇒ Object (readonly)
Returns the value of attribute preference_ppm.
32 33 34 |
# File 'lib/legion/llm/routing/rank.rb', line 32 def preference_ppm @preference_ppm end |
#rendezvous_score ⇒ Object (readonly)
Returns the value of attribute rendezvous_score.
32 33 34 |
# File 'lib/legion/llm/routing/rank.rb', line 32 def rendezvous_score @rendezvous_score end |
#weight_inputs ⇒ Object (readonly)
Returns the value of attribute weight_inputs.
32 33 34 |
# File 'lib/legion/llm/routing/rank.rb', line 32 def weight_inputs @weight_inputs end |