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:
95
95
def unsupervised_pretrain (self , steps : int , ** kwargs : Any ) -> None :
96
96
"""Pre-train an agent before collecting comparisons.
97
97
98
- By default, this method asserts that pre-training has zero steps allocated.
99
98
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.
100
101
101
102
Args:
102
103
steps: number of environment steps to train for.
103
104
**kwargs: additional keyword arguments to pass on to
104
105
the training procedure.
105
106
"""
106
107
if steps > 0 :
107
- self . _logger . warn (
108
+ raise ValueError (
108
109
f"{ steps } timesteps allocated for unsupervised pre-training:"
109
110
" Trajectory generators without pre-training implementation should"
110
111
" not consume any timesteps (otherwise the total number of"
You can’t perform that action at this time.
0 commit comments