copy.deepcopy is used in some training loops to save a copy of the model parameters that has the best validation loss. Currently, the following code gives an error:
import copy
from torchtyping import TensorType
copy.deepcopy(TensorType["batch", "embedding"])
TypeError: __setitem__() takes 2 positional arguments but 3 were given
Instead, copying the dictionary should just return the dictionary unaltered. Since it cannot be changed, the copy does nothing.
copy.deepcopy
is used in some training loops to save a copy of the model parameters that has the best validation loss. Currently, the following code gives an error:Instead, copying the dictionary should just return the dictionary unaltered. Since it cannot be changed, the copy does nothing.