Skip to content

Migrate spider2_lite off Ray #6430

Closed

Description

@linear-code

resources_servers/spider2_lite declares ray_enabled = True.

How it uses Ray: the model's SQL runs against SQLite in Ray tasks (execute_sqlite_remote in eval_utils.py, scheduling_strategy="SPREAD"). A task that exceeds its timeout is stopped with ray.cancel.

Proposed replacement: first decide whether the queries need isolation from the server process.

  • If they don't: use bounded local concurrency, with a process pool and a per-query timeout.
  • If they do: use sandboxes.

Done when: the server no longer declares ray_enabled = True on main. Alternatively, its README documents which distributed-systems requirement Ray satisfies and why a sandbox, bounded local concurrency or a persistent endpoint is not enough. Tracked in the checklist on #3669.

Activity

  1. iguehring-nvidia commented on Nov 19, 2026

    @iguehring-nvidia
    Contributor

    Note for this follow-up, from the review of #6392 (which removes Ray from spider2_lite and runs the queries in a thread pool): each query still copies its whole database into memory before running (313 MB for the largest; 24 concurrent queries peaked at 9.4 GB in the server process, measured in the review), so an out-of-memory kill now takes down the whole server instead of one Ray worker.

    Opening the file read-only and querying it directly, as bird_sql does, removes the copy: sqlite3.connect(f"file:{db_path}?mode=ro", uri=True), conn.setlimit(sqlite3.SQLITE_LIMIT_ATTACHED, 0), and the connect inside the try so a missing database still returns None. It also stops model-written SQL from creating files with ATTACH or VACUUM INTO. It changes one score, so it needs its own baselining: a write statement returns None instead of [], so a DELETE no longer matches an empty gold result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions