-
Notifications
You must be signed in to change notification settings - Fork 25.6k
[ML] Inference duration and error metrics #115876
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
Changes from 3 commits
c83298d
07510f9
714cc6a
d39fb9f
461afd6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| pr: 115876 | ||
| summary: Inference duration and error metrics | ||
| area: Machine Learning | ||
| type: enhancement | ||
| issues: [] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -61,11 +61,14 @@ public void request(long n) { | |
| public void cancel() { | ||
| if (isClosed.compareAndSet(false, true) && upstream != null) { | ||
| upstream.cancel(); | ||
| onCancel(); | ||
| } | ||
| } | ||
| }; | ||
| } | ||
|
|
||
| protected void onCancel() {} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm curious why this is not an abstract method? Do we not want to implement this in all subclasses?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Most subclasses don't have any actions to take when the stream is canceled, they're mostly just forwarding the request/cancel and modifying the response payload, so I figured we should just continue to no-op them for |
||
|
|
||
| @Override | ||
| public void onSubscribe(Flow.Subscription subscription) { | ||
| if (upstream != null) { | ||
|
|
||
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to do listenener.onFailure(e); after we recordMetrics. I don't think that any code after calling listener.on is guaranteed to run.