Fix warning on apply() of state without benchmark.
@@ -485,12 +485,15 @@ class CompilerEnv(gym.Env):
:return: A new environment instance.
"""
if not self.in_episode:
- state_to_replay = self.state
if self.actions:
+ state_to_replay = self.state
self.logger.warning(
"Parent service of fork() has died, replaying state"
)
+ else:
+ state_to_replay = None
self.reset()
+ if state_to_replay:
self.apply(state_to_replay)
request = ForkSessionRequest(session_id=self._session_id)
