Welcome to the AIND VR Foraging project documentation!ยถ

aind-vr-foragingยถ

CI PyPI - Version License ruff uv

A repository for the VR Foraging task.


๐Ÿ“‹ General instructionsยถ

This repository follows the project structure laid out in the Aind.Behavior.Services repository.


๐Ÿ”ง Prerequisitesยถ

Pre-requisites for running the project can be found here.


๐Ÿš€ Deploymentยถ

For convenience, once third-party dependencies are installed, Bonsai and python virtual environments can be bootstrapped by running:

./scripts/deploy.ps1

from the root of the repository.

โš™๏ธ Generating settings filesยถ

The VR Foraging tasks is instantiated by a set of three settings files that strictly follow a DSL schema. These files are:

  • task_logic.json

  • rig.json

  • session.json

Examples on how to generate these files can be found in the ./Examples directory of the repository. Once generated, these are the the only required inputs to run the Bonsai workflow in ./src/main.bonsai.

The workflow can thus be executed using the Bonsai CLI:

"./bonsai/bonsai.exe" "./src/main.bonsai" -p SessionPath=<path-to-session.json> -p RigPath=<path-to-rig.json> -p TaskLogicPath=<path-to-task_logic.json>

However, for a better experiment management user experience, it is recommended to use the provided experiment launcher below.

[> ] CLI toolsยถ

The platform exposes a few CLI tools to facilitate various tasks. Tools are available via:

uv run vr-foraging <subcommand>

for a list of all sub commands available:

uv run vr-foraging -h

You may need to install optional dependencies depending on the sub-commands you run.

๐ŸŽฎ Experiment launcher (CLABE)ยถ

To manage experiments and input files, this repository contains a launcher script that can be used to run the VR Foraging task. This script is located at ./src/aind_behavior_vr_foraging/launcher.py. It can be run from the command line as follows:

uv run vr-foraging clabe

Additional arguments can be passed to the script as needed:

uv run vr-foraging clabe -h

or via a ./local/clabe.yml file. (An example can be found in ./Examples/clabe.yml)

In order to run the launcher script, optional dependencies should be installed via:

Additional custom launcher scripts can be created and used as needed.

๐Ÿ” Primary data quality-controlยถ

Once an experiment is collected, the primary data quality-control script can be run to check the data for issues. This script can be launcher using:

uv run vr-foraging data-qc <path-to-data-dir>

๐ŸŒ‰ Mapping to aind-data-schemaยถ

Once an experiment is collected, data can be mapped to aind-data-schema using the data-mapper sub-command:

uv run vr-foraging data-mapper

๐Ÿ”„ Regenerating schemasยถ

DSL schemas can be modified in ./src/aind_behavior_vr_foraging/rig.py (or (...)/task_logic.py`).

Once modified, changes to the DSL must be propagated to json-schema and csharp API. This can be done by running:

uv run vr-foraging regenerate

๐Ÿ“– Curriculaยถ

The VrForaging platform supports a curricula structure that allows for the organization and management of different learning paths and experiences. The implementation relies on the a common definition of โ€œcurriculumโ€ progression provided by aind-behavior-curriculum.

Curricula are expected to be defined in src/aind_behavior_vr_foraging/curricula/ by adding individual submodules that follow the structure of https://github.com/AllenNeuralDynamics/Aind.Behavior.VrForaging.Curricula. Updates to the curriculum will therefore require, by design, explicitly updating the submodule reference via a reviewed pull request.

Indices and tablesยถ