Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

detecting unwrapped parameters #364

Closed
NicholasKiefer opened this issue Apr 5, 2024 · 1 comment
Closed

detecting unwrapped parameters #364

NicholasKiefer opened this issue Apr 5, 2024 · 1 comment

Comments

@NicholasKiefer
Copy link

When specifying unwrapped parameters, the function _detect_unwrapped_parameters(...) always fails, in line 664 in torch_pruning.dependency here:

        unwrapped_detected = list( set(unwrapped_detected) - set([p for (p, _) in unwrapped_parameters]) )

because python will fail on [p for (p, _) in unwrapped_parameters], because unwrapped_parameters is a dict. I don't know enough about the code to do a pull request fixing that.

@janthmueller
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants