Closed GaetanLepage closed 1 year ago
hrmm, have not run the full tests on 2.1 but have been training with it, this is a bit concerning... will look
It passes if I comment out the CPU part of the test and leave CUDA only (running on local machine w/ GPU). This is a pickle
EDIT: disregard that, failing on a diff part of the test.
So the torch_tc.assertEqual(state_dict, state_dict_c) is only part failing, and it seemes the behaviour of
state_dict_c = deepcopy(optimizer.state_dict())
optimizer_c.load_state_dict(state_dict_c)
changed such that load_state_dict possibly cloned the tensors in the past and doesn't anymore? PyTorch optim tests removed that check line....
Sorted, the params are no longer deepcopied on the optimizer load_state_dict call so tests needed to be changed slightly
Thank you very much for this very quick fix :)
Describe the bug When using the latest version of pytorch (v2.1.0), many (all ?) tests from
test_optim.py
fail.To Reproduce Steps to reproduce the behavior:
pytest tests/test_optim.py
Expected behavior The test pass.
Screenshots End of the logs:
Desktop (please complete the following information):