Skip to content

Commit

Permalink
added config parsing check
Browse files Browse the repository at this point in the history
  • Loading branch information
sarthakpati authored Jan 16, 2024
1 parent f1657ab commit c70ef8b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions openfl/federated/task/runner_gandlf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit c70ef8b

Please sign in to comment.