Here is a template you can use for managing your work and submissions for Kaggle competitions.
This project is based on the kaggle_filestructure repository from mikezawitkowski but with tweaks by me, an increased folder depth, and, most importantly, the ability to "Create a new repository" using this template!
..
└── kaggle
├── input <- data files for the competition
│ └── {competition-slug}
│ ├── test.csv <- example data
│ └── train.csv <- example data
├── src <- source scripts
├── working <- the working directory
│ ├── notebook.ipynb <- example Jupyter notebook
│ └── submission.csv <- example submission
├── Original_README.md <- from kaggle.com/competitions/predict-west-nile-virus
└── README.md <- what you're reading right now
- Above the file list, click Use this template.
- Then, select Create a new repository.
- After using the template and cloning the repo, replace {competition-slug} in the input directory with the slug from the competition you're working on
- e.g. for kaggle.com/competitions/
titanic
, the slug would be "titanic" - also upload the competition data to this folder
- e.g. for kaggle.com/competitions/
- Since the GitHub structure doesn't perfectly line up with Kaggle's, you will need to prepend filepath with "
../..
"- e.g.
'/kaggle/input/titanic/
train.csv' from a Kaggle notebook becomes'../../kaggle/input/titanic/
train.csv' for a Jupyter notebook in the "working" directory.
- e.g.