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

Make output_dir optional in TrainingArguments #27866

Open
ChanderG opened this issue Dec 6, 2023 · 4 comments
Open

Make output_dir optional in TrainingArguments #27866

ChanderG opened this issue Dec 6, 2023 · 4 comments
Labels
Feature request Request for a new feature

Comments

@ChanderG
Copy link

ChanderG commented Dec 6, 2023

Feature request

Currently, there is only 1 required param in creating a TrainingArguments object - output_dir. HFTrainer manually creates an object with a default value "tmp_trainer" if no Args object is passed to it.

Instead, we should make even this one param optional in the TrainingArguments class (and use a default inside the class implementation).

Motivation

This is useful when creating and passing TrainingArguments in other runners - for eg, trl/SFTTrainer. I would like sensible defaults for all params, so that I only specify the particular arguments I am interested in.

Your contribution

I can open a PR, if this is of interest.

@ArthurZucker
Copy link
Collaborator

cc @muellerzr sounds good to me wdyt?

Copy link

github-actions bot commented Jan 6, 2024

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.

@ArthurZucker ArthurZucker added the Feature request Request for a new feature label Jan 8, 2024
@artshcherbina
Copy link

I've found a workaround using inheritance:

@dataclass
class MyTrainingArguments(TrainingArguments):
    output_dir: str = field(
        default="models",
    )

@huynhducloi00
Copy link

not everyone want to save the model

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature request Request for a new feature
Projects
None yet
Development

No branches or pull requests

4 participants