Remove else check
This commit is contained in:
parent
c0e148bc27
commit
2e50c2e653
|
@ -13,6 +13,7 @@
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
from pytorch_lightning.utilities import FAIRSCALE_AVAILABLE
|
from pytorch_lightning.utilities import FAIRSCALE_AVAILABLE
|
||||||
|
|
||||||
|
LightningShardedDataParallel = None
|
||||||
if FAIRSCALE_AVAILABLE:
|
if FAIRSCALE_AVAILABLE:
|
||||||
from fairscale.nn.data_parallel.sharded_ddp import ShardedDataParallel
|
from fairscale.nn.data_parallel.sharded_ddp import ShardedDataParallel
|
||||||
|
|
||||||
|
@ -29,6 +30,3 @@ if FAIRSCALE_AVAILABLE:
|
||||||
else:
|
else:
|
||||||
outputs = self.module.validation_step(*inputs, **kwargs)
|
outputs = self.module.validation_step(*inputs, **kwargs)
|
||||||
return outputs
|
return outputs
|
||||||
|
|
||||||
else:
|
|
||||||
LightningShardedDataParallel = None
|
|
||||||
|
|
Loading…
Reference in New Issue