Skip to content

Commit

Permalink
Merge branch 'helenn-fix-inference-test-20241204' into 'main'
Browse files Browse the repository at this point in the history
Fix test after new inference default added

See merge request ADLR/megatron-lm!2425
  • Loading branch information
ko3n1g committed Dec 5, 2024
2 parents e97d486 + 2b6b8ac commit bd677bf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/unit_tests/test_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ def client(app):
@unittest.mock.patch('megatron.inference.text_generation.communication.mpu')
@unittest.mock.patch('megatron.inference.text_generation.generation.ForwardStep')
@unittest.mock.patch('megatron.inference.text_generation.tokenization.get_tokenizer')
@pytest.mark.flaky
@pytest.mark.flaky_in_dev
def test_completions(
mock_get_tokenizer1,
mock_forward_step,
Expand All @@ -70,7 +68,9 @@ def test_completions(
Utils.initialize_distributed()

# set up the mocks
args = argparse.Namespace(max_position_embeddings=1024, max_tokens_to_oom=1_000_000)
args = argparse.Namespace(
max_position_embeddings=1024, max_tokens_to_oom=1_000_000, inference_max_seq_length=1024
)
mock_get_args_1.return_value = args
mock_get_tokenizer1.return_value = gpt2_tiktoken_tokenizer
mock_get_tokenizer2.return_value = gpt2_tiktoken_tokenizer
Expand Down

0 comments on commit bd677bf

Please sign in to comment.