Remove-auth-token (#27060)
* don't use `use_auth_token`internally * let's use token everywhere * fixup
This commit is contained in:
@@ -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",
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user