Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: exit on unknown args #421

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion tuning/sft_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,11 +516,14 @@ def parse_arguments(parser, json_config=None):
fusedops_kernels_config,
attention_and_distributed_packing_config,
additional,
_,
leftover,
) = parser.parse_args_into_dataclasses(return_remaining_strings=True)

peft_method = additional.peft_method
exp_metadata = additional.exp_metadata
if leftover:
logging.error("Extra un-recognized arguments found: %s", leftover)
sys.exit(USER_ERROR_EXIT_CODE)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't be better to log and continue?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes - that is also ok. I would prefer immediate exit - since there are usually a wall of log output and this can get missed out - but we can go with whatever is the consensus.


if peft_method == "lora":
tune_config = lora_config
Expand Down
Loading