Skip to content

Commit

Permalink
Removing test_model from and for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
KrishnanPrash committed May 30, 2024
1 parent 7d7bc2b commit 6226386
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,19 @@ def test_triton_metrics(self, model, setup_and_teardown):
setup_and_teardown.pid = pid
utils.wait_for_server_ready()

output = ""
# Redirect stdout to a buffer to capture the output of the command.
with io.StringIO() as buf, redirect_stdout(buf):
self._metrics()
output = buf.getvalue()

metrics = json.loads(output)

# Verifying inference count is 0 before any inference
for loaded_models in metrics["nv_inference_request_success"]["metrics"]:
if loaded_models["labels"]["model"] == model:
assert loaded_models["value"] == 0

# Inference the Model
self._infer(model, prompt=PROMPT)

Expand All @@ -213,7 +226,7 @@ def test_triton_metrics(self, model, setup_and_teardown):
if loaded_models["labels"]["model"] == model:
assert loaded_models["value"] == 1

@pytest.mark.parametrize("model", ["add_sub", "mock_llm"])
@pytest.mark.parametrize("model", ["mock_llm"])
def test_triton_config(self, model, setup_and_teardown):
# Import the Model
pid = utils.run_server(repo=MODEL_REPO)
Expand All @@ -231,7 +244,7 @@ def test_triton_config(self, model, setup_and_teardown):
# Checks if correct model is loaded
assert config["name"] == model

@pytest.mark.parametrize("model", ["add_sub", "mock_llm"])
@pytest.mark.parametrize("model", ["mock_llm"])
def test_triton_status(self, model, setup_and_teardown):
pid = utils.run_server(repo=MODEL_REPO) # Import the Model
setup_and_teardown.pid = pid
Expand Down

0 comments on commit 6226386

Please sign in to comment.