Spaces:
Running on Zero
Running on Zero
Commit History
-
Add two-stage per-Task timeout with Forced Answer (Part B)
Decisions B1-B4 from the shared understanding: - Rename GAIA_TASK_TIMEOUT -> GAIA_TASK_HARD_TIMEOUT (360s); add GAIA_TASK_SOFT_TIMEOUT (300s) and GAIA_FORCE_ANSWER_TIMEOUT (45s). Hard is enforced as a total-time ceiling: the synthesis call is clamped to the remaining hard-soft budget. - Soft deadline: snapshot the (racy, best-effort) partial Worklog and synthesize a best-effort Answer via the cleaning-model path with a new prompt (_synthesize_forced_answer, _format_partial_trace, _snapshot_partial_worklog). Success -> status 'forced' (submitted). - Failure / hard cap -> 'Error: Task timed out after {HARD}s', status 'timeout' (not submitted). Wedged Agent is always discarded. - Worker extracted to module-level _run_task(agent, idx, task) -> (result, replace_agent); _resolve delegates and swaps in a fresh Agent. - Forced entries are folded into the Answer bundle (completed OR forced) and submitted; error/timeout stay out. Force runs keep forced entries. - results_view: …6a102b8 -
Add LOCAL_DEVICE auto-selection for local multimodal models (Part A)
- _resolve_local_device(): one resolver for Qwen vision + faster-whisper, gated by LOCAL_DEVICE=auto|cpu|mps|cuda (default auto). auto probes torch MPS -> CUDA -> CPU; explicit values short-circuit the probe. - Whisper clamps mps->cpu (CTranslate2 has no MPS backend); compute_type int8 on cpu, float16 on cuda (_whisper_device_config). - Qwen vision: float16 on mps/cuda, float32 on cpu; device_map='auto' only for cuda; model placed on mps; inputs moved to mps/cuda (_vision_load_config). - Tests: resolver priority, whisper clamping, vision dtype/device_map (15 new, 131 total passing). - README env table + .env.example document LOCAL_DEVICE.da1bf0c -
Fix zero-arg super() in retry lambda (ticket 01 regression)
super(): no arguments — the __class__ cell isn't propagated into nested lambdas, so the model call always failed at runtime (latent: tests used a fake agent). Capture base = super() in the method body. Add regression test TestRetryingOpenAIServerModel.6d2cfe1
-
Show Benchmark results view after submission (ticket 05)
e3d7f99 -
Wire Space orchestration and submission (ticket 04)
7ef139b -
Capture Worklogs and write committed Answer bundle (ticket 03)
- GAIASolverAgent.solve returns (answer, worklog); serializes the full ReAct trace (thought / tool call / observation) plus a per-tool summary with timing into a structured Worklog; keeps the partial trace on error. - Local Run writes a committed Answer bundle (answer_bundle.json) keyed by task_id with {question, level, file_name, answer, worklog, timestamp}. - Re-runs only solve Tasks missing from the bundle; --force re-solves all. Failed Tasks stay out of the bundle and are retried; stale entries from force re-solves and rotated-out Tasks are pruned so the bundle stays consistent with the results CSV (adds source/status/timestamp columns). - 74 tests green (worklog serialization, bundle I/O, re-run bundling).15691c7 -
Add multimodal video/audio tools (ticket 02)
- transcribe_audio now uses local faster-whisper (WHISPER_MODEL) by default, with the hosted Whisper API as a documented fallback (USE_WHISPER_API=1 or local failure + configured key); routing unit-tested. - New extract_video_frames tool downloads a video (yt-dlp) and samples N evenly-spaced frames (ffmpeg/ffprobe) that feed the local vision tool; robust frame-count parsing and job-artifact cleanup on failure. - _extract_frames_from_video extracted as a testable seam; integration-tested against a locally generated clip (skipped when ffmpeg is absent). - ADR-0002 updated to record the documented exception for the hosted-audio fallback.987eb77 -
Harden the local solver (ticket 01)
- Retry-with-backoff for transient model/network errors: _call_with_retry + _is_retryable_error applied to answer cleaning, /questions fetch, and each agent model call via _RetryingOpenAIServerModel (preserves ReAct memory). - Per-Task timeout: _run_with_timeout runs each Agent call on a daemon helper thread joined with TASK_TIMEOUT_SEC; a wedged call is recorded as a timeout row without blocking the worker or process exit. - Worker pool: agents returned in try/finally (no lost worker/deadlock on a throwing Task); a timed-out Agent is discarded and replaced with a fresh one. - Answer cleaning: prompt built via replacement (safe for braces) instead of .format(); cleaning max_tokens raised to 1024 (CLEANING_MAX_TOKENS). - Safe archive extraction: _safe_extract_all replaces extractall() and rejects path traversal (.., absolute paths, symlink escapes). - Unit tests (36) for answer normalization, prompt building, safe zip, retry, per-task timeout, and local-file resolution. …43598fd