File size: 285 Bytes
5d5d65a
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
from abc import ABC, abstractmethod


class Callback(ABC):

    def __init__(self) -> None:
        super().__init__()
        self.timesteps_elapsed = 0

    def on_step(self, timesteps_elapsed: int = 1) -> bool:
        self.timesteps_elapsed += timesteps_elapsed
        return True