Fix exception message for invalid custom string plugin (#4979)

* Fix exception error from generator to list of valid names

* Update pytorch_lightning/plugins/plugin_connector.py

Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>

Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
This commit is contained in:
Sean Naren 2020-12-05 23:36:05 +00:00 committed by GitHub
parent 849737e7ca
commit a51477ff25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -120,7 +120,7 @@ class PluginConnector:
f" {plugin} is not a supported lightning custom plugin." f" {plugin} is not a supported lightning custom plugin."
" If you're trying to pass a custom plugin, please pass this as an object to" " If you're trying to pass a custom plugin, please pass this as an object to"
" Trainer(plugins=[MyPlugin()]." " Trainer(plugins=[MyPlugin()]."
f" Supported plugins as string input: {(e.name for e in LightningCustomPlugins)}." f" Supported plugins as string input: {[e.name for e in LightningCustomPlugins]}."
) )
plugin_cls = LightningCustomPlugins[plugin].value plugin_cls = LightningCustomPlugins[plugin].value
return plugin_cls(trainer=self.trainer) return plugin_cls(trainer=self.trainer)