Skip to content

💽 [TRLParser] Fail when unknown args are provided in the config file. #3543

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

Merged
merged 3 commits into from
Jun 6, 2025

Conversation

edbeeching
Copy link
Collaborator

When a config.yaml file is parsed by the TRLParser there is an option to return remaining strings. But otherwise we do not check that all of the parsed args have been consumed by the config classes.

It would be easy for a user to mistype an argument in a config file and not be aware that the parameter was not set correctly.

This PR adds an option to the TRLParser fail_with_unknown_args, which is True by default. This ensures that errors in the config file are quickly flagged to the user.

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Member

@qgallouedec qgallouedec left a comment

Choose a reason for hiding this comment

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

Nice, some minor suggestions

Copy link
Member

@qgallouedec qgallouedec left a comment

Choose a reason for hiding this comment

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

lgtm!

@qgallouedec qgallouedec changed the title [TRLParser] Fail when unknown args are provided in the config file. 💽 [TRLParser] Fail when unknown args are provided in the config file. Jun 6, 2025
@qgallouedec qgallouedec merged commit b773a4c into main Jun 6, 2025
11 checks passed
@qgallouedec qgallouedec deleted the trl-parser-fail-with-unknown-args branch June 6, 2025 04:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants