Remove deprecated logic and warnings (#30743)
* Remove deprecated logic and warnings * Add back some code that seems to be important... * Let's just add all he nllb stuff back; removing it is a bit more involved * Remove kwargs * Remove more kwargs
This commit is contained in:
@@ -23,7 +23,6 @@ import json
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
import warnings
|
||||
from dataclasses import dataclass, field
|
||||
from typing import Optional
|
||||
|
||||
@@ -168,12 +167,6 @@ class ModelArguments:
|
||||
)
|
||||
},
|
||||
)
|
||||
use_auth_token: bool = field(
|
||||
default=None,
|
||||
metadata={
|
||||
"help": "The `use_auth_token` argument is deprecated and will be removed in v4.34. Please use `token` instead."
|
||||
},
|
||||
)
|
||||
trust_remote_code: bool = field(
|
||||
default=False,
|
||||
metadata={
|
||||
@@ -244,18 +237,6 @@ def main():
|
||||
else:
|
||||
model_args, data_args, training_args = parser.parse_args_into_dataclasses()
|
||||
|
||||
if model_args.use_auth_token is not None:
|
||||
warnings.warn(
|
||||
"The `use_auth_token` argument is deprecated and will be removed in v4.34. Please use `token` instead.",
|
||||
FutureWarning,
|
||||
)
|
||||
if model_args.token is not None:
|
||||
raise ValueError("`token` and `use_auth_token` are both specified. Please set only the argument `token`.")
|
||||
model_args.token = model_args.use_auth_token
|
||||
|
||||
if not (training_args.do_train or training_args.do_eval or training_args.do_predict):
|
||||
exit("Must specify at least one of --do_train, --do_eval or --do_predict!")
|
||||
|
||||
# Sending telemetry. Tracking the example usage helps us better allocate resources to maintain them. The
|
||||
# information sent is the one passed as arguments along with your Python/TensorFlow versions.
|
||||
send_example_telemetry("run_image_classification", model_args, data_args, framework="tensorflow")
|
||||
|
||||
Reference in New Issue
Block a user