fix name error when accelerate is not available (#26278)

* fix name error when accelerate is not available

* fix `is_fsdp_available`
This commit is contained in:
Sourab Mangrulkar
2023-09-20 11:32:55 +05:30
committed by GitHub
parent 382ba670ed
commit 86ffd5ffa2
2 changed files with 2 additions and 1 deletions

View File

@@ -79,6 +79,7 @@ if is_torch_available():
# hack to restore original logging level pre #21700
get_regression_trainer = partial(tests.trainer.test_trainer.get_regression_trainer, log_level="info")
require_fsdp_version = require_fsdp
if is_accelerate_available():
from accelerate.utils.constants import (
FSDP_PYTORCH_VERSION,