From ba6b279e6199a7d8ea0dd0de4e9ee7d05a445dd2 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 8 May 2026 08:51:03 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- unsloth/models/loader_utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/unsloth/models/loader_utils.py b/unsloth/models/loader_utils.py index 99c327c10a..c0c6455a2e 100644 --- a/unsloth/models/loader_utils.py +++ b/unsloth/models/loader_utils.py @@ -68,7 +68,10 @@ def _get_env_int(keys): def _infer_distributed_ranks(): - if torch.distributed.is_available() and getattr(torch.distributed, "is_initialized", lambda: False)(): + if ( + torch.distributed.is_available() + and getattr(torch.distributed, "is_initialized", lambda: False)() + ): try: return torch.distributed.get_rank(), torch.distributed.get_world_size() except Exception: