Skip to content

Commit d89cb3e

Browse files
committed
Minor update
1 parent a470bbb commit d89cb3e

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

alf/algorithms/algorithm.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1469,7 +1469,6 @@ def train_from_replay_buffer(self, update_global_counter=False):
14691469
``True``, it will affect the counter only if
14701470
``config.update_counter_every_mini_batch=True``.
14711471
"""
1472-
14731472
config: TrainerConfig = self._config
14741473

14751474
# returns 0 if haven't started training yet, when ``_replay_buffer`` is

alf/algorithms/rl_algorithm.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import os
2020
import time
2121
import torch
22-
from typing import Callable, List, Optional
22+
from typing import Callable, Optional
2323
from absl import logging
2424

2525
import alf
@@ -603,15 +603,14 @@ def _async_unroll(self, unroll_length: int):
603603

604604
def post_process_experience(self, rollout_info, step_type: StepType,
605605
experiences: Experience):
606-
"""A function for postprocessing experience. By default, it returns the input
606+
"""A function for postprocessing experience. By default, it returns the input
607607
experience unmodified. Users can customize this function in the derived
608608
class to achieve different effects. For example:
609609
- per-step processing: return the current step of experience unmodified (by default)
610-
or a modified version according to the customized ``post_process_experience`` function.
610+
or a modified version according to the customized ``post_process_experience``.
611611
As another example, task filtering can be simply achieved by returning ``[]``
612-
in ``post_process_experience`` for that particular task.
613-
- per-episode processing: ``should_post_process_experience`` returns True on episode
614-
end and ``post_process_experience`` can return a list of processed
612+
for that particular task.
613+
- per-episode processing: this can be achieved by returning a list of processed
615614
experiences. For example, this can be used for success episode labeling.
616615
617616
Args:
@@ -637,9 +636,7 @@ def _process_unroll_step(self, policy_step, action, time_step,
637636
to create customized post processing behaviors.
638637
639638
Args:
640-
experiences: a list of experience, containing the experience starting from the
641-
initial time when ``should_post_process_experience`` is False to the step where
642-
``should_post_process_experience`` is True.
639+
experiences: a list of experience
643640
"""
644641

645642
self.observe_for_metrics(time_step.cpu())

0 commit comments

Comments
 (0)