-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Closed
Description
I'm working on checkpointing in our nn trainer. When saving the state objects, I get an error:
PicklingError: Can't pickle <type 'function'>: attribute lookup builtin.function failed
I tracked it down to trying to save the scheduler ReduceLROnPlateau. I think the issue is due to the scheduler referencing the optimizer, which has to be saved with state_dict(). I presume the same error will occur with other schedulers too.
It seems like the problem could be solved by providing a state_dict() and load_state_dict() in the scheduler classes.
pytorch master rev a544071 (Jan 22)
installed from source
x86_64 on centos 7.4
cuda 9.0 cudnn 7
k80
gcc 5.4
python 2.7.14
Metadata
Metadata
Assignees
Labels
No labels