Skip to content

Commit

Permalink
Stop suppressing gandlf config errors (#963)
Browse files Browse the repository at this point in the history
If gandlf config cannot be parsed properly (typos, wrong values, etc), now the error is just suppressed without any meaningful error and `gandlf_config` variable is just broken.

Fix ensures
1. runner fails if gandlf config cannot be parsed,
2. if any errors, they are printed to logs with their stacktrace

Signed-off-by: Viacheslav Kukushkin <[email protected]>
Signed-off-by: manuelhsantana <[email protected]>
  • Loading branch information
VukW authored and manuelhsantana committed Jul 9, 2024
1 parent 35c5f7f commit 64c4d6f
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions openfl/federated/task/runner_gandlf.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,7 @@ def __init__(
if isinstance(gandlf_config, str) and os.path.exists(gandlf_config):
gandlf_config = yaml.safe_load(open(gandlf_config, "r"))

try:
gandlf_config = ConfigManager(gandlf_config)
except Exception:
self.logger.info("WARNING: GANDLF.config_manager.ConfigManager did not work.")
gandlf_config = ConfigManager(gandlf_config)

(
model,
Expand Down

0 comments on commit 64c4d6f

Please sign in to comment.