Skip to content
/ rh-torch Public

Shared scripts for training deep learning networks in torch

Notifications You must be signed in to change notification settings

CAAI/rh-torch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rh-torch

Shared scripts for training deep learning networks in torch

HOW TO INSTALL

Install only to your user. Go to your virtual environment. Run:

git clone https://github.com/CAAI/rh-torch.git && cd rh-torch
pip install -e . 

SUGGESTED PROJECT FOLDER TREE

The following directory tree allows to use GenericTIODataModule as is for loading data for training/inference. Otherwise you need to overwrite the prepare_patient_data method to accomodate for your directory structure.

Project directory
│   ├── data directory
│   │   ├── patient1
│   │   │   ├── input_file1.npy
│   │   │   ├── input_file2.npy
│   │   │   └── target_file1.npy
│   │   ├── patient2
│   │   ├── ...
│   │   ├── patientn
│   │   ├── train_test_split.json
│   │
│   ├── data_generator.py
│   └── my_config.yaml

BASIC USAGE

torch_training -c ~/example_project/my_config.yaml

After training, the model is saved in ~/example_project/trained_models along with a copy of the config file.

HOW TO CONTRIBUTE

Create your edits in a different branch, decicated to a few specific things. We prefer many minor edits over one huge. Once everything is well-documented and tested, perform a pull request for your edits to be made available in the main branch. See steps here:

git branch awesome-addition
git checkout awesome-addition
# do your changes
git commit -a -m 'your changes'
git push
gh pr create --title "your title" --body "longer description of what you did"

If you wish, you can add --assignee <github_name> to ping specific persons for looking at your pull request.

One someone accepted your pull request (after reviewing the changes), it will be part of the main branch.

Important before accepting pull requests

Before you accept a pull request, please update the version.py with an incremented number and a description of what has changed. This number is logged as part of the training config file that is autogenerated.

About

Shared scripts for training deep learning networks in torch

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages