Buckets:
| from __future__ import annotations | |
| def delta(candidate: float, baseline: float) -> dict[str, float]: | |
| absolute = candidate - baseline | |
| pct = 0.0 if baseline == 0 else (absolute / baseline) * 100 | |
| return {"abs": round(absolute, 6), "pct": round(pct, 4)} | |
| def build_improvement_report(baseline: dict[str, float], current: dict[str, float]) -> dict[str, object]: | |
| keys = sorted(set(baseline) & set(current)) | |
| improvements = {key: delta(current[key], baseline[key]) for key in keys} | |
| return { | |
| "baseline": baseline, | |
| "current": current, | |
| "improvements": improvements, | |
| "rationale": [ | |
| f"{key} changed by {values['abs']:.3f} absolute ({values['pct']:.2f}% relative)." | |
| for key, values in improvements.items() | |
| ], | |
| } | |
Xet Storage Details
- Size:
- 793 Bytes
- Xet hash:
- 8eb3350edaa5e42fa701ec3e81199628038a7bbe557d5150730939e18cce2664
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.