{
  "id": 343801,
  "title": "Any bug in public kernels",
  "url": "/competitions/AI4Code/discussion/343801",
  "author_name": "",
  "post_date": "2022-08-12T16:10:26.566774500Z",
  "votes": 2,
  "comment_count": 1,
  "views": 0,
  "content": "<p>Some links mentioned about some bug in the public code. I personally didnt find anything as such &amp; the codes were of exceptionally high quality. couple of minor observations I had was:</p>\n<ul>\n<li>The calculation of the fts feature had a small typo but this did not make any diff to score</li>\n<li>One observation which I felt could have an impact (but which didnt) was in the truncation of the EOS from the context code cells. For those code cells which are shorter than MAX_CODE_CELL_LENGTH, the EOS character is retained. So we end up with some records having EOS tokens in context some with none and since EOS is an imp token I thought this may make a big diff to scores but it didnt</li>\n<li>Pairwise model where the last markdown (which is an imp markdown to score) does not have a corresponding pair (because no code cell comes after it) so it is almost always ranked incorrectly at inference. I handled this by not ensembling the first and last markdowns and relying solely on point wise model for these 2 markdown ranks. One other team handled it in a much more refined way by adding a dummy code cell on top and bottom (<a href=\"https://www.kaggle.com/competitions/AI4Code/discussion/343603\" target=\"_blank\">https://www.kaggle.com/competitions/AI4Code/discussion/343603</a>)</li>\n</ul>\n<p>Did I miss anything else?</p>",
  "messages": [
    {
      "id": "1896148",
      "postDate": "08/12/2022 16:10:26",
      "content": "<p>Some links mentioned about some bug in the public code. I personally didnt find anything as such &amp; the codes were of exceptionally high quality. couple of minor observations I had was:</p>\n<ul>\n<li>The calculation of the fts feature had a small typo but this did not make any diff to score</li>\n<li>One observation which I felt could have an impact (but which didnt) was in the truncation of the EOS from the context code cells. For those code cells which are shorter than MAX_CODE_CELL_LENGTH, the EOS character is retained. So we end up with some records having EOS tokens in context some with none and since EOS is an imp token I thought this may make a big diff to scores but it didnt</li>\n<li>Pairwise model where the last markdown (which is an imp markdown to score) does not have a corresponding pair (because no code cell comes after it) so it is almost always ranked incorrectly at inference. I handled this by not ensembling the first and last markdowns and relying solely on point wise model for these 2 markdown ranks. One other team handled it in a much more refined way by adding a dummy code cell on top and bottom (<a href=\"https://www.kaggle.com/competitions/AI4Code/discussion/343603\" target=\"_blank\">https://www.kaggle.com/competitions/AI4Code/discussion/343603</a>)</li>\n</ul>\n<p>Did I miss anything else?</p>",
      "rawMarkdown": "Some links mentioned about some bug in the public code. I personally didnt find anything as such & the codes were of exceptionally high quality. couple of minor observations I had was:\n- The calculation of the fts feature had a small typo but this did not make any diff to score\n- One observation which I felt could have an impact (but which didnt) was in the truncation of the EOS from the context code cells. For those code cells which are shorter than MAX_CODE_CELL_LENGTH, the EOS character is retained. So we end up with some records having EOS tokens in context some with none and since EOS is an imp token I thought this may make a big diff to scores but it didnt\n- Pairwise model where the last markdown (which is an imp markdown to score) does not have a corresponding pair (because no code cell comes after it) so it is almost always ranked incorrectly at inference. I handled this by not ensembling the first and last markdowns and relying solely on point wise model for these 2 markdown ranks. One other team handled it in a much more refined way by adding a dummy code cell on top and bottom (https://www.kaggle.com/competitions/AI4Code/discussion/343603)\n\nDid I miss anything else?",
      "votes": null
    },
    {
      "id": "1896253",
      "postDate": "08/12/2022 17:40:08",
      "content": "<p>There are a lot of bugs and some things, which can be changed to get potential improvement.</p>\n<h3>Bugs</h3>\n<h4>Strange paddings</h4>\n<p>If you look at the tokenization of the input sequences, you can see a lot of extra paddings between markdown and code cells,  because of it the input sequences would have more potentially useful information but has them… <br>\n<img src=\"https://i.ibb.co/1RCRs8H/Screenshot-33.png\" alt=\"Screenshot-33\"></p>\n<p>Fixing is very simple, you just need to comment these lines.<br>\n<img src=\"https://i.ibb.co/FgXFGD2/Screenshot-1.png\" alt=\"Screenshot-1\"></p>\n<p>The result is below.<br>\n<img src=\"https://i.ibb.co/p0gGJ9N/Screenshot-2.png\" alt=\"Screenshot-2\"></p>\n<p>I don't know how much did it boost, because we have a small amount of time, so we changed everything 😄.</p>\n<h3>Potential improvements</h3>\n<h4>Bias correction in optimizer</h4>\n<p>We changed <code>correct_bias</code> of optimizer to <code>True</code>, because it was offered by this article - <a href=\"https://arxiv.org/pdf/2006.05987.pdf\" target=\"_blank\">https://arxiv.org/pdf/2006.05987.pdf</a><br>\n<img src=\"https://i.ibb.co/RYXnX8K/Screenshot-3.png\" alt=\"Screenshot-3\"></p>\n<p><img src=\"https://i.ibb.co/P1s9tZL/Screenshot-4.png\" alt=\"Screenshot-4\"></p>",
      "rawMarkdown": "There are a lot of bugs and some things, which can be changed to get potential improvement.\n\n<h3>Bugs</h3>\n\n<h4>Strange paddings</h4>\nIf you look at the tokenization of the input sequences, you can see a lot of extra paddings between markdown and code cells,  because of it the input sequences would have more potentially useful information but has them... \n<img src=\"https://i.ibb.co/1RCRs8H/Screenshot-33.png\" alt=\"Screenshot-33\" border=\"0\">\n\nFixing is very simple, you just need to comment these lines.\n<img src=\"https://i.ibb.co/FgXFGD2/Screenshot-1.png\" alt=\"Screenshot-1\" border=\"0\">\n\nThe result is below.\n<img src=\"https://i.ibb.co/p0gGJ9N/Screenshot-2.png\" alt=\"Screenshot-2\" border=\"0\">\n\n\nI don't know how much did it boost, because we have a small amount of time, so we changed everything 😄.\n\n\n<h3>Potential improvements</h3>\n\n<h4>Bias correction in optimizer</h4>\nWe changed `correct_bias` of optimizer to `True`, because it was offered by this article - https://arxiv.org/pdf/2006.05987.pdf\n<img src=\"https://i.ibb.co/RYXnX8K/Screenshot-3.png\" alt=\"Screenshot-3\" border=\"0\">\n\n<img src=\"https://i.ibb.co/P1s9tZL/Screenshot-4.png\" alt=\"Screenshot-4\" border=\"0\">",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1896253,
      "author_name": "vad13irt",
      "author_url": "",
      "post_date": "08/12/2022 17:40:08",
      "content": "<p>There are a lot of bugs and some things, which can be changed to get potential improvement.</p>\n<h3>Bugs</h3>\n<h4>Strange paddings</h4>\n<p>If you look at the tokenization of the input sequences, you can see a lot of extra paddings between markdown and code cells,  because of it the input sequences would have more potentially useful information but has them… <br>\n<img src=\"https://i.ibb.co/1RCRs8H/Screenshot-33.png\" alt=\"Screenshot-33\"></p>\n<p>Fixing is very simple, you just need to comment these lines.<br>\n<img src=\"https://i.ibb.co/FgXFGD2/Screenshot-1.png\" alt=\"Screenshot-1\"></p>\n<p>The result is below.<br>\n<img src=\"https://i.ibb.co/p0gGJ9N/Screenshot-2.png\" alt=\"Screenshot-2\"></p>\n<p>I don't know how much did it boost, because we have a small amount of time, so we changed everything 😄.</p>\n<h3>Potential improvements</h3>\n<h4>Bias correction in optimizer</h4>\n<p>We changed <code>correct_bias</code> of optimizer to <code>True</code>, because it was offered by this article - <a href=\"https://arxiv.org/pdf/2006.05987.pdf\" target=\"_blank\">https://arxiv.org/pdf/2006.05987.pdf</a><br>\n<img src=\"https://i.ibb.co/RYXnX8K/Screenshot-3.png\" alt=\"Screenshot-3\"></p>\n<p><img src=\"https://i.ibb.co/P1s9tZL/Screenshot-4.png\" alt=\"Screenshot-4\"></p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1896148": "Some links mentioned about some bug in the public code. I personally didnt find anything as such & the codes were of exceptionally high quality. couple of minor observations I had was:\n- The calculation of the fts feature had a small typo but this did not make any diff to score\n- One observation which I felt could have an impact (but which didnt) was in the truncation of the EOS from the context code cells. For those code cells which are shorter than MAX_CODE_CELL_LENGTH, the EOS character is retained. So we end up with some records having EOS tokens in context some with none and since EOS is an imp token I thought this may make a big diff to scores but it didnt\n- Pairwise model where the last markdown (which is an imp markdown to score) does not have a corresponding pair (because no code cell comes after it) so it is almost always ranked incorrectly at inference. I handled this by not ensembling the first and last markdowns and relying solely on point wise model for these 2 markdown ranks. One other team handled it in a much more refined way by adding a dummy code cell on top and bottom (https://www.kaggle.com/competitions/AI4Code/discussion/343603)\n\nDid I miss anything else?",
    "1896253": "There are a lot of bugs and some things, which can be changed to get potential improvement.\n\n<h3>Bugs</h3>\n\n<h4>Strange paddings</h4>\nIf you look at the tokenization of the input sequences, you can see a lot of extra paddings between markdown and code cells,  because of it the input sequences would have more potentially useful information but has them... \n<img src=\"https://i.ibb.co/1RCRs8H/Screenshot-33.png\" alt=\"Screenshot-33\" border=\"0\">\n\nFixing is very simple, you just need to comment these lines.\n<img src=\"https://i.ibb.co/FgXFGD2/Screenshot-1.png\" alt=\"Screenshot-1\" border=\"0\">\n\nThe result is below.\n<img src=\"https://i.ibb.co/p0gGJ9N/Screenshot-2.png\" alt=\"Screenshot-2\" border=\"0\">\n\n\nI don't know how much did it boost, because we have a small amount of time, so we changed everything 😄.\n\n\n<h3>Potential improvements</h3>\n\n<h4>Bias correction in optimizer</h4>\nWe changed `correct_bias` of optimizer to `True`, because it was offered by this article - https://arxiv.org/pdf/2006.05987.pdf\n<img src=\"https://i.ibb.co/RYXnX8K/Screenshot-3.png\" alt=\"Screenshot-3\" border=\"0\">\n\n<img src=\"https://i.ibb.co/P1s9tZL/Screenshot-4.png\" alt=\"Screenshot-4\" border=\"0\">"
  },
  "source": "meta"
}