Closed farazkh80 closed 1 week ago
When a module contains a container (e.g., list) of parameters, replacing a parameter inside that container with a non-parameter
module.param_list[0] = tp.ones(...))
causes it to disappear from the module.state_dict.
module.state_dict
We could prevent changing a Parameter attr of a module into a non-Parameter, but this is not easy for members of collections
Parameter
non-Parameter
@farazkh80 Is this resolved? If not, can we reopen this issue? The behavior is confusing right now since we automatically convert to Parameters except for items in collections
When a module contains a container (e.g., list) of parameters, replacing a parameter inside that container with a non-parameter
causes it to disappear from the
module.state_dict
.We could prevent changing a
Parameter
attr of a module into anon-Parameter
, but this is not easy for members of collections