← Back to Pull requests

refactor(logging): enhance log messages for device resource counting #778

Closed
unknown closed this pull request without merging on Jan 10, 2025 08:06 UTC
View on GitHub
unknown unknown commented on Jan 06, 2025 06:34 UTC
Author

What type of PR is this?

/kind flake

What this PR does / why we need it:

The current logging configuration of our GPU allocation system is not sufficient to track device resource allocation and request processing, making it challenging to debug and troubleshoot issues. This PR aims to enhance the logging functionality to provide a more comprehensive understanding of device resource utilization and request processing.

The current log output for a request processing event is as follows:

I1223 05:51:46.777241       1 route.go:44] Into Predicate Route inner func
I1223 05:51:46.777693       1 scheduler.go:437] "begin schedule filter" pod="cuda-sample-vector-add-78dd7b6c56-jkxtp" uuid="064360f8-b1d5-465c-a23b-675832a43899" namespaces="gpu-test-workloads"
I1223 05:51:46.777728       1 device.go:213] Counting mthreads devices
I1223 05:51:46.777736       1 device.go:123] Counting metax devices
I1223 05:51:46.777744       1 device.go:254] Counting mlu devices
I1223 05:51:46.777749       1 device.go:259] idx= nvidia.com/gpu val= {{1 0} {<nil>} 1 DecimalSI} {{0 0} {<nil>}  }
I1223 05:51:46.777761       1 device.go:259] idx= nvidia.com/gpumem val= {{4 3} {<nil>} 4k DecimalSI} {{0 0} {<nil>}  }
I1223 05:51:46.777767       1 device.go:188] Counting dcu devices
I1223 05:51:46.777771       1 device.go:183] Counting iluvatar devices
I1223 05:51:46.777788       1 pod.go:40] "collect requestreqs" counts=[{"NVIDIA":{"Nums":1,"Type":"NVIDIA","Memreq":4000,"MemPercentagereq":101,"Coresreq":25}}]
I1223 05:51:46.777823       1 scheduler.go:471] All node scores do not meet for pod cuda-sample-vector-add-78dd7b6c56-jkxtp ]

However, this log output lacks critical information about device resource allocation and request processing, making it difficult to diagnose issues. This PR introduces detailed logs for device resource counting and request processing, as well as improved error handling and logging mechanisms.

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:
Please review the updated logging configuration and ensure that it meets the desired logging requirements.
Does this PR introduce a user-facing change?:
No

Diff: 276 lines (+207 / -69) across 3 files Reviewer: wawa0210 Review duration: 5852m
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 276 lines diff across 3 files
0.40
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
60%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.336
Shallow Review Depth shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #778"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 60.5% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 39.6% (MEDIUM) · Higher = larger blast radius
39.6%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 60.5% · Lower = rushed or shallow review
60.5%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 15.6% · Safe to merge
15.6%