mirror of
https://github.com/huggingface/lerobot.git
synced 2026-07-07 18:11:50 +00:00
Log failed HTTP range attempts
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import random
|
||||
import resource
|
||||
import tempfile
|
||||
@@ -92,6 +93,11 @@ def parse_args() -> argparse.Namespace:
|
||||
default=10.0,
|
||||
help="Print episode-pool fill progress every N seconds. Set 0 to disable.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--http-failure-log",
|
||||
default=None,
|
||||
help="Optional JSONL file for failed/retried HTTP range attempts.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--include-decode",
|
||||
action="store_true",
|
||||
@@ -889,6 +895,9 @@ def main() -> None:
|
||||
args.strategy = "both"
|
||||
if args.strategy == "native-http":
|
||||
args.range_backend = "native-http"
|
||||
if args.http_failure_log:
|
||||
os.environ["LEROBOT_HTTP_FAILURE_LOG"] = args.http_failure_log
|
||||
print(f"http_failure_log: {args.http_failure_log}")
|
||||
data_root = args.data_root
|
||||
if data_root.startswith("hf://") and not args.no_hub_branch_assert:
|
||||
assert_hf_hub_range_cache_branch()
|
||||
|
||||
Reference in New Issue
Block a user