Skip to content

About

DACON·Kaggle 대회 시작 템플릿 — 검증 우선 원칙과 제출 로그 표준화

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Dacon Base Template

This is a generic baseline repository for Dacon (and Kaggle) competitions. It provides a standardized directory structure, linting, formatting, and essential data science libraries to quickly start any new competition.

Directory Structure

  • _inbox/: 사용자(User)와 에이전트(Agent) 간의 소통 창구. 이미지나 임시 문서를 올려두는 Dropzone.
  • configs/: Hydra configuration files (e.g., config.yaml) for centralizing hyperparameters and settings.
  • data/: Store datasets here. raw/ for unmodified original data, processed/ for cleaned/engineered data.
  • docs/: Project documentation, strategy notes, and planning.
    • MASTER_PLAN.md: 대회 전반의 목표와 운영 지침.
    • competition_info/: 대회 공식 개요, 규칙, 평가 산식 등 정보 저장소.
    • DATA_DICTIONARY.md: 피처 명세 및 EDA 발견점 기록 템플릿.
    • SUBMISSION_HISTORY.md: 리더보드 제출 결과 및 실험 실패 기록부.
    • infrastructure/: 도구별 세부 활용 매뉴얼.
  • models/: Saved models and weights.
  • notebooks/: Jupyter notebooks for EDA and experimentation.
  • scripts/: Executable scripts for setup and workflow orchestration.
    • setup_kaggle.py: Sets up metadata and paths for code/data/notebook deployment to Kaggle.
  • src/: Reusable source code.
    • data/: Data loading logic.
    • features/: Feature engineering.
    • models/: Model architecture definitions.
  • submissions/: Output CSV files for competition submission.
  • tests/: Unit tests.

Setup

  1. Compile Dependencies (if modifying requirements.in):

    make deps
  2. Install Dependencies:

    make install
  3. Kaggle API Setup: To push datasets and notebooks to Kaggle, you need your Kaggle API credentials:

    1. Go to your Kaggle account settings (https://www.kaggle.com/settings).
    2. Click "Create New Token" to download kaggle.json.
    3. Place the file in ~/.kaggle/kaggle.json and secure it:
      mkdir -p ~/.kaggle
      mv path/to/kaggle.json ~/.kaggle/
      chmod 600 ~/.kaggle/kaggle.json
  4. Environment Variables: Copy .env.example to .env and fill in necessary keys.

    cp .env.example .env

    Note: DACON_TOKEN, DACON_TEAMNAME, WANDB_API_KEY, and HF_TOKEN are configured globally in ~/.zshrc and do not need to be set in the .env file per project.

Development

  • Format Code: make format
  • Lint Code: make lint
  • Type Check: make typecheck
  • Run Tests: make test

Kaggle Notebook Workflow

Since heavy modeling is often offloaded to Kaggle Kernels:

  1. Push Datasets: Upload your data/ folder as a standalone Kaggle dataset.

    make kaggle-push-data
  2. Push Local Source Code & Configs: Turns your src/ and configs/ folders into a Kaggle dataset so they can be imported in notebooks.

    make kaggle-push-code

    Note: This automatically creates metadata using your environment variables (or requests your username) and zips the files to push.

  3. Push and Run Notebook: Push the main notebook located in notebooks/kaggle_runner/ to Kaggle for execution. The notebook code is automatically updated to point to your new datasets.

    make kaggle-push-notebook
  4. Download Outputs:

    make kaggle-pull-output

Blog

About

DACON·Kaggle 대회 시작 템플릿 — 검증 우선 원칙과 제출 로그 표준화

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages