Skip to content
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

fix: Fixing CI for TRTLLM HLAPI #94

Merged
merged 5 commits into from
Dec 7, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Checking http and grpc status
KrishnanPrash committed Dec 5, 2024
commit 679ee2e5e0552f3eaf2df2ec63fcf409d4dad519
14 changes: 7 additions & 7 deletions tests/utils.py
Original file line number Diff line number Diff line change
@@ -160,19 +160,19 @@ def wait_for_server_ready(self, timeout: int = 60):
raise RuntimeError("Server failed to start in time.") from err

def kill_server(self, timeout: int = 60):
self.proc.terminate()
try:
# Add wait timeout to avoid hanging if process can't be cleanly
# stopped for some reason.
self.proc.wait(timeout=timeout)
self.proc.terminate()
self.proc.wait(timeout=timeout) # Wait for triton to clean up
except subprocess.TimeoutExpired:
self.proc.kill()
self.proc.wait() # Indefinetely wait until the process is cleaned up.
except psutil.NoSuchProcess as e:
print(e)

def check_server_ready(self, protocol="grpc"):
status = TritonCommands._status(protocol)
return status["ready"]
def check_server_ready(self):
status_grpc = TritonCommands._status(protocol="grpc")
status_http = TritonCommands._status(protocol="http")
return status_grpc["ready"] and status_http["ready"]


# class ScopedTritonServer: