Remove-auth-token (#27060)

* don't use `use_auth_token`internally

* let's use token everywhere

* fixup
This commit is contained in:
Arthur
2023-11-13 14:20:54 +01:00
committed by GitHub
parent 8f577dca4f
commit b97cab7e6d
29 changed files with 93 additions and 101 deletions

View File

@@ -308,9 +308,7 @@ class ProcessorPushToHubTester(unittest.TestCase):
def test_push_to_hub(self):
processor = Wav2Vec2Processor.from_pretrained(SAMPLE_PROCESSOR_CONFIG_DIR)
with tempfile.TemporaryDirectory() as tmp_dir:
processor.save_pretrained(
os.path.join(tmp_dir, "test-processor"), push_to_hub=True, use_auth_token=self._token
)
processor.save_pretrained(os.path.join(tmp_dir, "test-processor"), push_to_hub=True, token=self._token)
new_processor = Wav2Vec2Processor.from_pretrained(f"{USER}/test-processor")
for k, v in processor.feature_extractor.__dict__.items():
@@ -324,7 +322,7 @@ class ProcessorPushToHubTester(unittest.TestCase):
processor.save_pretrained(
os.path.join(tmp_dir, "test-processor-org"),
push_to_hub=True,
use_auth_token=self._token,
token=self._token,
organization="valid_org",
)