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

Enhance OTEL testing DLIS-6308 #7132

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open

Enhance OTEL testing DLIS-6308 #7132

wants to merge 15 commits into from

Conversation

indrajit96
Copy link
Contributor

@indrajit96 indrajit96 commented Apr 18, 2024

Add tests

  1. For request cancellations, make sure spans are ended properly
  2. Verify tracing behavior, after this PR: Allow non-decoupled model to send response and FINAL flag separately #6017

@indrajit96 indrajit96 changed the title Tests for Enhance OTEL testing DLIS-6308 Apr 18, 2024
@oandreeva-nv
Copy link
Contributor

Could you please add a description, clarifying what tests were added?

@oandreeva-nv
Copy link
Contributor

Could you please attach a picture of a trace as displayed in jaeger with cancelled request.

Another question, have you considered cases when request was cancelled, when it was in a queue and when it was already in a compute stage?

@indrajit96
Copy link
Contributor Author

Could you please attach a picture of a trace as displayed in jaeger with cancelled request.

Another question, have you considered cases when request was cancelled, when it was in a queue and when it was already in a compute stage?

Could you please attach a picture of a trace as displayed in jaeger with cancelled request.

Another question, have you considered cases when request was cancelled, when it was in a queue and when it was already in a compute stage?

Screenshot 2024-05-02 at 10 51 00 AM

Fixed this, added a model which waits for a delay before executing hence cancellation request is recieved before the execution starts

headers=headers,
expected_number_of_spans=expected_number_of_spans,
expected_counts=expected_counts,
expected_parent_span_dict=expected_parent_span_dict,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
expected_parent_span_dict=expected_parent_span_dict,
expected_parent_span_dict=expected_parent_span_dict

@@ -232,7 +292,7 @@ def _test_resource_attributes(self, attributes):
),
)

def _verify_contents(self, spans, expected_counts):
def _verify_contents(self, spans, expected_counts, is_cancel):
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: is_cancel -> is_cancelled

and please update Args field bellow on L304 with a new field.

@@ -397,7 +474,7 @@ def _test_trace(
][0]
self.assertEqual(len(parsed_spans), expected_number_of_spans)

self._verify_contents(parsed_spans, expected_counts)
self._verify_contents(parsed_spans, expected_counts, False)
Copy link
Contributor

Choose a reason for hiding this comment

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

I would recommend not use just False or True as an argument, it might be not clear what they stand for in this context. Please use is_cancelled=False

inputs[1].set_data_from_numpy(np.arange(1, dtype=np.float32))
inputs.append(grpcclient.InferInput("INPUT2", [1], "FP32"))
inputs[2].set_data_from_numpy(np.arange(1, dtype=np.float32))
future_1 = triton_client_grpc.async_infer(

Check notice

Code scanning / CodeQL

Unused local variable Note

Variable future_1 is not used.
@rmccorm4
Copy link
Collaborator

rmccorm4 commented May 8, 2024

Can you update the PR title to be more descriptive? (cancellation, decoupled responses, etc. rather than JIRA ticket number)

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.

None yet

3 participants