Skip to content

Naoyg/ayniy

 
 

Repository files navigation

Ayniy, All You Need is YAML

Ayniy is a supporting tool for machine learning competitions.

Documentation | Slide (Japanese)

# Import packages
from sklearn.model_selection import StratifiedKFold
import yaml

from ayniy.model.runner import Runner

# Load configs
f = open('configs/run000.yml', 'r+')
configs = yaml.load(f, Loader=yaml.SafeLoader)

# Difine CV strategy as you like
cv = StratifiedKFold(n_splits=5, shuffle=True, random_state=7)

# Modeling
runner = Runner(configs, cv)
runner.run_train_cv()
runner.run_predict_cv()
runner.submission()

Examples

Platform Competition Name Rank Repository
CodaLab Basketball Behavior Challenge BBC2020 1 Link
Nishika 財務・非財務情報を活用した株主価値予測 2 Link
SIGIR2021 SIGIR eCOM 2021 Data Challenge 3 Link
SIGNATE ひろしまQuest2020#stayhome【アイデア部門】 - Link
ProbSpace YouTube動画視聴回数予測 6 Link
Solafune 夜間光データから土地価格を予測 6 Link
atmaCup #8 [初心者向] atmaCup - Link
Kaggle WiDS Datathon 2021 64 Link
Kaggle Titanic: Machine Learning from Disaster - Link

Starter Kit

Scripts

mkdir project_dir
cd project_dir
sh start.sh

kaggle_utils is used for feature engineering.

Environment

docker compose up -d --build
docker exec -it ayniy-test bash

MLflow

cd experiments
mlflow ui -h 0.0.0.0 --port 5001

Kaggle Notebook

!git clone https://github.com/upura/ayniy
import sys
sys.path.append("/kaggle/working/ayniy")
!pip install -r /kaggle/working/ayniy/requirements.txt
!mkdir '../output/'
!mkdir '../output/logs'
from sklearn.model_selection import StratifiedKFold
from ayniy.model.runner import Runner

For Developers

Test

pysen run lint
pysen run format

Docs

In container,

cd docs
make html

Out of container,

sh deploy.sh

https://github.com/upura/ayniy-docs

Releases

No releases published

Packages

No packages published

Languages

  • Python 98.5%
  • Shell 1.1%
  • Dockerfile 0.4%