Skip to content

Add live end-to-end test against the real neuPrint brain - #2

Merged
Zikithezikit merged 2 commits into
mainfrom
improve/real-brain-e2e
Nov 3, 2026
Merged

Zikithezikit merged 2 commits into
mainfrom
improve/real-brain-e2e

Conversation

@Zikithezikit

@Zikithezikit Zikithezikit commented Nov 3, 2026 •

Copy link
Copy Markdown
Owner

What

  • Adds tests/test_live_brain.py: fetches the DNge104 mini brain from neuPrint with an empty cache, builds the network, settles it and checks the motor output is finite. Skipped when NEUPRINT_APPLICATION_CREDENTIALS is unset, so offline runs are unchanged.
  • Adds make test-live.
  • CI passes a NEUPRINT_TOKEN repo secret to the tests when one exists; otherwise the live test skips.
  • Fixes a ZeroDivisionError in the trainers when run with --episodes 0, which makes it possible to evaluate the untrained connectome as a baseline.

Checked by hand against the real data

  • Cold-cache live fetch of the full male-cns:v0.9 connectome: 66,657 neurons, 227,941 synapses, matching the cached copy (~3 min).
  • flynet train --full with hebbian, gradient and rl, 10 episodes each: all run to completion.
  • make lint docstyle typecheck clean, 82 tests passing.

Worth knowing

The untrained connectome already reaches 100% success on the foraging task (~125 steps), so the current success rates don't show that training helps. A harder task would be needed for that.

Fetches the mini brain from the server with an empty cache, builds the
network and checks it settles to finite motor output. Skipped when no
token is set, so offline runs are unchanged. Adds make test-live and
passes the token through CI when the repo has one.
Lets you evaluate the untrained connectome as a baseline.
@Zikithezikit
Zikithezikit merged commit 5340e98 into main Nov 3, 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.

1 participant