Summary
_PipelineNoiseFilter in src/winml/modelkit/_warnings.py includes "Using a slow image processor" in its _SUPPRESSED tuple, but the filter is only attached to one logger (transformers.pipelines.base). The message is actually emitted by transformers.models.auto.image_processing_auto, so the suppression never fires.
Commit 324407d had explicitly added the second logger target to fix exactly this. It was dropped sometime after that commit.
Reported by @DingmaomaoBJTU in code review of #398.
Repro
Any caller of AutoImageProcessor.from_pretrained(use_fast=False) (e.g. image segmentation pipelines) emits the warning even with the suppression listed.
Fix
Re-attach _PipelineNoiseFilter to the second logger:
```python
for _logger_name in (
"transformers.pipelines.base",
"transformers.models.auto.image_processing_auto",
):
logging.getLogger(_logger_name).addFilter(_PipelineNoiseFilter())
```
Or use the loop pattern from 324407d directly.
Why not in #398
#398 is the CLI startup regression fix (delete the eager from torch.jit import TracerWarning block). It's intentionally focused; this is an unrelated suppression-config regression.
Severity
Low — UX noise during HF pipeline use. Functional behavior unaffected.
Summary
_PipelineNoiseFilterinsrc/winml/modelkit/_warnings.pyincludes"Using a slow image processor"in its_SUPPRESSEDtuple, but the filter is only attached to one logger (transformers.pipelines.base). The message is actually emitted bytransformers.models.auto.image_processing_auto, so the suppression never fires.Commit 324407d had explicitly added the second logger target to fix exactly this. It was dropped sometime after that commit.
Reported by @DingmaomaoBJTU in code review of #398.
Repro
Any caller of
AutoImageProcessor.from_pretrained(use_fast=False)(e.g. image segmentation pipelines) emits the warning even with the suppression listed.Fix
Re-attach
_PipelineNoiseFilterto the second logger:```python
for _logger_name in (
"transformers.pipelines.base",
"transformers.models.auto.image_processing_auto",
):
logging.getLogger(_logger_name).addFilter(_PipelineNoiseFilter())
```
Or use the loop pattern from 324407d directly.
Why not in #398
#398 is the CLI startup regression fix (delete the eager
from torch.jit import TracerWarningblock). It's intentionally focused; this is an unrelated suppression-config regression.Severity
Low — UX noise during HF pipeline use. Functional behavior unaffected.