Remove deprecated (#8604)
* Remove old deprecated arguments Co-authored-by: LysandreJik <lysandre.debut@reseau.eseo.fr> * Remove needless imports * Fix tests Co-authored-by: LysandreJik <lysandre.debut@reseau.eseo.fr>
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import dataclasses
|
||||
import json
|
||||
import os
|
||||
import warnings
|
||||
from dataclasses import dataclass, field
|
||||
from enum import Enum
|
||||
from typing import Any, Dict, List, Optional, Tuple
|
||||
@@ -198,10 +197,6 @@ class TrainingArguments:
|
||||
do_train: bool = field(default=False, metadata={"help": "Whether to run training."})
|
||||
do_eval: bool = field(default=None, metadata={"help": "Whether to run eval on the dev set."})
|
||||
do_predict: bool = field(default=False, metadata={"help": "Whether to run predictions on the test set."})
|
||||
evaluate_during_training: bool = field(
|
||||
default=False,
|
||||
metadata={"help": "Run evaluation during training at each logging step."},
|
||||
)
|
||||
evaluation_strategy: EvaluationStrategy = field(
|
||||
default="no",
|
||||
metadata={"help": "Run evaluation during training at each logging step."},
|
||||
@@ -340,12 +335,6 @@ class TrainingArguments:
|
||||
def __post_init__(self):
|
||||
if self.disable_tqdm is None:
|
||||
self.disable_tqdm = logger.getEffectiveLevel() > logging.WARN
|
||||
if self.evaluate_during_training is True:
|
||||
self.evaluation_strategy = EvaluationStrategy.STEPS
|
||||
warnings.warn(
|
||||
"The `evaluate_during_training` argument is deprecated in favor of `evaluation_strategy` (which has more options)",
|
||||
FutureWarning,
|
||||
)
|
||||
self.evaluation_strategy = EvaluationStrategy(self.evaluation_strategy)
|
||||
if self.do_eval is False and self.evaluation_strategy != EvaluationStrategy.NO:
|
||||
self.do_eval = True
|
||||
|
||||
Reference in New Issue
Block a user