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:
parent
849737e7ca
commit
a51477ff25
|
@ -120,7 +120,7 @@ class PluginConnector:
|
|||
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"
|
||||
" 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
|
||||
return plugin_cls(trainer=self.trainer)
|
||||
|
|
Loading…
Reference in New Issue