Skip to main content

A library that defines AIND data schema for the Aind Behavior VR Foraging experiment.

Project description

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.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 TaskPath=<path-to-task.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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aind_behavior_vr_foraging-1.0.0rc1.tar.gz (35.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aind_behavior_vr_foraging-1.0.0rc1-py3-none-any.whl (49.7 kB view details)

Uploaded Python 3

File details

Details for the file aind_behavior_vr_foraging-1.0.0rc1.tar.gz.

File metadata

  • Download URL: aind_behavior_vr_foraging-1.0.0rc1.tar.gz
  • Upload date:
  • Size: 35.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for aind_behavior_vr_foraging-1.0.0rc1.tar.gz
Algorithm Hash digest
SHA256 b5c1e69f4397e7923e3a0e4847f6c40e980b587d3d15f43c86ed7c5432e75c78
MD5 41e64edf693a93dc5e8d78d31f64db97
BLAKE2b-256 d7b0c590eb16abd8f577a5a900c40b2a68c30497e7d3f59670c2c150ccf2039b

See more details on using hashes here.

File details

Details for the file aind_behavior_vr_foraging-1.0.0rc1-py3-none-any.whl.

File metadata

  • Download URL: aind_behavior_vr_foraging-1.0.0rc1-py3-none-any.whl
  • Upload date:
  • Size: 49.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for aind_behavior_vr_foraging-1.0.0rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 e0156ba8d4a1f2f5271f15640da233173f8f9ead7faf4241f65e67bde9bfb0fc
MD5 bea2c990687350986a51d5c7f4679665
BLAKE2b-256 c000449868782f629f19100efa46d37f507283c4f4129f3adb05dce59019cb0e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page