schema
RewardDimension
Bases: BaseModel
Base class for reward dimensions containing common attributes.
Attributes:
Name | Type | Description |
---|---|---|
name |
str
|
Identifier name for the reward dimension |
reason |
str
|
Explanation of how the reward value was determined |
Source code in rm_gallery/core/reward/schema.py
6 7 8 9 10 11 12 13 14 15 16 17 |
|
RewardDimensionWithRank
Bases: RewardDimension
ListWise/Pointwise reward dimension with ranking values.
Attributes:
Name | Type | Description |
---|---|---|
rank |
List[float]
|
Collection of ranking scores for different positions |
Methods:
Name | Description |
---|---|
__getitem__ |
Returns a scored reward dimension for a specific rank position |
Source code in rm_gallery/core/reward/schema.py
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
|
__getitem__(index)
Access a specific position's reward information.
:param index: Position in the ranking list to retrieve :type index: int :returns: Reward information with score for the specified position :rtype: RewardDimensionWithScore
Source code in rm_gallery/core/reward/schema.py
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
|
RewardDimensionWithScore
Bases: RewardDimension
Pointwise/Stepwise reward dimension with a numerical score.
Attributes:
Name | Type | Description |
---|---|---|
score |
float
|
Numerical value representing the reward magnitude |
Source code in rm_gallery/core/reward/schema.py
20 21 22 23 24 25 26 27 28 |
|
RewardResult
Bases: BaseModel
, Generic[T]
Container for reward calculation results with generic type support.
Attributes:
Name | Type | Description |
---|---|---|
name |
str
|
Identifier of the reward module that generated this result |
details |
List[T]
|
Collection of detailed reward information items |
extra_data |
dict
|
Additional metadata or context information |
Source code in rm_gallery/core/reward/schema.py
65 66 67 68 69 70 71 72 73 74 75 76 77 |
|