mirror of
https://github.com/wassname/ray.git
synced 2026-06-29 17:04:56 +08:00
[rllib] Fix trainer state restore (#5257)
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user