Skip to content

Commit

Permalink
#625 fix even even more pre-commit errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Michelfeit committed Dec 2, 2022
1 parent 412550d commit 7c3470e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/imitation/algorithms/preference_comparisons.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ def has_pretraining(self) -> bool:
By default, True is returned if the unsupervised_pretrain() method is not
overriden, bud subclasses may choose to override this behavior.
Returns:
True if this generator has a pre-training phase, False otherwise
"""
orig_impl = TrajectoryGenerator.unsupervised_pretrain
return type(self).unsupervised_pretrain != orig_impl
Expand All @@ -105,7 +108,7 @@ def unsupervised_pretrain(self, steps: int, **kwargs: Any) -> None:
f"{steps} timesteps allocated for unsupervised pre-training:"
" Trajectory generators without pre-training implementation should"
" not consume any timesteps (otherwise the total number of"
" timesteps executed may be misleading)"
" timesteps executed may be misleading)",
)

def train(self, steps: int, **kwargs: Any) -> None:
Expand Down

0 comments on commit 7c3470e

Please sign in to comment.