-
Notifications
You must be signed in to change notification settings - Fork 863
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
Add metric cache and migrate existing metrics to cache implementation #2199
Conversation
876120c
to
833c28c
Compare
frontend/server/src/main/java/org/pytorch/serve/metrics/MetricCache.java
Outdated
Show resolved
Hide resolved
frontend/server/src/main/java/org/pytorch/serve/metrics/MetricCache.java
Outdated
Show resolved
Hide resolved
frontend/server/src/main/java/org/pytorch/serve/metrics/MetricCache.java
Outdated
Show resolved
Hide resolved
frontend/server/src/main/java/org/pytorch/serve/metrics/MetricCollector.java
Outdated
Show resolved
Hide resolved
frontend/server/src/main/java/org/pytorch/serve/job/GRPCJob.java
Outdated
Show resolved
Hide resolved
frontend/server/src/main/java/org/pytorch/serve/job/RestJob.java
Outdated
Show resolved
Hide resolved
frontend/server/src/main/java/org/pytorch/serve/util/NettyUtils.java
Outdated
Show resolved
Hide resolved
for (Dimension dimension : parsedMetric.getDimensions()) { | ||
dimensionValues.add(dimension.getValue()); | ||
} |
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.
why not directly parse the backend log to generate IMetric?
Codecov Report
@@ Coverage Diff @@
## master #2199 +/- ##
==========================================
- Coverage 69.82% 69.73% -0.09%
==========================================
Files 77 77
Lines 3420 3420
Branches 57 57
==========================================
- Hits 2388 2385 -3
- Misses 1029 1032 +3
Partials 3 3 see 1 file with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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.
testModelMetrics should be updated and reflected in integration test ModelServerTest.java
frontend/server/src/main/java/org/pytorch/serve/job/RestJob.java
Outdated
Show resolved
Hide resolved
frontend/server/src/main/java/org/pytorch/serve/job/RestJob.java
Outdated
Show resolved
Hide resolved
frontend/server/src/main/java/org/pytorch/serve/metrics/MetricCache.java
Outdated
Show resolved
Hide resolved
Update metrics documentation
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.
Approving after chatting about this PR offline, I would still like to see some more docs around how a user goes about creating a custom python metric and how everything pipes back into a prometheus dashboard, critical to mention this in release notes as well and a tutorial as well although for the tutorial I'm fine if we do it in a followup PR
Description
Implementation of Metric Cache and migration of existing metrics to cache implementation
Design: #1492
Fixes #2140 #2141
Type of change
Feature/Issue validation/testing
Unit tests
Included in PR and run as part of sanity test in CI
Manual end to end tests to verify metrics frontend implementation
Verified both log and prometheus modes
Regression tests
Benchmark
Checklist: