Add CPU, memory, and accelerator resource requests to PENDING span#258
Add CPU, memory, and accelerator resource requests to PENDING span#258morgan-wowk wants to merge 1 commit into
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
60be4d4 to
31bb44a
Compare
34ce978 to
30700b0
Compare
31bb44a to
652c58d
Compare
30700b0 to
5317505
Compare
86bfbab to
d89b973
Compare
5317505 to
68a527c
Compare
68a527c to
7b0c735
Compare
d89b973 to
04de498
Compare
7b0c735 to
93d7b73
Compare
04de498 to
966274a
Compare
93d7b73 to
798b90d
Compare
966274a to
171402c
Compare
798b90d to
573a81c
Compare
171402c to
1610a49
Compare
| execution = _make_execution(statuses=["QUEUED", "SUCCEEDED"]) | ||
| execution_tracing.emit_execution_trace(execution=execution) | ||
|
|
||
| for span in span_exporter.get_finished_spans(): | ||
| assert "execution.resources.cpu" not in (span.attributes or {}) |
There was a problem hiding this comment.
I think it'll be more thorough to add a task_spec so that it proves PENDING is the only one that gets resource states.
execution.task_spec = {
"annotations": {
kubernetes_launchers.RESOURCES_ACCELERATORS_ANNOTATION_KEY: '{"H100": 1}',
}
}
execution_tracing.emit_execution_trace(execution=execution)
There was a problem hiding this comment.
🤖 Updated — test_non_pending_spans_have_no_resource_attrs now sets a task_spec with RESOURCES_ACCELERATORS_ANNOTATION_KEY on an execution that goes straight QUEUED → SUCCEEDED (no PENDING span). Also added an assertion on execution.resources.accelerators to make the non-PENDING guarantee explicit for both resource attribute types.
1610a49 to
6c1f384
Compare
573a81c to
a4c0efb
Compare
execution.resources.cpu, execution.resources.memory, and execution.resources.accelerators sourced from task_spec annotations. Enables distinguishing workload types (e.g. Nebius H100 vs GKE L4) and correlating resource requests to execution timing.
a4c0efb to
c46efa4
Compare
6c1f384 to
14bd7a2
Compare

Add resource attributes to PENDING execution spans
execution.resources.cpu,execution.resources.memory, andexecution.resources.acceleratorssourced from task_spec annotations.Enables distinguishing workload types (e.g. Nebius H100 vs GKE L4)
and correlating resource requests to execution timing.
The attributes are attached exclusively to the
PENDINGstatus span, where resource reservation is most meaningful. The functiontry_emit_execution_tracehas been renamed toemit_execution_traceto better reflect its role.Screenshots