Skip to content

GabrielKP/enc

Repository files navigation

Encoding Models

A project reproducing endocing models published by LeBel et al. 2023.

We documented our results in this Report.

code documentation documentation ML framework Code style: Ruff packaging framwork: Poetry tool: pre-commit


Setup

# setup up conda environment
conda create -n enc python=3.9
conda activate enc

# install package
pip install .

# install git-annex
https://handbook.datalad.org/en/latest/intro/installation.html

# download the data (one of the below)
python src/encoders/download_data.py # subject 2 & few stories
python src/encoders/download_data.py --stories all # subject 2 & all stories
python src/encoders/download_data.py --stories all --subjects all # all subjects & all stories

# you can also install the path into a custom dir
python src/encoders/download_data.py --data_dir /path/to/custom/dir


# Setup the config with the editor of your choice
nano config.yaml
# If you want to generate plots, make sure to install inkscape
# and set its path in INKSCAPE_DIR (see below)

Setup pycortex (for visualization)

  1. Find out the location of the pycortex config: In the ipython terminal:
import cortex
cortex.options.usercfg
  1. Open the config file (should be a */options.cfg)

  2. Modify the filestore entry to point towards ds003020/derivative/pycortex-db

  3. To use quickshow install inkscape: https://inkscape.org/release/inkscape-1.3.2/

  4. Make sure inkscape is available in the terminal. Instructions Mac

Development setup

  1. Install poetry
  2. Run following commands:
# setup up conda environment (optional)
conda create -n enc python=3.9
conda activate enc

# install dependencies
poetry install

# install pre-commit
pre-commit install

# run pre-commit against all files once
pre-commit run --all-files

# download the data (one of the below)
python src/encoders/download_data.py # subject 2 & few stories

# Setup the config with the editor of your choice
nano config.yaml

Team

License

About

The encoders

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •