-
Notifications
You must be signed in to change notification settings - Fork 327
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
[Metrics] Fix metrics and docs #3233
[Metrics] Fix metrics and docs #3233
Conversation
* Fix ray storage metrics * Add valid check for metrics * Fix mars usage demo
Co-authored-by: Shawn <[email protected]>
Co-authored-by: Shawn <[email protected]>
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.
LGTM
mars/core/operand/core.py
Outdated
@@ -490,7 +488,18 @@ def execute(results: Dict[str, Any], op: OperandType): | |||
try: | |||
result = executor(results, op) | |||
succeeded = True | |||
op_executed_number.record(1, {"op": op.__class__.__name__}) | |||
global op_executed_number |
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.
This seems not easy to use compared to previsous API
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.
Can we update the metrics Counter/Guage instance when metris are init?
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.
Can we update the metrics Counter/Guage instance when metris are init?
Yes, good idea. I'll fix it.
…s into fix-metrics-initialization
c25eb91
to
73acfe9
Compare
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.
LGTM
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.
LGTM
* Fix metrics and docs * Fix ray storage metrics * Add valid check for metrics * Fix mars usage demo * Fix metrics check * Remove unused log * Update mars/metrics/api.py Co-authored-by: Shawn <[email protected]> * Update mars/metrics/api.py Co-authored-by: Shawn <[email protected]> * Support lazy initialize metrics * Restore op_executed_number * Fix log Co-authored-by: buhe <[email protected]> Co-authored-by: Shawn <[email protected]> (cherry picked from commit 6c6fc48)
* Fix metrics and docs * Fix ray storage metrics * Add valid check for metrics * Fix mars usage demo * Fix metrics check * Remove unused log * Update mars/metrics/api.py Co-authored-by: Shawn <[email protected]> * Update mars/metrics/api.py Co-authored-by: Shawn <[email protected]> * Support lazy initialize metrics * Restore op_executed_number * Fix log Co-authored-by: buhe <[email protected]> Co-authored-by: Shawn <[email protected]> (cherry picked from commit 6c6fc48)
What do these changes do?
In the previous design, metrics are allowed to be used without initialization. In this case, the default metrics, namely console metrics, are used, but this may lead to wrong use. For example, using metrics before initializing metrics, then using the default console metrics, but we may think that we have initialized metrics with prometheus or ray, then it should be the corresponding metrics. So this pr:
init_metrics
Related issue number
Fixes #xxxx
Check code requirements