Commit 4d98b8bd authored by jameskrw's avatar jameskrw
Browse files

added traj reward as an abstract method

parent d294b891
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -163,8 +163,8 @@ class BaseInterface(ABC):
                assert len_of_images == len_of_image_in_text_template, f"len_of_images must be equal to len_of_image_in_text_template, got {len_of_images} and {len_of_image_in_text_template}"
        return obs, info
    
    @abstractmethod
    def get_traj_reward(self) -> float:
        """Get the reward of the environment."""
        return self.traj_reward
    
+3 −0
Original line number Diff line number Diff line
@@ -450,3 +450,6 @@ class SokobanInterface(BaseInterface):
    
    def get_task_instruction(self) -> str:
        return instruction_template
    
    def get_traj_reward(self):
        return self.traj_reward