-
Notifications
You must be signed in to change notification settings - Fork 661
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
Raise clearer Exception when calling method of unbound module #1014
Comments
In #1072, I tried fixing this by creating a custom error class for Module AtttributeError, but after a discussion with @avital we found that this is not a very natural solution because users expect a normal Solving this issue is a bit more work, and probably not our highest priority. For now I'm lowering the priority of this issue because it seems we won't fix it soon, and we can higher it when it turns out that more users run into this problem. |
Also unassigning myself since I don't plan to work on this soon. |
I'd like to take this issue. A simple solution would be to customize the current error message to suggest calling |
This already sounds an order of magnitude better than the current situation |
Using this minimal example
Problem you have encountered:
The last line raised the rather opaque error message
AttributeError: 'MultipleForw' object has no attribute 's1'
What you expected to happen:
The raised Exception should contain a hint that makes clear that calling a linen-Module correctly is by using
mf.apply(parameters, input)
. See Discussion #1013The text was updated successfully, but these errors were encountered: