Skip to content

Commit

Permalink
next try
Browse files Browse the repository at this point in the history
  • Loading branch information
jannikgro committed May 26, 2022
1 parent 09a433e commit 1e80e8c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions recommerce/configuration/config_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@ def validate_config(config: dict, config_is_final: bool) -> tuple:
failure: A status (False) and the errormessage as a string.
"""
try:
print(config)
# first check if the environment and hyperparameter parts are already split up
if 'environment' in config and 'hyperparameter' in config:
assert len(config) == 2, 'Your config should not contain keys other than "environment" and "hyperparameter"'
hyperparameter_config = config['hyperparameter']
environment_config = config['environment']
elif 'environment' in config or 'hyperparameter' in config:
print('Das ist doof')
raise AssertionError('If your config contains one of "environment" or "hyperparameter" it must also contain the other')
else:
# try to split the config. If any keys are unknown, an AssertionError will be thrown
Expand Down

0 comments on commit 1e80e8c

Please sign in to comment.