ndt2 changes #332
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Testing | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "*" ] | |
permissions: | |
contents: read | |
jobs: | |
testing: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.9" | |
- name: Setup virtual environment | |
run: | | |
python -m venv venv | |
source venv/bin/activate | |
pip install uv | |
- name: Install dependencies | |
run: | | |
source venv/bin/activate | |
uv pip install --upgrade pip | |
uv pip install torch==2.2.0 | |
uv pip install -e ".[dev]" | |
- name: Install plugin | |
run: | | |
source venv/bin/activate | |
uv pip install pytest-github-actions-annotate-failures | |
- name: Test with pytest | |
run: | | |
source venv/bin/activate | |
export WANDB_MODE=dryrun | |
pytest tests/ | |
- name: Test documentation | |
run: | | |
source venv/bin/activate | |
pytest --doctest-modules torch_brain/ -v | |
- name: Install brainsets | |
run: | | |
source venv/bin/activate | |
uv pip install git+https://github.com/neuro-galaxy/brainsets@main | |
- name: Download sample dataset | |
run: | | |
source venv/bin/activate | |
brainsets config --raw-dir data/raw --processed-dir data/processed | |
brainsets prepare pei_pandarinath_nlb_2021 | |
- name: Train a POYO model | |
run: | | |
source venv/bin/activate | |
python examples/poyo/train.py --config-name train_mc_maze_small.yaml data_root=data/processed wandb.enable=false epochs=2 eval_epochs=2 optim.lr_decay_start=0. | |
- name: Train a POYO+ model | |
run: | | |
source venv/bin/activate | |
python examples/poyo_plus/train.py --config-name train_mc_maze_small.yaml data_root=data/processed wandb.enable=false epochs=2 eval_epochs=2 optim.lr_decay_start=0. |