Skip to content

Commit

Permalink
Stop suppressing gandlf config errors
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
  • Loading branch information
VukW authored Apr 26, 2024
1 parent 5e0f88e commit 3ac456e
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 @@ -48,10 +48,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 3ac456e

Please sign in to comment.