From 6c7f433c8dd16d7e8e7a9f921452d8db59cb1270 Mon Sep 17 00:00:00 2001 From: Yuxian Qiu <142763828+yuxianq@users.noreply.github.com> Date: Wed, 17 Sep 2025 08:32:13 +0000 Subject: [PATCH] Pin numpy version for Gemma. Signed-off-by: Yuxian Qiu <142763828+yuxianq@users.noreply.github.com> --- examples/models/core/gemma/requirements.txt | 1 + tests/integration/defs/conftest.py | 34 +++------------------ tests/integration/test_lists/waives.txt | 1 - 3 files changed, 6 insertions(+), 30 deletions(-) diff --git a/examples/models/core/gemma/requirements.txt b/examples/models/core/gemma/requirements.txt index a1bbed25b68a..20f8719a379c 100644 --- a/examples/models/core/gemma/requirements.txt +++ b/examples/models/core/gemma/requirements.txt @@ -5,6 +5,7 @@ nvidia-cudnn-cu12~=8.9; platform_machine == "x86_64" tensorrt_llm>=0.0.0.dev0 flax~=0.8.0 +numpy<2 # jax[cuda12_pip]~=0.4.19 safetensors~=0.4.1 sentencepiece>=0.1.99 diff --git a/tests/integration/defs/conftest.py b/tests/integration/defs/conftest.py index d29f9840c67c..77b2e91b8196 100644 --- a/tests/integration/defs/conftest.py +++ b/tests/integration/defs/conftest.py @@ -284,35 +284,11 @@ def gemma_example_root(llm_root, llm_venv): "Get gemma example root" example_root = os.path.join(llm_root, "examples", "models", "core", "gemma") - # https://nvbugs/4559583 Jax dependency broke the entire pipeline in TRT container - # due to the dependency incompatibility with torch, which forced reinstall everything - # and caused pipeline to fail. We manually install gemma dependency as a WAR. - llm_venv.run_cmd(["-m", "pip", "install", "safetensors~=0.4.1", "nltk"]) - # Install Jax because it breaks dependency - google_extension = [ - "-f", - "https://storage.googleapis.com/jax-releases/jax_cuda_releases.html", - ] - - # WAR the new posting of "nvidia-cudnn-cu12~=9.0". - # "jax[cuda12_pip]~=0.4.19" specifies "nvidia-cudnn-cu12>=8.9" but actually requires "nvidia-cudnn-cu12~=8.9". - if "x86_64" in platform.machine(): - llm_venv.run_cmd(["-m", "pip", "install", "nvidia-cudnn-cu12~=8.9"]) - - if "Windows" in platform.system(): - llm_venv.run_cmd([ - "-m", "pip", "install", "jax~=0.4.19", "jaxlib~=0.4.19", "--no-deps" - ] + google_extension) - else: - llm_venv.run_cmd([ - "-m", - "pip", - "install", - "jax[cuda12_pip]~=0.4.19", - "jaxlib[cuda12_pip]~=0.4.19", - "--no-deps", - ] + google_extension) - llm_venv.run_cmd(["-m", "pip", "install", "flax~=0.8.0"]) + llm_venv.run_cmd([ + "-m", "pip", "install", "-r", + os.path.join(example_root, "requirements.txt") + ]) + return example_root diff --git a/tests/integration/test_lists/waives.txt b/tests/integration/test_lists/waives.txt index 6f79cec77f99..0974ed975732 100644 --- a/tests/integration/test_lists/waives.txt +++ b/tests/integration/test_lists/waives.txt @@ -306,7 +306,6 @@ examples/test_phi.py::test_llm_phi_lora_1gpu[Phi-3-mini-4k-instruct-ru-lora-Phi- examples/test_phi.py::test_llm_phi_quantization_1gpu[Phi-3-mini-128k-instruct-fp8-float16] SKIP (https://nvbugs/5465143) examples/test_phi.py::test_llm_phi_quantization_1gpu[Phi-3.5-mini-instruct-fp8-float16] SKIP (https://nvbugs/5465143) examples/test_phi.py::test_llm_phi_quantization_1gpu[Phi-3.5-MoE-instruct-fp8-bfloat16] SKIP (https://nvbugs/5465143) -examples/test_gemma.py::test_llm_gemma_1gpu_summary_vswa[gemma-3-1b-it-other-bfloat16-8] SKIP (https://nvbugs/5522332) accuracy/test_cli_flow.py::TestPhi4MiniInstruct::test_auto_dtype SKIP (https://nvbugs/5465143) accuracy/test_cli_flow.py::TestPhi4MiniInstruct::test_tp2 SKIP (https://nvbugs/5465143) accuracy/test_cli_flow.py::TestLongAlpaca7B::test_auto_dtype SKIP (https://nvbugs/5481075)