File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -95,16 +95,17 @@ def has_pretraining(self) -> bool:
9595 def unsupervised_pretrain (self , steps : int , ** kwargs : Any ) -> None :
9696 """Pre-train an agent before collecting comparisons.
9797
98- By default, this method asserts that pre-training has zero steps allocated.
9998 Override this behavior in subclasses that implement pre-training.
99+ If not overriden, this method raises ValueError when non-zero steps are
100+ allocated for pre-training.
100101
101102 Args:
102103 steps: number of environment steps to train for.
103104 **kwargs: additional keyword arguments to pass on to
104105 the training procedure.
105106 """
106107 if steps > 0 :
107- self . _logger . warn (
108+ raise ValueError (
108109 f"{ steps } timesteps allocated for unsupervised pre-training:"
109110 " Trajectory generators without pre-training implementation should"
110111 " not consume any timesteps (otherwise the total number of"
You can’t perform that action at this time.
0 commit comments