Coder Social home page Coder Social logo

aind-dynamic-foraging-models's Introduction

aind-dynamic-foraging-models

License Code Style semantic-release: angular Interrogate Coverage Python

Overview

Descriptive and generative behavioral models for the dynamic foraging task.

See also

Installation

To install the software, run

pip install aind-dynamic-foraging-models

To develop the code, clone the repo to your local machine, and run

pip install -e .[dev]

Contributing

Linters and testing

There are several libraries used to run linters, check documentation, and run tests.

  • Please test your changes using the coverage library, which will run the tests and log a coverage report:
coverage run -m unittest discover && coverage report
  • Use interrogate to check that modules, methods, etc. have been documented thoroughly:
interrogate .
  • Use flake8 to check that code is up to standards (no unused imports, etc.):
flake8 .
  • Use black to automatically format the code into PEP standards:
black .
  • Use isort to automatically sort import statements:
isort .

Pull requests

For internal members, please create a branch. For external members, please fork the repository and open a pull request from the fork. We'll primarily use Angular style for commit messages. Roughly, they should follow the pattern:

<type>(<scope>): <short summary>

where scope (optional) describes the packages affected by the code changes and type (mandatory) is one of:

  • build: Changes that affect build tools or external dependencies (example scopes: pyproject.toml, setup.py)
  • ci: Changes to our CI configuration files and scripts (examples: .github/workflows/ci.yml)
  • docs: Documentation only changes
  • feat: A new feature
  • fix: A bugfix
  • perf: A code change that improves performance
  • refactor: A code change that neither fixes a bug nor adds a feature
  • test: Adding missing tests or correcting existing tests

Semantic Release

The table below, from semantic release, shows which commit message gets you which release type when semantic-release runs (using the default configuration):

Commit message Release type
fix(pencil): stop graphite breaking when too much pressure applied Patch Fix Release, Default release
feat(pencil): add 'graphiteWidth' option Minor Feature Release
perf(pencil): remove graphiteWidth option

BREAKING CHANGE: The graphiteWidth option has been removed.
The default graphite width of 10mm is always used for performance reasons.
Major Breaking Release
(Note that the BREAKING CHANGE: token must be in the footer of the commit)

Documentation

To generate the rst files source files for documentation, run

sphinx-apidoc -o doc_template/source/ src 

Then to create the documentation HTML files, run

sphinx-build -b html doc_template/source/ doc_template/build/html

More info on sphinx installation can be found here.

aind-dynamic-foraging-models's People

Contributors

github-actions[bot] avatar hanhou avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

aind-dynamic-foraging-models's Issues

Refactor: isolate gymnasium env and task (block structure)

          I decided to refactor the code so that `agent`, `environment`, and `task` are fully disentangled. 

image

Here are some ideas,

  1. We code all AIND behavioral tasks (including future VR foraging / force foraging) using gymnasium in a shared library aind-behavior-gym. For dynamic foraging, we can further separate the block structure logic to a separate library called aind-dynamic-foraging-reward-schedule

  2. Both aind-behavior-gym and the behavioral GUI that trains animal call the same task class in reward-schedule , so that our artificial agents and animals are doing exactly the same task. 

  3. On the other hand, we can have different agent libraries that perform the task in the gym. Could be either Po-Chen's meta-rl agents, my Q-learning models, Lukasz's Bayesian agents, or Ulises's RNNs.

  4. If we were to fit the agents to animal behavior, we can write the fitting functions inside the agent libraries since fitting should not rely on the exact task.

@rachelstephlee @ZhixiaoSu @alexpiet

Originally posted by @hanhou in #18 (comment)

Migrate Han's logistic regression code

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.