Skip to content

Circuit paths: time limit on example neuron chains - #152

Merged
Robbie1977 merged 1 commit into
mainfrom
circuit-time-limit
Nov 25, 2026
Merged

Robbie1977 merged 1 commit into
mainfrom
circuit-time-limit

Conversation

@Clare72

@Clare72 Clare72 commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

instance_graph adds example neuron chains to each class path, one neuron-graph search per path per dataset. On the large connectomes that took 22 s at the defaults and over 90 s at k=20, instance_k=10, and a worker can't be stopped partway, so a request kept its worker busy even after the client had gone (review on VirtualFlyBrain/VFB3-MCP#23).

  • find_paths takes time_limit (seconds). Paths are always returned in full. Chains are then added best path first across datasets, and no new chain search starts once the time is used. A search can overrun by at most one chain search, about 0.3–3 s.
  • Paths not reached have no instances. The response has time_limit_reached: true and a warning saying how many paths have no chains, and to ask for fewer paths, chains or datasets.
  • Circuit mode sets it from VFBQUERY_CIRCUIT_TIME_LIMIT (default 30 s, 0 for none), not from the request. /status reports it.

The Circuit Browser already copes with partial results. Once this is deployed, the MCP's caps on k and instance_k with instance_graph could be relaxed.

Part of #114.

Testing

  • tests/test_circuit_paths.py: a fake-clock test of the order and the warning across two datasets, and the setting in /status. 20 pass.
  • Local FlyWire, LC12 → giant fiber, k=20, instance_k=10: 12.2 s with no limit; 3.0 s with a 3 s limit (all 20 paths, 5 with chains, plus the warning).

🤖 Generated with Claude Code

instance_graph chains are added best path first across datasets until
VFBQUERY_CIRCUIT_TIME_LIMIT (default 30 s) is used; paths not reached
have no instances, and the response says so (#114).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Clare72
Clare72 requested a review from Robbie1977 November 25, 2026 14:52
@Robbie1977
Robbie1977 merged commit f4898d7 into main Nov 25, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants