|
63 | 63 | from lightning.pytorch.strategies.ddp import _DDP_FORK_ALIASES
|
64 | 64 | from lightning.pytorch.utilities.exceptions import MisconfigurationException
|
65 | 65 | from lightning.pytorch.utilities.imports import (
|
66 |
| - _LIGHTNING_BAGUA_AVAILABLE, |
67 | 66 | _LIGHTNING_COLOSSALAI_AVAILABLE,
|
68 | 67 | _graphcore_available_and_importable,
|
69 | 68 | _habana_available_and_importable,
|
@@ -196,9 +195,6 @@ def _check_config_and_set_final_flags(
|
196 | 195 | if strategy == "colossalai" and not _LIGHTNING_COLOSSALAI_AVAILABLE:
|
197 | 196 | raise ModuleNotFoundError(str(_LIGHTNING_COLOSSALAI_AVAILABLE))
|
198 | 197 |
|
199 |
| - if strategy == "bagua" and not _LIGHTNING_BAGUA_AVAILABLE: |
200 |
| - raise ModuleNotFoundError(str(_LIGHTNING_BAGUA_AVAILABLE)) |
201 |
| - |
202 | 198 | if strategy != "auto" and strategy not in self._registered_strategies and not isinstance(strategy, Strategy):
|
203 | 199 | raise ValueError(
|
204 | 200 | f"You selected an invalid strategy name: `strategy={strategy!r}`."
|
@@ -421,11 +417,6 @@ def _choose_and_init_cluster_environment(self) -> ClusterEnvironment:
|
421 | 417 | ):
|
422 | 418 | if env_type.detect():
|
423 | 419 | return env_type()
|
424 |
| - if _LIGHTNING_BAGUA_AVAILABLE: |
425 |
| - from lightning_bagua import BaguaEnvironment |
426 |
| - |
427 |
| - if BaguaEnvironment.detect(): |
428 |
| - return BaguaEnvironment() |
429 | 420 | return LightningEnvironment()
|
430 | 421 |
|
431 | 422 | def _choose_strategy(self) -> Union[Strategy, str]:
|
@@ -690,13 +681,6 @@ def _register_external_accelerators_and_strategies() -> None:
|
690 | 681 | if "colossalai" not in StrategyRegistry:
|
691 | 682 | ColossalAIStrategy.register_strategies(StrategyRegistry)
|
692 | 683 |
|
693 |
| - if _LIGHTNING_BAGUA_AVAILABLE: |
694 |
| - from lightning_bagua import BaguaStrategy |
695 |
| - |
696 |
| - # TODO: Prevent registering multiple times |
697 |
| - if "bagua" not in StrategyRegistry: |
698 |
| - BaguaStrategy.register_strategies(StrategyRegistry) |
699 |
| - |
700 | 684 | if _habana_available_and_importable():
|
701 | 685 | from lightning_habana import HPUAccelerator, HPUParallelStrategy, SingleHPUStrategy
|
702 | 686 |
|
|
0 commit comments