"src/vscode:/vscode.git/clone" did not exist on "eb5267f3778e30905dc77352195986d928156ae5"
Unverified Commit 1fa778d7 authored by Benjamin Lefaudeux's avatar Benjamin Lefaudeux Committed by GitHub
Browse files

[fix] Lightning compatibility (#510)

parent 5e8a6422
......@@ -400,7 +400,7 @@ class OSS(Optimizer):
# Populate the sharded optimizer state on the fly,
# remove the params that this rank does not own
if self.param_to_rank[param] != self.rank:
state_dict["state"][key] = None
state_dict["state"][key] = {}
else:
self.optim.state[param] = recursive_copy_to_device(value, non_blocking=True, device=param.device)
else:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment