mirror of
https://github.com/vale981/ray
synced 2025-03-06 10:31:39 -05:00
[rllib] Fix trainer state restore (#5257)
This commit is contained in:
parent
9c651f47bb
commit
97c43284a6
1 changed files with 2 additions and 2 deletions
|
@ -151,12 +151,12 @@ def build_trainer(name,
|
|||
|
||||
def __getstate__(self):
|
||||
state = Trainer.__getstate__(self)
|
||||
state.update(self.state)
|
||||
state["trainer_state"] = self.state.copy()
|
||||
return state
|
||||
|
||||
def __setstate__(self, state):
|
||||
Trainer.__setstate__(self, state)
|
||||
self.state = state
|
||||
self.state = state["trainer_state"].copy()
|
||||
|
||||
@staticmethod
|
||||
def with_updates(**overrides):
|
||||
|
|
Loading…
Add table
Reference in a new issue