Skip to content

Commit

Permalink
added test dependencies to wheel, removed typing_extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
nnshah1 committed Jan 11, 2024
1 parent cbf37e0 commit 750c655
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
6 changes: 5 additions & 1 deletion python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ def get_tag(self):
"_c/triton_bindings.pyi",
]

gpu_extras = ["cupy-cuda12x"]
test_extras = ["pytest"]
all_extras = gpu_extras + test_extras

setup(
name="tritonserver",
version=VERSION,
Expand Down Expand Up @@ -105,5 +109,5 @@ def get_tag(self):
cmdclass={"bdist_wheel": bdist_wheel},
data_files=data_files,
install_requires=["numpy"],
extras_require={"GPU": ["cupy-cuda12x"], "all": ["cupy-cuda12x"]},
extras_require={"GPU": gpu_extras, "test": test_extras, "all": all_extras},
)
7 changes: 5 additions & 2 deletions python/test/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import queue
import time
import unittest
import os

import numpy
import pytest
Expand All @@ -44,17 +45,19 @@
except ImportError:
torch = None

module_directory = os.path.split(os.path.abspath(__file__))[0]
test_model_directory = os.path.abspath(os.path.join(module_directory,"test_api_models"))

server_options = tritonserver.Options(
server_id="TestServer",
model_repository="/workspace/test/test_api_models",
model_repository=test_model_directory,
log_verbose=0,
log_error=True,
exit_on_error=True,
strict_model_config=False,
model_control_mode=tritonserver.ModelControlMode.EXPLICIT,
)


class ModelTests(unittest.TestCase):
def test_create_request(self):
server = tritonserver.Server(server_options).start(wait_until_ready=True)
Expand Down
1 change: 0 additions & 1 deletion python/tritonserver/_api/_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
TRITONSERVER_ModelTxnPropertyFlag as ModelTxnPropertyFlag,
)
from tritonserver._c.triton_bindings import TRITONSERVER_Server
from typing_extensions import Unpack

if TYPE_CHECKING:
from tritonserver._api._server import Server
Expand Down

0 comments on commit 750c655

Please sign in to comment.