From 53e8e5adb630ecfa62cc99f915aa127a22459290 Mon Sep 17 00:00:00 2001 From: ben Date: Tue, 21 Apr 2026 16:40:49 -0400 Subject: [PATCH] chunk timeout error --- src/ria_toolkit_oss/agent/legacy_executor.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/ria_toolkit_oss/agent/legacy_executor.py b/src/ria_toolkit_oss/agent/legacy_executor.py index 91221e1..76b55c5 100644 --- a/src/ria_toolkit_oss/agent/legacy_executor.py +++ b/src/ria_toolkit_oss/agent/legacy_executor.py @@ -68,7 +68,7 @@ _HEARTBEAT_INTERVAL = 30 # seconds between heartbeats _POLL_TIMEOUT = 30 # server-side long-poll duration _POLL_CLIENT_TIMEOUT = 40 # client read timeout — slightly longer than server _RECONNECT_PAUSE = 5 # seconds to wait after a poll error before retrying -_CHUNK_SIZE = 50 * 1024 * 1024 # 50 MB — well below Cloudflare's 100 MB limit +_CHUNK_SIZE = 10 * 1024 * 1024 # 10 MB per chunk — fast enough for git-LFS to process within timeout _DIRECT_THRESHOLD = 90 * 1024 * 1024 # files above this use chunked upload _CAPTURE_SAMPLES = 4096 # IQ samples per inference window _IDLE_LABELS = frozenset({"noise", "idle", "no_signal", "unknown_protocol", "background"}) @@ -659,13 +659,16 @@ class NodeAgent: base_url = f"{self.hub_url}/datasets/upload" steps = (result.get("steps") if isinstance(result, dict) else getattr(result, "steps", None)) or [] + campaign_name: str = getattr(config, "name", None) or "" for step in steps: output_path: str | None = getattr(step, "output_path", None) if not output_path: continue device_id: str = getattr(step, "transmitter_id", "") or "" for fpath in _sigmf_files(output_path): - filename = os.path.basename(fpath) + basename = os.path.basename(fpath) + path_parts = [p for p in (campaign_name, device_id) if p] + filename = "/".join(path_parts + [basename]) metadata = { "filename": filename, "repo_owner": repo_owner, @@ -751,7 +754,7 @@ class NodeAgent: headers=headers, files={"file": (filename, chunk, "application/octet-stream")}, data={**metadata, "upload_id": upload_id, "chunk_index": i, "total_chunks": total_chunks}, - timeout=120, + timeout=300, verify=verify, ) if not resp.ok: