From c70ef8bb98524cf1b9012858a84c33c5b190cb0c Mon Sep 17 00:00:00 2001 From: Sarthak Pati Date: Tue, 16 Jan 2024 16:40:05 -0500 Subject: [PATCH] added config parsing check --- openfl/federated/task/runner_gandlf.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/openfl/federated/task/runner_gandlf.py b/openfl/federated/task/runner_gandlf.py index 7db12dcecf..29911c63b7 100644 --- a/openfl/federated/task/runner_gandlf.py +++ b/openfl/federated/task/runner_gandlf.py @@ -45,6 +45,13 @@ def __init__( if isinstance(gandlf_config, str) and os.path.exists(gandlf_config): gandlf_config = yaml.safe_load(open(gandlf_config, "r")) + # if we are here, the assumption is that GaNDLF is present in the environment + try: + from GANDLF.parseConfig import parseConfig as gandlf_config_parser + gandlf_config = gandlf_config_parser(gandlf_config) + except Exception: + self.logger.info("WARNING: GaNDLF doesn't seem to have been correctly installed") + ( model, optimizer,