Skip to content
4 changes: 1 addition & 3 deletions rllib/env/env_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,12 +236,10 @@ def _try_env_step(self, actions):
except Exception as e:
self.metrics.log_value(NUM_ENV_STEP_FAILURES_LIFETIME, 1, reduce="sum")

# @OldAPIStack (config.restart_failed_sub_environments)
if self.config.restart_failed_sub_environments:
if not isinstance(e, StepFailedRecreateEnvError):
logger.exception(
"Stepping the env resulted in an error! The original error "
f"is: {e}"
f"RLlib {self.__class__.__name__}: Environment step failed. Will force reset env(s) in this EnvRunner. The original error is: {e}"
)
# Recreate the env.
self.make_env()
Expand Down
3 changes: 0 additions & 3 deletions rllib/env/multi_agent_env_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,9 +363,6 @@ def _sample(
# Try stepping the environment.
results = self._try_env_step(actions_for_env)
if results == ENV_STEP_FAILURE:
logging.warning(
f"RLlib {self.__class__.__name__}: Environment step failed. Will force reset env(s) in this EnvRunner."
)
return self._sample(
num_timesteps=num_timesteps,
num_episodes=num_episodes,
Expand Down