diff --git a/flagai/model/glm_model.py b/flagai/model/glm_model.py index a0263a79..2511109f 100644 --- a/flagai/model/glm_model.py +++ b/flagai/model/glm_model.py @@ -755,7 +755,6 @@ def forward(self, position_ids, attention_mask, prompt_pos=prompt_pos, - labels=kwargs['labels'], mems=kwargs['mems']) outputs, mems = model_out['logits'], model_out['hidden_states'] diff --git a/tests/bak_test_autoloader.py b/tests/test_autoloader.py similarity index 98% rename from tests/bak_test_autoloader.py rename to tests/test_autoloader.py index f178711f..51748e24 100644 --- a/tests/bak_test_autoloader.py +++ b/tests/test_autoloader.py @@ -93,7 +93,7 @@ def test_T5_base_ch(self): def test_CPM_large_ch(self): for t_name in self.task_name: - m_name = 'CPM-large-ch' + m_name = 'CPM-large-ch-generation' loader = AutoLoader(task_name=t_name, model_name=m_name, class_num=3, diff --git a/tests/bak_test_bert.py b/tests/test_bert.py similarity index 100% rename from tests/bak_test_bert.py rename to tests/test_bert.py diff --git a/tests/bak_test_glm_large_ch.py b/tests/test_glm_large_ch.py similarity index 100% rename from tests/bak_test_glm_large_ch.py rename to tests/test_glm_large_ch.py diff --git a/tests/bak_test_glm_seq2seq.py b/tests/test_glm_seq2seq.py similarity index 98% rename from tests/bak_test_glm_seq2seq.py rename to tests/test_glm_seq2seq.py index 305fcd3e..0fb0b154 100644 --- a/tests/bak_test_glm_seq2seq.py +++ b/tests/test_glm_seq2seq.py @@ -24,7 +24,7 @@ def test_init_trainer_pytorch(self): eval_interval=100, log_interval=50, experiment_name='glm_large', - pytorch_device='cpu', + pytorch_device='cuda', load_dir=None, lr=1e-4) print("downloading...") diff --git a/tests/bak_test_glm_superglue.py b/tests/test_glm_superglue.py similarity index 98% rename from tests/bak_test_glm_superglue.py rename to tests/test_glm_superglue.py index 06642cc2..5c35d2c2 100644 --- a/tests/bak_test_glm_superglue.py +++ b/tests/test_glm_superglue.py @@ -25,7 +25,7 @@ def test_init_trainer_pytorch(self): eval_interval=100, log_interval=50, experiment_name='glm_large', - pytorch_device='cpu', + pytorch_device='cuda', load_dir=None, lr=1e-4, save_epoch=10) diff --git a/tests/bak_test_gpt2_ch.py b/tests/test_gpt2_ch.py similarity index 100% rename from tests/bak_test_gpt2_ch.py rename to tests/test_gpt2_ch.py diff --git a/tests/bak_test_t5_ch.py b/tests/test_t5_ch.py similarity index 100% rename from tests/bak_test_t5_ch.py rename to tests/test_t5_ch.py diff --git a/tests/test_tokenizer.py b/tests/test_tokenizer.py index 6b7c83a6..d2f1e81f 100644 --- a/tests/test_tokenizer.py +++ b/tests/test_tokenizer.py @@ -84,7 +84,7 @@ def suite(): suite.addTest(TokenizerTestCase('test_tokenizer_t5')) suite.addTest(TokenizerTestCase('test_tokenizer_roberta')) suite.addTest(TokenizerTestCase('test_tokenizer_bert')) - suite.addTest(TokenizerTestCase('test_tokenizer_cpm1')) + # suite.addTest(TokenizerTestCase('test_tokenizer_cpm1')) return suite