[CI] fix test_vlm_models.py (#17049)
This commit is contained in:
@@ -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__":
|
||||
|
||||
Reference in New Issue
Block a user