Skip to content

Commit d76f4f0

Browse files
LucasLLCfacebook-github-bot
authored andcommitted
fix broken dcp_saver test (#828)
Summary: Pull Request resolved: #828 If keys are empty, it seems they are removed during flattening (a step in dcp.save). Accounting for this change fixes the test ghstack-source-id: 225758487 Reviewed By: saumishr, diego-urgell Differential Revision: D57126080 fbshipit-source-id: f713b06f92648e53680d8e9ad071c65fb9f84403
1 parent f3b9c52 commit d76f4f0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/framework/callbacks/test_dcp_saver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ def __init__(self, dataloader: DataLoader) -> None:
396396

397397
def state_dict(self) -> Dict[str, Any]:
398398
self.state_dict_call_count += 1
399-
return {}
399+
return {"some_data": 1}
400400

401401
def load_state_dict(self, state_dict: Dict[str, Any]) -> None:
402402
self.load_state_dict_call_count += 1

0 commit comments

Comments
 (0)