Skip to content

Latest commit

 

History

History
81 lines (61 loc) · 1.72 KB

File metadata and controls

81 lines (61 loc) · 1.72 KB

Child Mind Institute - Detect Sleep States

This repository is for Child Mind Institute - Detect Sleep States

Build Environment

1. install rye

install documentation

MacOS

curl -sSf https://rye-up.com/get | bash
echo 'source "$HOME/.rye/env"' >> ~/.zshrc
source ~/.zshrc

Linux

curl -sSf https://rye-up.com/get | bash
echo 'source "$HOME/.rye/env"' >> ~/.bashrc
source ~/.bashrc

Windows
see install documentation

2. Create virtual environment

rye sync

3. Activate virtual environment

. .venv/bin/activate

Set path

Rewrite run/conf/dir/local.yaml to match your environment

data_dir: 
processed_dir: 
output_dir: 
model_dir: 
sub_dir: ./

Prepare Data

1. Download data

cd data
kaggle competitions download -c child-mind-institute-detect-sleep-states
unzip child-mind-institute-detect-sleep-states.zip

2. Preprocess data

rye run python -m run/prepare_data.py phase=train,test

Train Model

The following commands are for training the model of LB0.714

rye run python run/train.py downsample_rate=2 duration=5760 exp_name=exp001 batch_size=32

Upload Model

rye run python run/tools.py upload_dataset.py

Inference

The following commands are for inference of LB0.714

rye run python run/inference.py dir=kaggle exp_name=exp001 weight.run_name=single downsample_rate=2 duration=5760 model.encoder_weights=null post_process.score_th=0.005 post_process.distance=40 phase=test