math_reward
function.
For a complete, runnable example of math evaluation using the GSM8K dataset, including Hydra configuration for reward-kit run
, please refer to the Math Example README located in the examples/math_example/
directory.
The content below details the capabilities and programmatic usage of the underlying math_reward
function, which is utilized within the examples/math_example
.
math_reward
Function Overviewmath_reward
function (found in reward_kit.rewards.math
) allows you to:
math_reward
function directly in Python as shown below, ensure you have:
pip install reward-kit
.
(Note: Running the full examples/math_example
might require pip install -e ".[dev]"
as per its README).math_reward
math_reward
function. This can be useful for testing the function’s behavior or integrating it into custom scripts. For evaluating a dataset of math problems, refer to the examples/math_example/
.
Here’s a simple example:
math_reward
Worksmath_reward
function:
math_reward