Update pytorch_lightning/trainer/connectors/precision_connector.py

Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
This commit is contained in:
Sean Naren 2020-11-27 14:45:15 +00:00 committed by GitHub
parent cdd2e122fc
commit 4f693762ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -74,8 +74,9 @@ class PrecisionConnector:
rank_zero_warn('You have asked for Apex AMP but you have not installed it yet.'
' Install apex first using this guide: https://github.com/NVIDIA/apex#linux')
elif using_sharded_plugin:
raise MisconfigurationException('Sharded Plugin is not supported with Apex AMP, '
'please using native AMP for 16 bit precision.')
raise MisconfigurationException(
'Sharded Plugin is not supported with Apex AMP, please using native AMP for 16-bit precision.'
)
else:
log.info('Using APEX 16bit precision.')
self.trainer.amp_backend = AMPType.APEX