mirror of
https://github.com/huggingface/lerobot.git
synced 2026-07-24 02:06:15 +00:00
Clarify native HTTP exception timing
This commit is contained in:
@@ -630,12 +630,17 @@ def _print_range_timing_summary(fetch_pool: dict[str, float]) -> None:
|
|||||||
print(f"| http retries | {fetch_pool['range_retry_attempts'] / range_jobs:.3f} |")
|
print(f"| http retries | {fetch_pool['range_retry_attempts'] / range_jobs:.3f} |")
|
||||||
if "range_exception_attempts" in fetch_pool:
|
if "range_exception_attempts" in fetch_pool:
|
||||||
print(f"| http exceptions | {fetch_pool['range_exception_attempts'] / range_jobs:.3f} |")
|
print(f"| http exceptions | {fetch_pool['range_exception_attempts'] / range_jobs:.3f} |")
|
||||||
|
if fetch_pool["range_exception_attempts"] > 0:
|
||||||
|
print(
|
||||||
|
f"| http failed attempt avg s | "
|
||||||
|
f"{fetch_pool.get('range_failed_attempt_s', 0.0) / fetch_pool['range_exception_attempts']:.1f} |"
|
||||||
|
)
|
||||||
if fetch_pool.get("range_failed_requests"):
|
if fetch_pool.get("range_failed_requests"):
|
||||||
print(f"| http failed requests | {fetch_pool['range_failed_requests']:.0f} |")
|
print(f"| http failed requests | {fetch_pool['range_failed_requests']:.0f} |")
|
||||||
exception_counts = {
|
exception_counts = {
|
||||||
key.removeprefix("range_exception_"): value
|
key.removeprefix("range_exception_"): value
|
||||||
for key, value in fetch_pool.items()
|
for key, value in fetch_pool.items()
|
||||||
if key.startswith("range_exception_")
|
if key.startswith("range_exception_") and key != "range_exception_attempts"
|
||||||
}
|
}
|
||||||
if exception_counts:
|
if exception_counts:
|
||||||
summary = ", ".join(f"{name}={count:.0f}" for name, count in sorted(exception_counts.items()))
|
summary = ", ".join(f"{name}={count:.0f}" for name, count in sorted(exception_counts.items()))
|
||||||
|
|||||||
Reference in New Issue
Block a user