Skip to content

Commit eb3019f

Browse files
Handle bot string and numeric epoch values
Signed-off-by: Anuradha Karuppiah <26330987+AnuradhaKaruppiah@users.noreply.github.com>
1 parent 3e7d78c commit eb3019f

File tree

1 file changed

+6
-1
lines changed
  • packages/nvidia_nat_profiler/src/nat/plugins/profiler/runtime_evaluator

1 file changed

+6
-1
lines changed

packages/nvidia_nat_profiler/src/nat/plugins/profiler/runtime_evaluator/atif_evaluate.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,12 @@ async def evaluate_atif_item(self, sample: AtifEvalSample) -> EvalOutputItem:
5252
end_ts = _iso_to_epoch(step.timestamp)
5353
ancestry = (step.extra or {}).get("ancestry")
5454
start_ts_raw = ancestry.get("span_event_timestamp") if isinstance(ancestry, dict) else None
55-
start_ts = _iso_to_epoch(start_ts_raw) if isinstance(start_ts_raw, str) else None
55+
if isinstance(start_ts_raw, (int, float)):
56+
start_ts = float(start_ts_raw)
57+
elif isinstance(start_ts_raw, str):
58+
start_ts = _iso_to_epoch(start_ts_raw)
59+
else:
60+
start_ts = None
5661
if end_ts is not None and start_ts is not None:
5762
latencies.append(max(0.0, end_ts - start_ts))
5863

0 commit comments

Comments
 (0)