@@ -406,7 +406,16 @@ def timestep():
406406ma_dict = {}
407407
408408
409- def ma_record_tabular (key , val , record_len , ignore_nan = False , exclude :Optional [Union [str , Tuple [str , ...]]]= None , freq :Optional [int ]= None ):
409+ def ma_record_tabular (key , val , record_len :[int ], ignore_nan = False , exclude :Optional [Union [str , Tuple [str , ...]]]= None , freq :Optional [int ]= None ):
410+ """
411+ Moving Averaged log recorder
412+ :param key: save to log this key
413+ :param val: save to log this value
414+ :param record_len: sliding window size for averaged value computation
415+ :param ignore_nan: ignore the nan value or not
416+ :param exclude: exclude to save the log to some types of logger (e.g., 'stdout', 'log', 'json', 'csv' or 'tensorboard')
417+ :param freq: the log will be dumped only after the timestep gap (holden by the time_step_holder) of recording is larger than freq.
418+ """
410419 if key not in ma_dict :
411420 ma_dict [key ] = deque (maxlen = record_len )
412421 if ignore_nan :
@@ -428,6 +437,9 @@ def logkv(key, val, exclude:Optional[Union[str, Tuple[str, ...]]]=None, freq:Opt
428437
429438 :param key: (Any) save to log this key
430439 :param val: (Any) save to log this value
440+ :param exclude: exclude to save the log to some types of logger (e.g., 'stdout', 'log', 'json', 'csv' or 'tensorboard')
441+ :param freq: the log will be dumped only after the timestep gap (holden by the time_step_holder) of recording is larger than freq.
442+
431443 """
432444 if key not in lst_print_dict :
433445 lst_print_dict [key ] = - np .inf
@@ -629,6 +641,9 @@ def logkv(self, key, val, exclude:Optional[Union[str, Tuple[str, ...]]]=None):
629641
630642 :param key: (Any) save to log this key
631643 :param val: (Any) save to log this value
644+ :param exclude: exclude to save the log to some types of logger (e.g., 'stdout', 'log', 'json', 'csv' or 'tensorboard')
645+ :param freq: the log will be dumped only after the timestep gap (holden by the time_step_holder) of recording is larger than freq.
646+
632647 """
633648 self .name2val [key ] = val
634649 self .exclude_name [key ] = exclude
0 commit comments