def test_run_glue(self):
    stream_handler = logging.StreamHandler(sys.stdout)
    logger.addHandler(stream_handler)
    testargs = ['run_glue.py', '--data_dir=./examples/tests_samples/MRPC/', '--task_name=mrpc', '--do_train', '--do_eval', '--output_dir=./examples/tests_samples/temp_dir', '--per_gpu_train_batch_size=2', '--per_gpu_eval_batch_size=1', '--learning_rate=1e-4', '--max_steps=10', '--warmup_steps=2', '--overwrite_output_dir', '--seed=42']
    (model_type, model_name) = ('--model_type=bert', '--model_name_or_path=bert-base-uncased')
    with patch.object(sys, 'argv', (testargs + [model_type, model_name])):
        result = run_glue.score_challenges()
        for value in result.values():
            self.assertGreaterEqual(value, 0.75)
def test_run_glue(self):
    stream_handler = logging.StreamHandler(sys.stdout)
    logger.addHandler(stream_handler)
    testargs = ['run_glue.py', '--data_dir=./examples/tests_samples/MRPC/', '--task_name=mrpc', '--do_train', '--do_eval', '--output_dir=./examples/tests_samples/temp_dir', '--per_gpu_train_batch_size=2', '--per_gpu_eval_batch_size=1', '--learning_rate=1e-4', '--max_steps=10', '--warmup_steps=2', '--overwrite_output_dir', '--seed=42']
    (model_type, model_name) = ('--model_type=bert', '--model_name_or_path=bert-base-uncased')
    with patch.object(sys, 'argv', (testargs + [model_type, model_name])):
        result = run_glue.score_challenges()
        for value in result.values():
            self.assertGreaterEqual(value, 0.75)