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

feat: Metrics API enhanced for Failure counters #377

Merged
merged 22 commits into from
Jul 12, 2024
Merged

Conversation

indrajit96
Copy link
Contributor

@indrajit96 indrajit96 commented Jul 8, 2024

What does the PR do?

Currently We don't have any mechanism to count any failures that happen in triton core before the request gets to the backend.

This PR enhances existing metrics API to incorporate failure and failure counts in inference requests, along with categories for the types of failures as a "reason" label with initial support for: BACKEND, CANCELED, REJECTED, and OTHER.

NOTE: Ensemble failure metrics will reflect the failure counts of their composing models,
but currently do not capture the same granularity for the "reason" label and will default to the "OTHER" reason.

Checklist

  • PR title reflects the change and is of format <commit_type>: <Title>
  • Changes are described in the pull request.
  • Related issues are referenced.
  • Populated github labels field
  • Added test plan and verified test passes.
  • Verified that the PR passes existing CI.
  • Verified copyright is correct on all changed files.
  • Added succinct git squash message before merging ref.
  • All template sections are filled out.

Commit Type:

Check the conventional commit type
box here and add the label to the github PR.

  • build
  • ci
  • docs
  • feat
  • fix
  • perf
  • refactor
  • revert
  • style
  • test

Related PRs:

triton-inference-server/server#7423

Where should the reviewer start?

RespondIfError function call in core

Test plan:

See test plan in triton-inference-server/server#7423

Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)

  • closes Jira issue: DLIS-5530

@rmccorm4 rmccorm4 changed the title feat:Metrics API enhanced for Failure counters feat: Metrics API enhanced for Failure counters Jul 8, 2024
src/infer_request.cc Outdated Show resolved Hide resolved
src/infer_request.h Outdated Show resolved Hide resolved
src/infer_stats.cc Outdated Show resolved Hide resolved
src/infer_request.cc Outdated Show resolved Hide resolved
src/infer_stats.h Outdated Show resolved Hide resolved
@@ -558,7 +559,8 @@ TritonModelInstance::PrepareRequestsOrRespond(
// If any errors occurred, respond with error for each request.
if (!status.IsOk()) {
for (auto& r : requests) {
InferenceRequest::RespondIfError(r, status, true /* release_requests */);
InferenceRequest::RespondIfError(
r, status, true /* release_requests */, FailureReason::OTHER);
Copy link
Contributor

@rmccorm4 rmccorm4 Jul 11, 2024

Choose a reason for hiding this comment

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

Can you think of any test cases to test some of the reason=OTHER scenarios (not counting ensembles)? Can be a follow-up, don't need to be in these 24.07 PRs, but would be good to have a test case for these sooner than later if we have any in mind.

src/infer_request.cc Outdated Show resolved Hide resolved
src/infer_request.h Outdated Show resolved Hide resolved
Copy link
Contributor

@rmccorm4 rmccorm4 left a comment

Choose a reason for hiding this comment

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

High level code LGTM since we're aiming for 24.07 cherry-pick, left some small comments and follow-ups.

@indrajit96 indrajit96 merged commit a07169e into main Jul 12, 2024
1 check passed
indrajit96 added a commit that referenced this pull request Jul 12, 2024
Enhances existing metrics API to incorporate failure and failure counts in inference requests
---------

Co-authored-by: Kevin Wang <[email protected]>
Co-authored-by: krishung5 <[email protected]>
mc-nv pushed a commit that referenced this pull request Jul 15, 2024
Enhances existing metrics API to incorporate failure and failure counts in inference requests
---------

Co-authored-by: Kevin Wang <[email protected]>
Co-authored-by: krishung5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants