Skip to content

Conversation

@Tabrizian
Copy link
Member

@Tabrizian Tabrizian commented May 1, 2024

import time
import unittest

from tritonserver import InferenceRequest, Model, Server
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice use of in-process Python API for testing! This is super simple and clean 🚀

rmccorm4
rmccorm4 previously approved these changes May 1, 2024

def test_max_tokens(self):
self._infer_and_verify_request(
32,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: make 32 a local constant,

suggestion: make the model name as a parameterized test:

https://realpython.com/pytest-python-testing/#parametrization-combining-tests

https://realpython.com/pytest-python-testing/

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

parameterized doesn't work with unittest classes.

import time
import unittest

import pytest

Check notice

Code scanning / CodeQL

Unused import

Import of 'pytest' is not used.
@Tabrizian Tabrizian closed this Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants