{
  "id": 201047,
  "title": "How to Monitor Submission Progress with the Kaggle CmdLine API",
  "url": "/competitions/riiid-test-answer-prediction/discussion/201047",
  "author_name": "James Trotman",
  "post_date": "2020-12-02T23:16:46.038000",
  "votes": 18,
  "comment_count": 0,
  "views": 0,
  "content": "<p>Here is a quick shell script that will notify you when your submissions are scored.</p>\n<pre><code>#!/bin/bash\nSLUG=${1:-riiid-test-answer-prediction} # default follows :-\nfor i in $(seq 1 48); do\n    date\n    TXT=$(kaggle competitions submissions -c $SLUG -v)\n    if ! (echo \"$TXT\" | cut -d, -f4 | grep -q pending); then\n        kaggle competitions submissions -c $SLUG  # show subs\n        say nothing pending\n        break\n    fi\n    sleep 299\ndone\n</code></pre>\n<p>It needs the (highly recommended!) <a href=\"https://github.com/Kaggle/kaggle-api\" target=\"_blank\">Kaggle command line API</a> to run (<code>pip install kaggle</code> then setup authentication).</p>\n<p>If you save it to somewhere in your path (e.g. <code>~/bin</code>) and give it executable permissions (<code>chmod +x poll_subs</code>) you can run it from any shell with:</p>\n<p><code>poll_subs riiid-test-answer-prediction</code></p>\n<p>It will print the date/time as it goes so the last time it shows is approximately when the submission completed. I think Kaggle have added some timing unpredictability to this competition which limits the performance timing aspect, but, when your submissions are ready, you'll know!</p>\n<p>The \"say\" line is MacOS specific, you can replace that with any command that gets your attention, or remove it. (On Linux there's <a href=\"http://manpages.ubuntu.com/manpages/trusty/man1/spd-say.1.html\" target=\"_blank\">spd-say</a>. A quick search reveals <a href=\"https://github.com/nels-o/toaster\" target=\"_blank\">toast</a> for Windows.)</p>\n<p>Hope this helps!</p>",
  "messages": [
    {
      "id": 1100221,
      "postDate": "2020-12-02T23:16:46.040Z",
      "content": "<p>Here is a quick shell script that will notify you when your submissions are scored.</p>\n<pre><code>#!/bin/bash\nSLUG=${1:-riiid-test-answer-prediction} # default follows :-\nfor i in $(seq 1 48); do\n    date\n    TXT=$(kaggle competitions submissions -c $SLUG -v)\n    if ! (echo \"$TXT\" | cut -d, -f4 | grep -q pending); then\n        kaggle competitions submissions -c $SLUG  # show subs\n        say nothing pending\n        break\n    fi\n    sleep 299\ndone\n</code></pre>\n<p>It needs the (highly recommended!) <a href=\"https://github.com/Kaggle/kaggle-api\" target=\"_blank\">Kaggle command line API</a> to run (<code>pip install kaggle</code> then setup authentication).</p>\n<p>If you save it to somewhere in your path (e.g. <code>~/bin</code>) and give it executable permissions (<code>chmod +x poll_subs</code>) you can run it from any shell with:</p>\n<p><code>poll_subs riiid-test-answer-prediction</code></p>\n<p>It will print the date/time as it goes so the last time it shows is approximately when the submission completed. I think Kaggle have added some timing unpredictability to this competition which limits the performance timing aspect, but, when your submissions are ready, you'll know!</p>\n<p>The \"say\" line is MacOS specific, you can replace that with any command that gets your attention, or remove it. (On Linux there's <a href=\"http://manpages.ubuntu.com/manpages/trusty/man1/spd-say.1.html\" target=\"_blank\">spd-say</a>. A quick search reveals <a href=\"https://github.com/nels-o/toaster\" target=\"_blank\">toast</a> for Windows.)</p>\n<p>Hope this helps!</p>",
      "rawMarkdown": "Here is a quick shell script that will notify you when your submissions are scored.\n\n\t#!/bin/bash\n\tSLUG=${1:-riiid-test-answer-prediction} # default follows :-\n\tfor i in $(seq 1 48); do\n\t    date\n\t    TXT=$(kaggle competitions submissions -c $SLUG -v)\n\t    if ! (echo \"$TXT\" | cut -d, -f4 | grep -q pending); then\n\t        kaggle competitions submissions -c $SLUG  # show subs\n\t        say nothing pending\n\t        break\n\t    fi\n\t    sleep 299\n\tdone\n\nIt needs the (highly recommended!) [Kaggle command line API][1] to run (`pip install kaggle` then setup authentication).\n\nIf you save it to somewhere in your path (e.g. `~/bin`) and give it executable permissions (`chmod +x poll_subs`) you can run it from any shell with:\n\n`poll_subs riiid-test-answer-prediction`\n\nIt will print the date/time as it goes so the last time it shows is approximately when the submission completed. I think Kaggle have added some timing unpredictability to this competition which limits the performance timing aspect, but, when your submissions are ready, you'll know!\n\nThe \"say\" line is MacOS specific, you can replace that with any command that gets your attention, or remove it. (On Linux there's [spd-say][2]. A quick search reveals [toast][3] for Windows.)\n\nHope this helps!\n\n[1]: https://github.com/Kaggle/kaggle-api\n[2]: http://manpages.ubuntu.com/manpages/trusty/man1/spd-say.1.html\n[3]: https://github.com/nels-o/toaster\n",
      "votes": 17
    }
  ],
  "comments": [],
  "raw_markdown_by_id": {
    "1100221": "Here is a quick shell script that will notify you when your submissions are scored.\n\n\t#!/bin/bash\n\tSLUG=${1:-riiid-test-answer-prediction} # default follows :-\n\tfor i in $(seq 1 48); do\n\t    date\n\t    TXT=$(kaggle competitions submissions -c $SLUG -v)\n\t    if ! (echo \"$TXT\" | cut -d, -f4 | grep -q pending); then\n\t        kaggle competitions submissions -c $SLUG  # show subs\n\t        say nothing pending\n\t        break\n\t    fi\n\t    sleep 299\n\tdone\n\nIt needs the (highly recommended!) [Kaggle command line API][1] to run (`pip install kaggle` then setup authentication).\n\nIf you save it to somewhere in your path (e.g. `~/bin`) and give it executable permissions (`chmod +x poll_subs`) you can run it from any shell with:\n\n`poll_subs riiid-test-answer-prediction`\n\nIt will print the date/time as it goes so the last time it shows is approximately when the submission completed. I think Kaggle have added some timing unpredictability to this competition which limits the performance timing aspect, but, when your submissions are ready, you'll know!\n\nThe \"say\" line is MacOS specific, you can replace that with any command that gets your attention, or remove it. (On Linux there's [spd-say][2]. A quick search reveals [toast][3] for Windows.)\n\nHope this helps!\n\n[1]: https://github.com/Kaggle/kaggle-api\n[2]: http://manpages.ubuntu.com/manpages/trusty/man1/spd-say.1.html\n[3]: https://github.com/nels-o/toaster\n"
  }
}