OpenViking icon indicating copy to clipboard operation
OpenViking copied to clipboard

[Bug]: Compile has no usable resume/checkpoint import and imports a nonexistent vikingbot.compile.resume

Open zrwangems opened this issue 1 month ago • 2 comments

Issue Origin

Observed or reproduced in a real environment

Bug Description

OpenViking 0.5.1 has no usable Compile resume/checkpoint path, and vikingbot/compile/service.py still imports a module that does not exist in the released tag.

Observed facts:

  1. service.py has a resume branch:
    if resume:
        from vikingbot.compile.resume import run as resume_pipeline
        rendered = await resume_pipeline(pipeline)
    
    but vikingbot/compile/resume.py is not present in the installed wheel (openviking-0.5.1.dist-info/RECORD has no entry, file absent on disk), and it is also absent from the v0.5.1 tag and main.
  2. CompileRequest only exposes from, to, instruction, skill, args, openviking_connection; there is no workspace/checkpoint parameter and no API to attach an existing task workspace.
  3. args.last_compile_time only filters source files by mtime; it cannot resume a failed task.
  4. When a full-corpus task fails after Map, its records/, payloads/, embeddings/, cache/, sources/, and stages/records.json are all retained on disk, but a new compile task gets a fresh workspace and cannot import them.

Result: a 10.5-hour task that fails in Shuffle has no supported recovery path. Users must copy the workspace and drive vikingbot.compile internals themselves.

Steps to Reproduce

  1. Run a long Compile task that fails in a later stage (for example Shuffle embedding 429).
  2. Inspect the task workspace: Map records and embeddings are present.
  3. Attempt to continue: there is no CLI/API parameter for "resume this task" or "use this workspace".
  4. python -c "import vikingbot.compile.resume" fails with ModuleNotFoundError.

Expected Behavior

Either:

  • Provide a supported resume/checkpoint/import path (CLI or HTTP) that continues from a retained task workspace without re-running completed stages; or
  • If resume is not supported, remove the dead import/branch and document that tasks are not resumable, so callers do not build recovery plans around nonexistent behavior.

The same applies to the comment in service.py about "local recovery sets resume to use a stopped task's copied Reduce checkpoint" — there is no implementation behind it.

Actual Behavior

  • Dead code path: import target missing.
  • No public API for workspace/checkpoint import.
  • Failed tasks remain unrecoverable through supported interfaces even though all intermediate artifacts are on disk.

Minimal Reproducible Example

import importlib

# Installed 0.5.1 wheel:
importlib.import_module("vikingbot.compile.resume")  # ModuleNotFoundError

from vikingbot.compile.models import CompileRequest
print(CompileRequest.model_fields.keys())
# {'from_', 'to', 'instruction', 'skill', 'args', 'openviking_connection'}

Error Logs

$ python -c "import vikingbot.compile.resume"
ModuleNotFoundError: No module named 'vikingbot.compile.resume'

service.py:1075:
    from vikingbot.compile.resume import run as resume_pipeline

OpenViking Version

0.5.1

Python Version

3.12 (uv tool environment)

Operating System

Windows

Model Backend

Other

Additional Context

  • Verified against the v0.5.1 tag: resume.py is absent there as well, so this is not a wheel packaging-only issue.
  • Related to the recovery problem in the Shuffle issue: even when partial artifacts exist, there is no in-product way to reuse them.
  • If workspace import is intentionally out of scope, at least make the limitation explicit in Compile docs and remove the misleading dead branch.

zrwangems avatar Oct 20 '26 13:10 zrwangems

Related Shuffle failure isolation issue: #6368.

zrwangems avatar Oct 20 '26 13:10 zrwangems

你好,这本质上是之前的compile不稳定导致任务经常失败,现在compile引入了simple模式,更加稳定,可以拉取最新的main代码进行体验,有问题可以再回复

fujiajie666 avatar Nov 16 '26 09:11 fujiajie666