You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When i debug until the line of @ex.automain, the error was raised as follows.
Exception originated from within Sacred.
Traceback (most recent calls):
File "/root/anaconda3/lib/python3.10/site-packages/sacred/config/utils.py", line 42, in assert_is_valid_key
raise KeyError(
KeyError: 'Invalid key "DogmaticDict.setitem". Config-keys cannot contain "." or start with "$"'
I find the error happen in line 42, in assert_is_valid_key
def assert_is_valid_key(key):
if SETTINGS.CONFIG.ENFORCE_KEYS_MONGO_COMPATIBLE and (
isinstance(key, str) and ("." in key or key[0] == "$")
):
raise KeyError(
'Invalid key "{}". Config-keys cannot '
'contain "." or start with "$"'.format(key)
)
And the key is defined as:
def normalize_or_die(obj):
if isinstance(obj, dict):
res = dict()
for key, value in obj.items():
assert_is_valid_key(key)
res[key] = normalize_or_die(value)
return res
elif isinstance(obj, (list, tuple)):
return list([normalize_or_die(value) for value in obj])
return normalize_numpy(obj)
But i cannot find the definition of obj. And I cannot find any solution online.
I would be grateful for some help!
Best,
The text was updated successfully, but these errors were encountered:
Hey,
I have some issues with the originated from within Sacred when i debug my code.
When i debug until the line of @ex.automain, the error was raised as follows.
Exception originated from within Sacred.
Traceback (most recent calls):
File "/root/anaconda3/lib/python3.10/site-packages/sacred/config/utils.py", line 42, in assert_is_valid_key
raise KeyError(
KeyError: 'Invalid key "DogmaticDict.setitem". Config-keys cannot contain "." or start with "$"'
I find the error happen in line 42, in assert_is_valid_key
And the key is defined as:
But i cannot find the definition of obj. And I cannot find any solution online.
I would be grateful for some help!
Best,
The text was updated successfully, but these errors were encountered: