[CI] fix test_vlm_models.py (#17049)

This commit is contained in:
shuwenn
2026-01-20 02:00:00 +08:00
committed by GitHub
parent 1a053a810c
commit 71279e31f7

View File

@@ -1,6 +1,7 @@
import argparse
import random
import sys
import tempfile
import unittest
from types import SimpleNamespace
@@ -39,7 +40,11 @@ class TestVLMModels(MMMUMultiModelTestBase):
models_to_test = [random.choice(MODELS)]
for model in models_to_test:
self._run_vlm_mmmu_test(model, "./logs")
# Use a unique temporary directory for each model to avoid cached results
with tempfile.TemporaryDirectory(
prefix=f"test_vlm_mmmu_{model.model.replace('/', '_')}_"
) as temp_dir:
self._run_vlm_mmmu_test(model, temp_dir)
if __name__ == "__main__":