Skip to content

Commit 9d592fc

Browse files
committed
fix: typo num_episodes -> max_episode_length
1 parent 7f1e8aa commit 9d592fc

File tree

1 file changed

+6
-6
lines changed
  • src/evox/problems/neuroevolution/reinforcement_learning

1 file changed

+6
-6
lines changed

src/evox/problems/neuroevolution/reinforcement_learning/brax.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ def visualize(
172172
weights,
173173
output_type: str = "HTML",
174174
respect_done: bool = False,
175-
num_episodes: Optional[int] = None,
175+
max_episode_length: Optional[int] = None,
176176
*args,
177177
**kwargs,
178178
):
@@ -188,9 +188,9 @@ def visualize(
188188
The output type, either "HTML" or "rgb_array".
189189
respect_done
190190
Whether to respect the done signal.
191-
num_episodes
192-
The number of episodes to visualize, used to override the num_episodes in the constructor.
193-
If None, use the num_episodes in the constructor.
191+
max_episode_length
192+
Used to override the max_episode_length in the constructor.
193+
If None, use the max_episode_length in the constructor.
194194
"""
195195
assert output_type in [
196196
"HTML",
@@ -208,8 +208,8 @@ def visualize(
208208
else:
209209
rollout_state = (brax_state,)
210210

211-
num_episodes = num_episodes or self.num_episodes
212-
for _ in range(num_episodes):
211+
max_episode_length = max_episode_length or self.max_episode_length
212+
for _ in range(max_episode_length):
213213
if self.stateful_policy:
214214
state, brax_state = rollout_state
215215
action, state = self.policy(state, weights, brax_state.obs)

0 commit comments

Comments
 (0)