Skip to content

Conversation

@mario-koddenbrock
Copy link
Contributor

This commit addresses a noisy warning and improves the robustness of the base pipeline implementation.

  • The device placement message in the pipeline base class has been changed from a warning to a debug log. This reduces log noise for users who are aware of their device setup, while still providing the information for debugging purposes.

  • Additionally, potential UnboundLocalError exceptions in the _pad and check_model_type functions have been prevented by initializing variables before their conditional assignment.

This commit addresses a noisy warning and improves the robustness of the base pipeline implementation.

- The device placement message in the pipeline base class has been changed from a `warning` to a `debug` log. This reduces log noise for users who are aware of their device setup, while still providing the information for debugging purposes.

- Additionally, potential `UnboundLocalError` exceptions in the `_pad` and `check_model_type` functions have been prevented by initializing variables before their conditional assignment.
Copy link
Member

@Rocketknight1 Rocketknight1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good fixes! I need to refactor this to simplify the separate logic for each dim value, though - that shouldn't be necessary.

@Rocketknight1 Rocketknight1 enabled auto-merge (squash) October 16, 2025 12:30
@Rocketknight1 Rocketknight1 merged commit 35dc8f0 into huggingface:main Oct 16, 2025
22 checks passed
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

ngazagna-qc pushed a commit to ngazagna-qc/transformers that referenced this pull request Oct 23, 2025
This commit addresses a noisy warning and improves the robustness of the base pipeline implementation.

- The device placement message in the pipeline base class has been changed from a `warning` to a `debug` log. This reduces log noise for users who are aware of their device setup, while still providing the information for debugging purposes.

- Additionally, potential `UnboundLocalError` exceptions in the `_pad` and `check_model_type` functions have been prevented by initializing variables before their conditional assignment.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants