Skip to content

fix: Fix missing function call in is_torch_xla_version - #14513

Open
Ricardo-M-L wants to merge 1 commit into
huggingface:mainfrom
Ricardo-M-L:fix/is-torch-xla-available-missing-call-clean
Open

fix: Fix missing function call in is_torch_xla_version#14513
Ricardo-M-L wants to merge 1 commit into
huggingface:mainfrom
Ricardo-M-L:fix/is-torch-xla-available-missing-call-clean

Conversation

@Ricardo-M-L

Copy link
Copy Markdown
Contributor

Clean rebase

`is_torch_xla_available` is a function but was referenced without
parentheses, checking the truthiness of the function object (always
True) instead of its return value. This means the guard never triggers
and the version comparison proceeds even when torch_xla is unavailable.

Use `_torch_xla_available` (the module-level variable) for consistency
with `is_transformers_version`, `is_accelerate_version`, and other
version checkers in the same file.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@github-actions github-actions Bot added the size/S PR with diff < 50 LOC label Aug 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Hi @Ricardo-M-L, thanks for the PR! It does not appear to link an issue it fixes. If this PR addresses an existing issue, please add a closing keyword (e.g. Fixes #1234) to the PR description so the issue is linked. See the contribution guide for more details. If this PR intentionally does not fix a tracked issue, a maintainer can add the no-issue-needed label to silence this reminder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/S PR with diff < 50 LOC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant