Skip to content

GitHub action to generate graphs for submissions to Kaggle competitions

License

Notifications You must be signed in to change notification settings

OliverSieweke/kaggle-graph

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Kaggle Graph

License: MIT Versions Documentation Status

GitHub action to automatically generate graphs of your submissions to Kaggle competitions and display them in your Github repository’s README to track your progress.

Example Graph

See it in action here.

Getting Started

  1. Add the KAGGLE_KEY secret to your GitHub repository under Settings > Secrets > Add a new secret.
  2. Define a GitHub workflow by adding a .github/workflow/kaggle-graph.yaml to your repository using the template below:
name: Kaggle Graph Generation

on:
  push:
    branches: master
  schedule:
    - cron:  '00 00 * * *'

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Git Checkout
        uses: actions/checkout@v2
      - name: Kaggle Graph Generation
        uses: OliverSieweke/[email protected]
        with:
          KAGGLE_KEY: ${{ secrets.KAGGLE_KEY }}
          KAGGLE_USERNAME: oliversieweke
          KAGGLE_COMPETITION_ID: titanic
      - name: Git Auto Commit
        uses: stefanzweifel/[email protected]
        with:
          commit_message: Automatic Kaggle graph generation
  1. Add the graph to your README:
  • Markdown:
    [!Kaggle Submissions Graph](./kaggle-submissions-graph.png)
  • reStructuredText:
    .. image:: ./kaggle-submissions-graph.png
        :alt: Kaggle Submissions Graph
NB 1:
  • The KAGGLE_KEY key can be generated on Kaggle under My Profile > Edit Profile > API > Create New Api Token.
  • The KAGGLE_USERNAME can be found on Kaggle under My Profile > Edit Profile.
  • The KAGGLE_COMPETITION_ID can be read from the Kaggle competition's URL.
NB 2:

Kaggle Graph is designed to be used in conjunction with the following GitHub actions:

Configurations

The action can be further configured over the input keys below:

Name Description Required Default Type
KAGGLE_USERNAME Kaggle username. true - str
KAGGLE_KEY Kaggle key. true - str
KAGGLE_COMPETITION_ID Kaggle competition ID. true - str
GRAPH_NAME Output graph file name. false "kaggle-submissions-graph" str
Y_MIN Y-axis minimum boundary. false - float
Y_MAX Y-axis maximum boundary. false - float
SCORE Score type. false positive str (positive or negative)
OBJECTIVE Score objective. false - float

References

About

GitHub action to generate graphs for submissions to Kaggle competitions

Resources

License

Stars

Watchers

Forks

Packages

No packages published