Skip to content

Commit

Permalink
silent some warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
catwell committed Dec 20, 2024
1 parent 7740ba1 commit 1eb5bad
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,11 @@ imaginAIry = "imaginAIry"
filterwarnings = [
"ignore::UserWarning:segment_anything_hq.modeling.tiny_vit_sam.*",
"ignore::DeprecationWarning:timm.models.layers.*",
"ignore::DeprecationWarning:timm.models.registry.*"
"ignore::DeprecationWarning:timm.models.registry.*",
"ignore::FutureWarning:timm.models.layers.*",
"ignore::FutureWarning:timm.models.registry.*",
"ignore:jsonschema.RefResolver is deprecated:DeprecationWarning",
# https://github.com/pytorch/pytorch/issues/136264
"ignore:__array__ implementation doesn't accept a copy keyword:DeprecationWarning",
]
addopts = "--import-mode=importlib"
2 changes: 1 addition & 1 deletion tests/training_utils/test_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ def test_warmup_lr(warmup_scheduler: WarmupScheduler) -> None:
warnings.filterwarnings(
"ignore",
category=UserWarning,
message=r"Detected call of `lr_scheduler.step\(\)` before `optimizer.step\(\)`",
message=r"Detected call of `lr_scheduler\.step\(\)` before `optimizer\.step\(\)`",
)
for _ in range(102):
warmup_scheduler.step()
Expand Down

0 comments on commit 1eb5bad

Please sign in to comment.