Skip to content

Commit

Permalink
Log all extraneous_keys in one go for ease of development (#1344)
Browse files Browse the repository at this point in the history
  • Loading branch information
josejg authored Jul 12, 2024
1 parent 3c278a9 commit 6b256cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions llmfoundry/utils/config_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,9 +347,9 @@ def make_dataclass_and_log_config(
if 'variables' not in unstructured_config:
unstructured_config['variables'] = {}

for key in extraneous_keys:
if len(extraneous_keys) > 0:
raise ValueError(
f'Unused parameter {key} found in cfg. Please check your yaml to ensure this parameter is necessary. Please place any variables under the `variables` key.',
f'Unused parameters {sorted(extraneous_keys)} found in cfg. Please check your yaml to ensure these parameters are necessary. Please place any variables under the `variables` key.',
)

dataclass_dict_config: DictConfig = om.structured(
Expand Down

0 comments on commit 6b256cb

Please sign in to comment.