stormlog.infer.correlation_accounting
Resolve inference evidence before computing overlap-aware GPU time.
Functions
|
Keep summed activity, interval union, and iteration elapsed separate. |
|
Translate one timestamp while preserving calibration uncertainty. |
|
Return the alignments whose domains and validity window cover a timestamp. |
|
Deduplicate events, then resolve references independent of delivery order. |
|
Validate an explicit model against one measured iteration GPU budget. |
Classes
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- class stormlog.infer.correlation_accounting.AlignedTimestamp(value_ns: 'int', uncertainty_ns: 'int', clock_domain: 'str')[source]
Bases:
object- Parameters:
value_ns (int)
uncertainty_ns (int)
clock_domain (str)
- value_ns: int
- uncertainty_ns: int
- clock_domain: str
- class stormlog.infer.correlation_accounting.CorrelationGraph(run_id: 'str | None', requests: 'dict[tuple[EntityRef, EntityRef | None], RequestEvent]', iterations: 'dict[EntityRef, IterationEvent]', stages: 'dict[EntityRef, StageEvent]', memberships: 'tuple[MembershipEvent, ...]', activities: 'dict[EntityRef, ActivityReferenceEvent]', alignments: 'tuple[ClockAlignmentEvent, ...]', unresolved: 'tuple[UnresolvedReference, ...]')[source]
Bases:
object- Parameters:
run_id (str | None)
requests (dict[tuple[EntityRef, EntityRef | None], RequestEvent])
iterations (dict[EntityRef, IterationEvent])
stages (dict[EntityRef, StageEvent])
memberships (tuple[MembershipEvent, ...])
activities (dict[EntityRef, ActivityReferenceEvent])
alignments (tuple[ClockAlignmentEvent, ...])
unresolved (tuple[UnresolvedReference, ...])
- run_id: str | None
- requests: dict[tuple[EntityRef, EntityRef | None], RequestEvent]
- iterations: dict[EntityRef, IterationEvent]
- stages: dict[EntityRef, StageEvent]
- memberships: tuple[MembershipEvent, ...]
- activities: dict[EntityRef, ActivityReferenceEvent]
- alignments: tuple[ClockAlignmentEvent, ...]
- unresolved: tuple[UnresolvedReference, ...]
- class stormlog.infer.correlation_accounting.DeviceClock(device_uuid: 'str', clock_domain: 'str', clock_kind: 'str' = 'monotonic')[source]
Bases:
object- Parameters:
device_uuid (str)
clock_domain (str)
clock_kind (str)
- device_uuid: str
- clock_domain: str
- clock_kind: str = 'monotonic'
- class stormlog.infer.correlation_accounting.GpuTime(summed_activity_ns: 'int', busy_ns: 'int', activity_count: 'int')[source]
Bases:
object- Parameters:
summed_activity_ns (int)
busy_ns (int)
activity_count (int)
- summed_activity_ns: int
- busy_ns: int
- activity_count: int
- class stormlog.infer.correlation_accounting.IterationTiming(elapsed_ns: 'int | None', gpu: 'dict[DeviceClock, GpuTime]')[source]
Bases:
object- Parameters:
elapsed_ns (int | None)
gpu (dict[DeviceClock, GpuTime])
- elapsed_ns: int | None
- gpu: dict[DeviceClock, GpuTime]
Bases:
object
- class stormlog.infer.correlation_accounting.RunAccounting(run_id: 'str | None', iterations: 'dict[EntityRef, IterationTiming]', device_totals: 'dict[DeviceClock, GpuTime]', unattributed_activity_refs: 'tuple[EntityRef, ...]', unmeasured_gpu_activity_refs: 'tuple[EntityRef, ...]')[source]
Bases:
object- Parameters:
run_id (str | None)
iterations (dict[EntityRef, IterationTiming])
device_totals (dict[DeviceClock, GpuTime])
unattributed_activity_refs (tuple[EntityRef, ...])
unmeasured_gpu_activity_refs (tuple[EntityRef, ...])
- run_id: str | None
- iterations: dict[EntityRef, IterationTiming]
- device_totals: dict[DeviceClock, GpuTime]
Bases:
object- Parameters:
iteration_ref (EntityRef)
device_clock (DeviceClock)
budget_ns (int)
shares (tuple[RequestShareEstimate, ...])
unattributed_ns (int)
- class stormlog.infer.correlation_accounting.UnresolvedReference(event_id: 'str', kind: 'str', ref: 'EntityRef')[source]
Bases:
object- Parameters:
event_id (str)
kind (str)
ref (EntityRef)
- event_id: str
- kind: str
- stormlog.infer.correlation_accounting.account_gpu_time(graph)[source]
Keep summed activity, interval union, and iteration elapsed separate.
- Parameters:
graph (CorrelationGraph)
- Return type:
- stormlog.infer.correlation_accounting.align_timestamp(timestamp_ns, *, from_clock_domain, to_clock_domain, alignments)[source]
Translate one timestamp while preserving calibration uncertainty.
- Parameters:
timestamp_ns (int)
from_clock_domain (str)
to_clock_domain (str)
alignments (Iterable[ClockAlignmentEvent])
- Return type:
- stormlog.infer.correlation_accounting.covering_alignments(timestamp_ns, *, from_clock_domain, to_clock_domain, alignments)[source]
Return the alignments whose domains and validity window cover a timestamp.
align_timestampneeds exactly one; callers can use the count to tell a missing alignment from an ambiguous one.- Parameters:
timestamp_ns (int)
from_clock_domain (str)
to_clock_domain (str)
alignments (Iterable[ClockAlignmentEvent])
- Return type:
list[ClockAlignmentEvent]
- stormlog.infer.correlation_accounting.resolve_inference_events(records)[source]
Deduplicate events, then resolve references independent of delivery order.
- Parameters:
records (Iterable[CorrelationEvent | LegacyInferenceRecord])
- Return type:
Validate an explicit model against one measured iteration GPU budget.
- Parameters:
graph (CorrelationGraph)
accounting (RunAccounting)
iteration_ref (EntityRef)
device_clock (DeviceClock)
shares (tuple[RequestShareEstimate, ...])
unattributed_ns (int)
- Return type: