"src/turbomind/utils/memory_utils.h" did not exist on "720fc533da804ac3f46ee938864403e51fcd9fa7"
Unverified Commit 586e81a2 authored by vikram singh shekhawat's avatar vikram singh shekhawat Committed by GitHub
Browse files

[Test] Initialize mem_fraction_static in setUpClass to fix pytest VLM test crashes. (#10859)


Co-authored-by: default avatarsvc_repro_tool <svc_repro_tool@habana.ai>
parent fad7ca73
......@@ -27,6 +27,8 @@ MODELS = [
SimpleNamespace(model="openbmb/MiniCPM-V-2_6", mmmu_accuracy=0.4),
]
#Set default mem_fraction_static to 0.8
DEFAULT_MEM_FRACTION_STATIC = 0.8
class TestVLMModels(CustomTestCase):
parsed_args = None # Class variable to store args
......@@ -38,6 +40,9 @@ class TestVLMModels(CustomTestCase):
cls.api_key = "sk-123456"
cls.time_out = DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH
if cls.parsed_args is None:
cls.parsed_args = SimpleNamespace(mem_fraction_static=DEFAULT_MEM_FRACTION_STATIC)
# Set OpenAI API key and base URL environment variables. Needed for lmm-evals to work.
os.environ["OPENAI_API_KEY"] = cls.api_key
os.environ["OPENAI_API_BASE"] = f"{cls.base_url}/v1"
......@@ -302,7 +307,7 @@ if __name__ == "__main__":
"--mem-fraction-static",
type=float,
help="Static memory fraction for the model",
default=0.8,
default=DEFAULT_MEM_FRACTION_STATIC,
)
# Parse args intended for unittest
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment