Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 1 addition & 15 deletions src/tracegrad/attribute.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from concurrent.futures import ThreadPoolExecutor
from dataclasses import dataclass, field
from pathlib import Path
from typing import Callable, Mapping, Sequence
from typing import Callable, Sequence

from pydantic import ValidationError

Expand Down Expand Up @@ -511,20 +511,6 @@ def _health(
return HealthSample(sampled=sampled, agreed=agreed)


def attribution_records(run: AttributionRun) -> list[Mapping[str, object]]:
"""Serialize an attribution run for the ledger."""

return [
{
"trace_id": item.trace_id,
"cached": item.cached,
"error": item.error,
"result": item.result.model_dump(mode="json") if item.result else None,
}
for item in run.attributions
]


def instrument_summary(instrument: Instrument) -> str:
"""A one-line human description of the instrument in use."""

Expand Down
Loading