-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: Unit Tests for triton {metrics, config, status}
#66
Conversation
def test_triton_status(self, model, setup_and_teardown): | ||
pid = utils.run_server(repo=MODEL_REPO) # Import the Model | ||
setup_and_teardown.pid = pid | ||
utils.wait_for_server_ready() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this PR, this is good - don't change it here.
However, some future food for thought - these tests that do (1) server start + (2) utility command should probably be in test_e2e.py
. For test_cli.py
it would probably be nice to have some super simple mock server implementation that can be used to test each of these commands standalone (more unit test style).
triton {metrics, config, status}
triton {metrics, config, status}
Nice job merging your first PR already! 🚀 |
* Psuedocode for the testing metrics * Blank Check * Fixing dependency issue * Skeleton Code * Dummy Prompt for inference * MVP for testing * Updting dependency * MVP for testing * MVP for testing * Standardizing JSON outputs * MVP for testing * Removing unnecessary model parameter * applying pre-commit linting changes and removing unused imports * Making inference check stricter * Removing test_model from and for consistency * Final commit * Fix dependency issues
This PR is raised to address Jira Ticket [DLIS-6264].
Unit tests have been added primarily within
triton_cli/tests/test_cli.py
fortriton metrics
,triton config
, andtriton status
.Brief overview of the tests:
For metrics:
test_models
repository,mock_llm
is loaded.triton metrics
output checked to see ifnv_inference_request_success
reflects successful inference.For config:
test_models
repository,add_sub
andmock_llm
are loaded.triton config -m model_name
is called.name
field of the returnedjson
is cross-referenced with the originalmodel_name
For status:
test_models
repository,add_sub
andmock_llm
are loaded.triton status
is called and verifies from output that the models arelive
andready
.Secondary Changes that were made while implementing the tests:
grpcio>=1.64.0
topyproject.toml
.triton_cli
: Triton commands were previously returning keys in single quotes and boolean values as{True, False}
instead of{true,false}
. This leads to errors when the output is attempted to be parsed as a json.