-
Notifications
You must be signed in to change notification settings - Fork 27.5k
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
use logger.warning_once to avoid massive outputs #27428
use logger.warning_once to avoid massive outputs #27428
Conversation
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.
Thanks for updating - this is a great suggestion!
Would you mind extending this to our other models in the library?
Sure! Happy to do that. If I understand correctly, this will only apply to |
@ranchlai Awesome - thanks! Yep, that's right. Feel free to ping with any questions if you're not sure about any of them. |
@@ -264,7 +264,9 @@ def __init__(self, config, layer_id=0): | |||
try: | |||
load_wkv_cuda_kernel(config.context_length) | |||
except Exception: | |||
logger.info("Could not load the custom CUDA kernel for RWKV attention.") | |||
logger.warning_once( |
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.
@amyeroberts Not quite sure about this. This line is in the init of attention layers.
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.
In this case, I'd say let's keep it as info
as it's really just the exception message, so we want it to be unaffected by the cache.
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.
OK, will discard this commit
5e4076c
to
d223171
Compare
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.
Thanks for adding all of these!
* use logger.warning_once to avoid massive outputs when training/finetuning longformer * update more
* use logger.warning_once to avoid massive outputs when training/finetuning longformer * update more
What does this PR do?
This is a quick fix to to avoid massive outputs when training/finetuning longformer (for text classifcation) by using
logger.warning_once
rather thanlogger.info