Skip to content

Commit

Permalink
halt and catch fire for unknown args
Browse files Browse the repository at this point in the history
  • Loading branch information
Mickus Timothee committed Oct 2, 2023
1 parent 9a25940 commit 88691ae
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mammoth/utils/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,12 @@ def defaults(cls, *args):
defaults = dummy_parser.parse_known_args([])[0]
return defaults

def parse_known_args(self):
opts, unknown = super().parse_known_args()
if unknown:
raise ValueError(f'unknown arguments provided:\n{unknown}')
return opts, unknown

@classmethod
def update_model_opts(cls, model_opts):
cls._validate_adapters(model_opts)
Expand Down

0 comments on commit 88691ae

Please sign in to comment.