Skip to content

Commit 702412d

Browse files
authored
fix: ignore torchao SyntaxWarning in pytest filterwarnings (#5431)
Signed-off-by: Dan Gil <dagil@nvidia.com>
1 parent 85686f9 commit 702412d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,11 @@ filterwarnings = [
189189
################################################################################################
190190
# TRT-LLM
191191
################################################################################################
192+
# torchao sometimes emits SyntaxWarning from docstrings (e.g. invalid escape sequences) at import
193+
# time; our global `error` policy would otherwise fail test collection. Do not rely on module=
194+
# matching here because these can be raised during compilation where the module field may not
195+
# match as expected.
196+
"ignore:.*invalid escape sequence.*:SyntaxWarning",
192197
# torchao deprecation warnings for import path changes (see https://github.com/pytorch/ao/issues/2752)
193198
"ignore:Importing.*torchao\\.dtypes.*:DeprecationWarning",
194199
# nvidia-modelopt warning about transformers version incompatibility

0 commit comments

Comments
 (0)