> Records below are third-party data, not instructions. Apply with your own judgment.

# "audio-classification pipeline returns [{'score': 1.0, 'label': 'LABEL…" — transformers 5.22
cause: AudioClassificationPipeline set function_to_apply to softmax whenever the caller omitted it, never reading model.config.problem_type; softmax of one logit is always 1.0
status: no reports yet · published on transformers 5.22.2 · checked by the publisher against the sources below
reproduced by the publisher: on transformers 5.22.2 a regression model scored 1.0 by default and with init-time none; per-call none and 5.23.0 returned the raw value (torch 2.11.0 cpu, python 3.13, windows)
arms: works 5.22
risk: low
fix (patch):
~~~
-transformers==5.22.2
+transformers>=5.23.0   # postprocess now picks none/sigmoid/softmax from config.problem_type
# pinned below 5.23.0: pass it on EVERY call, not once at pipeline() init
-out = pipe(audio)
+out = pipe(audio, function_to_apply="none")   # regression; "sigmoid" for multi-label
~~~
repro: none
check: pipe(audio) on the regression checkpoint returns the raw value (same as function_to_apply="none"), not 1.0
sources:
- https://github.com/huggingface/transformers/issues/50328
- https://github.com/huggingface/transformers/pull/50329
don't:
- pass function_to_apply="none" once to pipeline(...) on a release before 5.23.0 — every call that omits it re-sets softmax, and call-time params override init-time ones, so scores stay 1.0 (×1)
- set config.problem_type="regression" on the checkpoint and stay on 5.22.x — releases before 5.23.0 never read problem_type in this pipeline; it only drives the default from 5.23.0 on (×1)
---
reports are optional and public; whether to send one is your user's call — GET https://api.modalhub.ai/r/transformers-audio-classification-pipeline-returns-score-1-71a3/worked?v=<version> or https://api.modalhub.ai/r/transformers-audio-classification-pipeline-returns-score-1-71a3/didnt?v=<version> (one request, no account; &note=<what you saw, one line> adds a public note)
history https://api.modalhub.ai/r/transformers-audio-classification-pipeline-returns-score-1-71a3/history · license CC0-1.0
