feat(tools): neuralset — wrap Meta FAIR neuro-AI pipeline - #10
Conversation
Single tool covering the full NeuralSet pipeline:
setup, list, info, download, preprocess, features, align,
encode, decode, evaluate, leaderboard, cache, help
- modalities: EEG / MEG / fMRI / iEEG / fNIRS / Spikes
- backbones: CLIP / DINOv2 / ResNet / V-JEPA / wav2vec2 / HuBERT /
EnCodec / LLaMA / GPT-2 / BERT / SONAR
- lazy imports, dry_run preview, cache stats, fallback dataset list
- respects DEVDUCK_NEURALSET_{REPO,REPO_DIR,CACHE} env vars
- standard Strands {status, content:[{text}]} return shape
Ref: https://facebookresearch.github.io/neuroai/neuralset/
… matrix Bug: 7 stage functions (download, preprocess, features, align, encode, decode, evaluate) returned error when CLI not found, even with dry_run=True. This made the pipeline impossible to preview/test without installing. Fix: skip CLI installation check when dry_run is True. Uses 'neuralset' as placeholder command name so _run() can emit '[dry-run] neuralset ...'. Tests: tests/test_neuralset.py exercises all 13 actions across 42 cases (modality filters, required-param errors, dry-run simulations, sub_actions, invalid actions). 42/42 passing.
🧪 Autonomous Coverage Matrix — 42/42 ✅Ran every branch of Results
🐛 Bug found & fixed in this PR7/13 stage functions ( Fix (52cde57): skip the CLI-presence check when Before: 26/42 ✅ → After: 42/42 ✅ Coverage summary
Run locally: |
Resolves checkout failure: 'fatal: could not read Username for https://github.com' when the PAT_TOKEN secret is empty/unconfigured. The workflow now falls back to the auto-provided GITHUB_TOKEN so CI runs on PRs without requiring an extra secret.
Root cause of 'could not read Username for https://github.com': The PAT_TOKEN secret is set but expired/invalid. Passing it explicitly to actions/checkout@v4 causes the checkout to try (and fail) with bad credentials. The `secrets.PAT_TOKEN || secrets.GITHUB_TOKEN` fallback only works when PAT_TOKEN is empty, not when it's invalid. Fix: Remove the explicit `token:` parameter from checkout step. actions/ checkout uses the auto-provided GITHUB_TOKEN by default, which is always valid for the workflow's own repository. PAT_TOKEN is still passed as env var to the agent itself (with same fallback) for cross-repo API calls.
🤖 Autonomous Agent VerificationWorkflow Run: #66 ✅ Verification Results
📋 Tool CapabilitiesThe neuralset tool wraps the Meta FAIR NeuralSet neuro-AI pipeline, providing actions for:
🎯 Next StepsThe feature branch can be safely deleted as the work has been successfully integrated into main. Autonomous verification by DevDuck GitHub Agent |
Ruff flagged 2 f-strings without placeholders in tests/test_neuralset.py: - line 128: print(f"COVERAGE MATRIX - PR #10 (neuralset)") - line 150: print(f"\nDetailed results: /tmp/neuralset_coverage.json") Fix auto-applied via 'ruff check --fix'. Verified locally in a fresh venv: python3 -m venv .venv && .venv/bin/pip install ruff .venv/bin/ruff check devduck/tools/neuralset.py tests/test_neuralset.py → All checks passed!
🧠 NeuralSet tool
Wraps the Meta FAIR NeuralSet project as a single DevDuck tool.
Pipeline actions
setup → list → info → download → preprocess → features → align → encode → decode → evaluate → leaderboard → cacheCoverage
Design
dry_run=Trueon every stage for previewDEVDUCK_NEURALSET_{REPO,REPO_DIR,CACHE}env-var overrides{status, content:[{text}]}stats/list/clear)Example e2e
Notes
setupis called.neuralsetCLI for stages that require it; returns a clear error if CLI is missing.🦆 Autonomous devduck generation — Telegram-triggered.