update TRL filter (#3707)
* update TRL filter * both filters * Apply suggestion from @danielhanchen * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: Daniel Han <danielhanchen@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
3bc349f2d8
commit
2040946d68
1 changed files with 6 additions and 1 deletions
|
|
@ -68,9 +68,14 @@ def _get_cached_block_mask(
|
|||
|
||||
|
||||
class _TrlPackingWarningFilter(logging.Filter):
|
||||
to_filter = (
|
||||
"attention implementation is not",
|
||||
"kernels-community",
|
||||
)
|
||||
|
||||
def filter(self, record: logging.LogRecord) -> bool:
|
||||
message = record.getMessage()
|
||||
return not "kernels-community" in message
|
||||
return not any(substring in message for substring in self.to_filter)
|
||||
|
||||
|
||||
_TRL_FILTER_INSTALLED = False
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue