This repository is for Child Mind Institute - Detect Sleep States
1. install rye
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
rye sync
. .venv/bin/activate
Rewrite run/conf/dir/local.yaml to match your environment
data_dir:
processed_dir:
output_dir:
model_dir:
sub_dir: ./
cd data
kaggle competitions download -c child-mind-institute-detect-sleep-states
unzip child-mind-institute-detect-sleep-states.zip
rye run python -m run/prepare_data.py phase=train,test
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 dataset.batch_size=32
You can easily perform experiments by changing the parameters because hydra is used. The following commands perform experiments with downsample_rate of 2, 4, 6, and 8.
rye run python -m run/train.py downsample_rate=2,4,6,8
rye run python tools/upload_dataset.py
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.params.encoder_weights=null pp.score_th=0.005 pp.distance=40 phase=test