Skip to content

Bug: 'Using a slow image processor' suppression silently broken in _warnings.py #420

Description

@tezheng

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.

Metadata

Metadata

Labels

P0Critical — blocking, crash, data lossbugSomething isn't workingdev experienceDeveloper experience improvements

Type

Fields

No fields configured for Bug.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions