GithubHelp home page GithubHelp logo

kaggle-watch's Introduction

kaggle-watch

kaggle apiを利用してNotebook Submitの際に送信情報を監視し, 実行時間等を取得するためのツール.
SlackやDiscordのWebhook機能を利用してLBや実行時間等を含めてメッセージを送信する.

コンペでの活用例.
9時間(540分)の制限に対して, あと程度処理が可能かなどを検討する際に有用であった.

kaggle API の設定

Python で kaggle API を利用できるようにする.
すでに利用できている人には不要な項目なのでスキップ.
いままで利用していなければ https://www.kaggle.com/settings/account から Create New Token を実行.

# Windows:
C:\\Users\\<username>\\.kaggle  
# Linux:
/home/<username>/.kaggle  

上記パスに kaggle.json を配置する.

kaggle competitions submissions -c xxxx
# (xxxx部分はコンペティションを指定する)

に対して fileName, date などの列が表示されれば準備できている.
上記の xxxx 部分は main.py にも使用するのでコピーしておく.

Discord の設定

注意
事前にkaggle APIを実行可能および認証情報を取得していることが必要になる.

本コードではDiscordを想定している

1. 監視ログを送信したいDiscrodサーバー/チャンネルでWebhookを作成

2. Webhook作成時のURLを取得

3. コード設定

main.py のコードを編集してWebhook送信先URLおよびコンペID、Max/Minなどを編集する.

4. 実行

実行することで監視を開始.

python main.py

report/xxxx.csv というファイルを生成する (ログファイル).
Ctrl+Cで停止できる. quit というファイルを作っても停止可能.

注意
起動している間にネットワーク疎通ができず、かつその間に submit が終了した場合は
submit時間が正しく計測できないので注意すること.

メモ

Slackのテストをしていないので json などの指定ミスはあるかもしれない.

kaggle-watch's People

Contributors

sinpcw avatar

Stargazers

 avatar SeshurajuP avatar SyusukeYasui avatar sqrt4kaido avatar Sani avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.