diff --git a/src/transformers/models/pop2piano/tokenization_pop2piano.py b/src/transformers/models/pop2piano/tokenization_pop2piano.py index abb6c3584f46ce..ea1c042195ea2d 100644 --- a/src/transformers/models/pop2piano/tokenization_pop2piano.py +++ b/src/transformers/models/pop2piano/tokenization_pop2piano.py @@ -30,7 +30,6 @@ logger = logging.get_logger(__name__) -## TODO : changing checkpoints from `susnato/pop2piano_dev` to `sweetcocoa/pop2piano` after the PR is approved VOCAB_FILES_NAMES = { "vocab": "vocab.json", @@ -38,7 +37,7 @@ PRETRAINED_VOCAB_FILES_MAP = { "vocab": { - "susnato/pop2piano_dev": "https://huggingface.co/susnato/pop2piano_dev/blob/main/vocab.json", + "sweetcocoa/pop2piano": "https://huggingface.co/sweetcocoa/pop2piano/blob/main/vocab.json", }, } diff --git a/tests/models/pop2piano/test_modeling_pop2piano.py b/tests/models/pop2piano/test_modeling_pop2piano.py index 837b1b4f1db7a5..6347c85071f5c6 100644 --- a/tests/models/pop2piano/test_modeling_pop2piano.py +++ b/tests/models/pop2piano/test_modeling_pop2piano.py @@ -734,10 +734,10 @@ def test_real_music(self): if is_librosa_available() and is_scipy_available() and is_essentia_available() and is_torch_available(): from transformers import Pop2PianoFeatureExtractor, Pop2PianoTokenizer - model = Pop2PianoForConditionalGeneration.from_pretrained("susnato/pop2piano_dev") + model = Pop2PianoForConditionalGeneration.from_pretrained("sweetcocoa/pop2piano") model.eval() - feature_extractor = Pop2PianoFeatureExtractor.from_pretrained("susnato/pop2piano_dev") - tokenizer = Pop2PianoTokenizer.from_pretrained("susnato/pop2piano_dev") + feature_extractor = Pop2PianoFeatureExtractor.from_pretrained("sweetcocoa/pop2piano") + tokenizer = Pop2PianoTokenizer.from_pretrained("sweetcocoa/pop2piano") ds = load_dataset("sweetcocoa/pop2piano_ci", split="test") output_fe = feature_extractor( diff --git a/tests/models/pop2piano/test_processor_pop2piano.py b/tests/models/pop2piano/test_processor_pop2piano.py index 28af7fbb55b1b3..06a8bacfd8a45c 100644 --- a/tests/models/pop2piano/test_processor_pop2piano.py +++ b/tests/models/pop2piano/test_processor_pop2piano.py @@ -55,8 +55,6 @@ Pop2PianoTokenizer, ) -## TODO : changing checkpoints from `susnato/pop2piano_dev` to `sweetcocoa/pop2piano` after the PR is approved - @require_scipy @require_torch @@ -67,8 +65,8 @@ class Pop2PianoProcessorTest(unittest.TestCase): def setUp(self): self.tmpdirname = tempfile.mkdtemp() - feature_extractor = Pop2PianoFeatureExtractor.from_pretrained("susnato/pop2piano_dev") - tokenizer = Pop2PianoTokenizer.from_pretrained("susnato/pop2piano_dev") + feature_extractor = Pop2PianoFeatureExtractor.from_pretrained("sweetcocoa/pop2piano") + tokenizer = Pop2PianoTokenizer.from_pretrained("sweetcocoa/pop2piano") processor = Pop2PianoProcessor(feature_extractor, tokenizer) processor.save_pretrained(self.tmpdirname) @@ -121,7 +119,7 @@ def get_inputs(self): feature_extractor_outputs = self.get_feature_extractor()( audio=input_speech, sampling_rate=sampling_rate, return_tensors="pt" ) - model = Pop2PianoForConditionalGeneration.from_pretrained("susnato/pop2piano_dev") + model = Pop2PianoForConditionalGeneration.from_pretrained("sweetcocoa/pop2piano") token_ids = model.generate(input_features=feature_extractor_outputs["input_features"], composer="composer1") dummy_notes = [ [ diff --git a/tests/models/pop2piano/test_tokenization_pop2piano.py b/tests/models/pop2piano/test_tokenization_pop2piano.py index b41557f83e883f..6c5301b8f3bfbf 100644 --- a/tests/models/pop2piano/test_tokenization_pop2piano.py +++ b/tests/models/pop2piano/test_tokenization_pop2piano.py @@ -43,15 +43,12 @@ from transformers import Pop2PianoTokenizer -## TODO : changing checkpoints from `susnato/pop2piano_dev` to `sweetcocoa/pop2piano` after the PR is approved - - @require_torch @require_pretty_midi class Pop2PianoTokenizerTest(unittest.TestCase): def setUp(self): super().setUp() - self.tokenizer = Pop2PianoTokenizer.from_pretrained("susnato/pop2piano_dev") + self.tokenizer = Pop2PianoTokenizer.from_pretrained("sweetcocoa/pop2piano") def get_input_notes(self): notes = [ @@ -246,30 +243,30 @@ def test_pickle_tokenizer(self): self.assertListEqual(subwords, subwords_loaded) def test_padding_side_in_kwargs(self): - tokenizer_p = Pop2PianoTokenizer.from_pretrained("susnato/pop2piano_dev", padding_side="left") + tokenizer_p = Pop2PianoTokenizer.from_pretrained("sweetcocoa/pop2piano", padding_side="left") self.assertEqual(tokenizer_p.padding_side, "left") - tokenizer_p = Pop2PianoTokenizer.from_pretrained("susnato/pop2piano_dev", padding_side="right") + tokenizer_p = Pop2PianoTokenizer.from_pretrained("sweetcocoa/pop2piano", padding_side="right") self.assertEqual(tokenizer_p.padding_side, "right") self.assertRaises( ValueError, Pop2PianoTokenizer.from_pretrained, - "susnato/pop2piano_dev", + "sweetcocoa/pop2piano", padding_side="unauthorized", ) def test_truncation_side_in_kwargs(self): - tokenizer_p = Pop2PianoTokenizer.from_pretrained("susnato/pop2piano_dev", truncation_side="left") + tokenizer_p = Pop2PianoTokenizer.from_pretrained("sweetcocoa/pop2piano", truncation_side="left") self.assertEqual(tokenizer_p.truncation_side, "left") - tokenizer_p = Pop2PianoTokenizer.from_pretrained("susnato/pop2piano_dev", truncation_side="right") + tokenizer_p = Pop2PianoTokenizer.from_pretrained("sweetcocoa/pop2piano", truncation_side="right") self.assertEqual(tokenizer_p.truncation_side, "right") self.assertRaises( ValueError, Pop2PianoTokenizer.from_pretrained, - "susnato/pop2piano_dev", + "sweetcocoa/pop2piano", truncation_side="unauthorized", )