mirror of
https://github.com/NVIDIA/Model-Optimizer.git
synced 2026-11-12 02:06:41 +08:00
## What does this PR do? **Type of change:** Add TRT LLM/vLLM/SGLang functional test cases for newly added checkpoints on HF **Overview:** 1.Since the speculative draft model only supports loading from a local path, we should set the MODELOPT_LOCAL_MODEL_ROOT environment variable. If we don't set it, these test cases will be skipped. 2. Newly added checkpoints: - nvidia/gpt-oss-120b-Eagle3-short-context - nvidia/gpt-oss-120b-Eagle3-throughput - nvidia/EAGLE3-NVIDIA-Nemotron-3-Nano-30B-A3B-BF16 - nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B-FP8 ## Usage ```python pytest tests/examples/llm_ptq/test_deploy.py --run-release ``` ## Testing Run release testing ## Before your PR is "*Ready for review*" Ready for review - **Make sure you read and follow [Contributor guidelines](https://github.com/NVIDIA/Model-Optimizer/blob/main/CONTRIBUTING.md)** and your commits are signed. - **Is this change backward compatible?**: Yes - **Did you write any new necessary tests?**: No - **Did you add or update any necessary documentation?**: No - **Did you update [Changelog](https://github.com/NVIDIA/Model-Optimizer/blob/main/CHANGELOG.rst)?**: No ## Additional Information N/A --------- Signed-off-by: noeyy-mino <174223378+noeyy-mino@users.noreply.github.com>
Model Optimizer End-to-End Tests
This directory contains end-to-end tests for the Model Optimizer's examples.
Adding new tests
To add a test for a new example, create a new example directory in tests/examples following the existing examples as guidance.
Make sure to use as small models and less data as possible to keep the tests fast. Unless needed, have tests finish under 15 minutes.
Running the tests
To run a test, start from the recommended docker image from our installation docs.
Then mount your local modelopt directory to /workspace/Model-Optimizer and run this from the root of the repository.
cd /workspace/Model-Optimizer
pip install -e ".[all,dev-test]"
pytest tests/examples/$TEST
Environment variables
The following environment variables can be set to control the behavior of the tests:
MODELOPT_LOCAL_MODEL_ROOT: If set, the tests will use the local model directory instead of downloading the model from the internet. Default is not set, which means the model will be downloaded.