DHDRL commited on
Commit
3c6968d
·
verified ·
1 Parent(s): d2a6431

Update gru_env_wrappers.py

Browse files
Files changed (1) hide show
  1. gru_env_wrappers.py +1 -6
gru_env_wrappers.py CHANGED
@@ -1,6 +1,6 @@
1
  #!/usr/bin/env python3
2
  """
3
- GRU-Aware Environment Wrapper - FIXED FOR SB3 SAFETY
4
  =====================================================
5
  """
6
 
@@ -13,9 +13,6 @@ class GRUStateManager(gym.Wrapper):
13
  """
14
  CRITICAL WRAPPER: Manages GRU hidden state lifecycle externally.
15
 
16
- This prevents hidden state from being stored in the model,
17
- which would cause massive checkpoint files.
18
-
19
  Responsibilities:
20
  - Store hidden state outside model
21
  - Reset state at episode boundaries
@@ -34,7 +31,6 @@ class GRUStateManager(gym.Wrapper):
34
  self._episode_count = 0
35
 
36
  def set_policy(self, policy):
37
- """Set policy reference after wrapper creation."""
38
  self.policy = policy
39
  self._initialize_hidden_state()
40
 
@@ -96,7 +92,6 @@ class GRUStateManager(gym.Wrapper):
96
  class CurriculumGRUToggleWrapper(gym.Wrapper):
97
  """
98
  Tracks curriculum phase for logging.
99
-
100
  GRU toggling is disabled: GRU must be configured statically at
101
  model construction time. This wrapper only tracks phase transitions.
102
  """
 
1
  #!/usr/bin/env python3
2
  """
3
+ GRU-Aware Environment Wrapper
4
  =====================================================
5
  """
6
 
 
13
  """
14
  CRITICAL WRAPPER: Manages GRU hidden state lifecycle externally.
15
 
 
 
 
16
  Responsibilities:
17
  - Store hidden state outside model
18
  - Reset state at episode boundaries
 
31
  self._episode_count = 0
32
 
33
  def set_policy(self, policy):
 
34
  self.policy = policy
35
  self._initialize_hidden_state()
36
 
 
92
  class CurriculumGRUToggleWrapper(gym.Wrapper):
93
  """
94
  Tracks curriculum phase for logging.
 
95
  GRU toggling is disabled: GRU must be configured statically at
96
  model construction time. This wrapper only tracks phase transitions.
97
  """