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

Usage of deprecated evaluation_strategy in TrainingArguments #512

Open
B-Step62 opened this issue Apr 22, 2024 · 1 comment
Open

Usage of deprecated evaluation_strategy in TrainingArguments #512

B-Step62 opened this issue Apr 22, 2024 · 1 comment

Comments

@B-Step62
Copy link

Hi team!

The attribute evaluation_strategy is being deprecated in the main branch in the Transformers repository (huggingface/transformers#30190). The usage of evaluation_strategy in this repository should be replaced with the new eval_strategy otherwise cause error in a few places like this:

    def on_step_end(self, args: TrainingArguments, state: TrainerState, control: TrainerControl, **kwargs):
        # Log
        if state.global_step == 1 and args.logging_first_step:
            control.should_log = True
        if args.logging_strategy == IntervalStrategy.STEPS and state.global_step % state.logging_steps == 0:
            control.should_log = True
    
        # Evaluate
        if (
>           args.eval_strategy == IntervalStrategy.STEPS
            and state.global_step % state.eval_steps == 0
            and args.eval_delay <= state.global_step
        ):
E       AttributeError: 'TrainingArguments' object has no attribute 'eval_strategy'

I saw the author already created PRs to a few HuggingFace repositories like trl, peft, but setfit is not in the list now, so opening an issue as a heads-up. Please feel free to close if it is already tracked somewhere else. Thank you.

@n-splv
Copy link

n-splv commented May 18, 2024

A simple workaround for anyone wondering:

args.eval_strategy = args.evaluation_strategy

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

No branches or pull requests

2 participants