Skip to content

Callback functions for Trainers ? #167

Answered by Toni-SM
AxKo asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @AxKo

Currently there are no callbacks in the library implementation.
However, a possible solution for a custom progress monitoring is to overwrite the Agent.write_tracking_data (see implementation) method to handle the self.tracking_data content according to the desired implementation.

from skrl.agents.torch.ppo import PPO

class DerivedPPO(PPO):
    def write_tracking_data(self, timestep: int, timesteps: int) -> None:
        # process data for custom progress monitoring
        #===================================
        for k, v in self.tracking_data.items():
            pass
        #===================================
            
        # reset data containers for next iteration

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by AxKo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants