We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 64879bd commit 58ab100Copy full SHA for 58ab100
tests/pytorch/test_simple_write.py
@@ -266,6 +266,12 @@ def saveall_test_helper(hook=None):
266
else:
267
addendum = "jsonloading"
268
hook._cleanup()
269
+
270
+ # smdebug hook should not be pickled. Check if model is saved without issues.
271
+ # The following two lines will error out if there is an attempt to pickle the hook.
272
+ torch.save(model.state_dict(), "/tmp/test_output/test_hook_saveall/model_weights")
273
+ torch.save(model, "/tmp/test_output/test_hook_saveall/model")
274
275
delete_local_trials(["/tmp/test_output/test_hook_saveall/" + addendum])
276
277
0 commit comments