[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2026-05-08 09:22:18 +00:00
commit a7047229ff

View file

@ -1090,6 +1090,7 @@ def run_training_process(
# transformers and trl access it before that happens, causing AttributeError.
try:
import torch.distributed as _td # noqa: F401 -- forces full module load
if not hasattr(_td, "is_initialized"):
_td.is_initialized = lambda: False
except Exception: