@@ -873,15 +873,23 @@ def process(self, input_data: RewardInput) -> RewardOutput:
873873 async def test_decorator_process_weighted_sum (self ):
874874 @reward_func ("quality" )
875875 class QualityProcessor (AbstractRewardProcessor ):
876+ # pylint: disable=unused-argument
876877 @sub_reward_func ("accuracy" , sub_weight = 0.6 )
877- def accuracy (self ) -> RewardOutput :
878+ def accuracy (
879+ self ,
880+ input_data : RewardInput ,
881+ ) -> RewardOutput :
878882 return RewardOutput (
879883 reward = Reward (reward_score = 1.0 ),
880884 status = TaskStatus .SUCCESS ,
881885 )
882886
887+ # pylint: disable=unused-argument
883888 @sub_reward_func ("fluency" , sub_weight = 0.4 )
884- def fluency (self ) -> RewardOutput :
889+ def fluency (
890+ self ,
891+ input_data : RewardInput ,
892+ ) -> RewardOutput :
885893 return RewardOutput (
886894 reward = Reward (reward_score = 0.5 ),
887895 status = TaskStatus .SUCCESS ,
@@ -908,8 +916,12 @@ def process(self, input_data: RewardInput) -> RewardOutput:
908916 async def test_decorator_with_async_sub_funcs (self ):
909917 @reward_func ("async-test" )
910918 class AsyncProcessor (AbstractRewardProcessor ):
919+ # pylint: disable=unused-argument
911920 @sub_reward_func ("sub1" , sub_weight = 1.0 )
912- async def sub1 (self ) -> RewardOutput :
921+ async def sub1 (
922+ self ,
923+ input_data : RewardInput ,
924+ ) -> RewardOutput :
913925 return RewardOutput (
914926 reward = Reward (reward_score = 0.9 ),
915927 status = TaskStatus .SUCCESS ,
@@ -934,15 +946,23 @@ def process(self, input_data: RewardInput) -> RewardOutput:
934946 async def test_decorator_with_custom_aggregate (self ):
935947 @reward_func ("custom-agg" )
936948 class CustomAggProcessor (AbstractRewardProcessor ):
949+ # pylint: disable=unused-argument
937950 @sub_reward_func ("sub1" , sub_weight = 0.5 )
938- def sub1 (self ) -> RewardOutput :
951+ def sub1 (
952+ self ,
953+ input_data : RewardInput ,
954+ ) -> RewardOutput :
939955 return RewardOutput (
940956 reward = Reward (reward_score = 0.8 ),
941957 status = TaskStatus .SUCCESS ,
942958 )
943959
960+ # pylint: disable=unused-argument
944961 @sub_reward_func ("sub2" , sub_weight = 0.5 )
945- def sub2 (self ) -> RewardOutput :
962+ def sub2 (
963+ self ,
964+ input_data : RewardInput ,
965+ ) -> RewardOutput :
946966 return RewardOutput (
947967 reward = Reward (reward_score = 0.6 ),
948968 status = TaskStatus .SUCCESS ,
@@ -974,12 +994,20 @@ def aggregate(
974994 async def test_decorator_sub_func_error_handling (self ):
975995 @reward_func ("error-test" )
976996 class ErrorProcessor (AbstractRewardProcessor ):
997+ # pylint: disable=unused-argument
977998 @sub_reward_func ("failing" , sub_weight = 0.5 )
978- def failing (self , input_data : RewardInput ) -> RewardOutput :
999+ def failing (
1000+ self ,
1001+ input_data : RewardInput ,
1002+ ) -> RewardOutput :
9791003 raise RuntimeError ("Computation failed" )
9801004
1005+ # pylint: disable=unused-argument
9811006 @sub_reward_func ("working" , sub_weight = 0.5 )
982- def working (self ) -> RewardOutput :
1007+ def working (
1008+ self ,
1009+ input_data : RewardInput ,
1010+ ) -> RewardOutput :
9831011 return RewardOutput (
9841012 reward = Reward (reward_score = 1.0 ),
9851013 status = TaskStatus .SUCCESS ,
@@ -1173,8 +1201,12 @@ def process(self, input_data: RewardInput) -> RewardOutput:
11731201 async def test_decorator_with_async_aggregate (self ):
11741202 @reward_func ("async-agg" )
11751203 class AsyncAggProcessor (AbstractRewardProcessor ):
1204+ # pylint: disable=unused-argument
11761205 @sub_reward_func ("sub1" , sub_weight = 1.0 )
1177- def sub1 (self ) -> RewardOutput :
1206+ def sub1 (
1207+ self ,
1208+ input_data : RewardInput ,
1209+ ) -> RewardOutput :
11781210 return RewardOutput (
11791211 reward = Reward (reward_score = 0.7 ),
11801212 status = TaskStatus .SUCCESS ,
0 commit comments