Skip to content

Usage of deprecated evaluation_strategy in TrainingArguments #512

@B-Step62

Description

@B-Step62

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions