Closed NicholasKiefer closed 3 months ago
It seems the typing hint provided is incorrect. Based on my understanding and examples provided in the documentation, it should be typing.List[typing.Tuple[nn.Parameter, int]]
. This can be confirmed by referring to the Wiki for High-level Pruners, specifically looking into the unwrapped_parameters
section.
When specifying unwrapped parameters, the function
_detect_unwrapped_parameters(...)
always fails, in line 664 in torch_pruning.dependency here:because python will fail on
[p for (p, _) in unwrapped_parameters]
, becauseunwrapped_parameters
is a dict. I don't know enough about the code to do a pull request fixing that.