From a51477ff258e3b054afe0c31116e66a1c009758b Mon Sep 17 00:00:00 2001 From: Sean Naren Date: Sat, 5 Dec 2020 23:36:05 +0000 Subject: [PATCH] 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 Co-authored-by: Rohit Gupta Co-authored-by: Jirka Borovec --- pytorch_lightning/plugins/plugin_connector.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytorch_lightning/plugins/plugin_connector.py b/pytorch_lightning/plugins/plugin_connector.py index a7ec793274..b6ede3ab7c 100644 --- a/pytorch_lightning/plugins/plugin_connector.py +++ b/pytorch_lightning/plugins/plugin_connector.py @@ -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)