Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix PABEE & PL CI failure #6433

Closed
wants to merge 12 commits into from
3 changes: 1 addition & 2 deletions examples/bert-loses-patience/test_run_glue_with_pabee.py
Expand Up @@ -20,7 +20,6 @@ def get_setup_file():


class PabeeTests(unittest.TestCase):
@unittest.skip("Disable while Canwen investigates.")
def test_run_glue(self):
stream_handler = logging.StreamHandler(sys.stdout)
logger.addHandler(stream_handler)
Expand All @@ -33,7 +32,7 @@ def test_run_glue(self):
--task_name mrpc
--do_train
--do_eval
--output_dir ./tests/fixtures/tests_samples/temp_dir
--output_dir ./tests/fixtures/tests_samples/pabee_temp_dir
--per_gpu_train_batch_size=2
--per_gpu_eval_batch_size=1
--learning_rate=2e-5
Expand Down
16 changes: 4 additions & 12 deletions examples/test_examples.py
Expand Up @@ -90,10 +90,11 @@ def test_run_pl_glue(self):
--task mrpc
--do_train
--do_predict
--output_dir ./tests/fixtures/tests_samples/temp_dir
--output_dir ./tests/fixtures/tests_samples/pl_temp_dir
--train_batch_size=32
--learning_rate=1e-4
--num_train_epochs=1
--warmup_steps=3
--num_train_epochs=4
--seed=42
--max_seq_length=128
""".split()
Expand All @@ -103,16 +104,7 @@ def test_run_pl_glue(self):

with patch.object(sys, "argv", testargs):
result = run_pl_glue.main()
# for now just testing that the script can run to a completion
self.assertGreater(result["acc"], 0.25)
#
# TODO: this fails on CI - doesn't get acc/f1>=0.75:
#
# # remove all the various *loss* attributes
# result = {k: v for k, v in result.items() if "loss" not in k}
# for k, v in result.items():
# self.assertGreaterEqual(v, 0.75, f"({k})")
#
self.assertGreater(result["acc"], 0.75)

def test_run_language_modeling(self):
stream_handler = logging.StreamHandler(sys.stdout)
Expand Down