Fix weight tying (#51665)

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
Harry Mellor
2026-08-20 10:31:55 +00:00
committed by GitHub
parent 6e85feb1b7
commit f0c14b4f77
70 changed files with 526 additions and 238 deletions
@@ -14,6 +14,7 @@ from vllm.transformers_utils.repo_utils import (
get_hf_file_to_dict,
is_mistral_model_repo,
list_filtered_repo_files,
with_retry,
)
@@ -185,3 +186,13 @@ def test_is_mistral_model_repo(files: list[str], expected_bool: bool):
repo_type="model",
token="token",
)
def test_with_retry_does_not_retry_fatal_errors():
"""A definitive answer must not be retried, which costs a delay per attempt."""
func = MagicMock(side_effect=FileNotFoundError("no such file"))
with pytest.raises(FileNotFoundError):
with_retry(func, "Error", fatal_errors=(FileNotFoundError,))
func.assert_called_once()