-
Notifications
You must be signed in to change notification settings - Fork 224
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
show error message #210
show error message #210
Conversation
Thanks. I agree with you about showing error message. I'd like to see message that starts with |
And should we add some sentence to how to fix this error like: 'target_link parameter {} is None. Maybe the model params are not initialized.\n Please forward dummy input before hand to determine parameter shape of the model.'.format(param_name) or something? |
It's a possible fix to forward dummy input. However, I'd rather not recommend it. |
Updated text.
Yeah, if |
Sorry. You are right. |
So you prefer below comment rather than current PR?
|
Yes, I prefer the longer comment. Some minor fixes:
|
Could you add testcases (in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
When we construct
QFunction
, and model parameter is not initialized (it happens when some Link is instantiated within_size=None
),copy_param
will fail because thetarget_link
'sparam
isNone
.This PR is to show user-friendly error message to let the user know what is the cause of this error.
I'd like to get comment that what kind of message is better.
I'm not sure the performance degrade by checking this type error.