{
  "id": 324588,
  "title": "Flax Code Query embeddings",
  "url": "/competitions/AI4Code/discussion/324588",
  "author_name": "",
  "post_date": "2022-05-12T11:20:20.473297900Z",
  "votes": 11,
  "comment_count": 5,
  "views": 0,
  "content": "<p>There's an SBERT model that generates code and query vectors in a neutral space trained on <a href=\"https://paperswithcode.com/dataset/codesearchnet\" target=\"_blank\">code-search-net</a>. The model is available <a href=\"https://huggingface.co/flax-sentence-embeddings/st-codesearch-distilroberta-base\" target=\"_blank\">here</a>. Anyone who wants to take the semantic search route in this competition will find it quite useful. Demo usage notebook <a href=\"https://www.kaggle.com/jdoesv/flax-code-embeddings-usage\" target=\"_blank\">here</a></p>",
  "messages": [
    {
      "id": "1785736",
      "postDate": "05/12/2022 11:20:20",
      "content": "<p>There's an SBERT model that generates code and query vectors in a neutral space trained on <a href=\"https://paperswithcode.com/dataset/codesearchnet\" target=\"_blank\">code-search-net</a>. The model is available <a href=\"https://huggingface.co/flax-sentence-embeddings/st-codesearch-distilroberta-base\" target=\"_blank\">here</a>. Anyone who wants to take the semantic search route in this competition will find it quite useful. Demo usage notebook <a href=\"https://www.kaggle.com/jdoesv/flax-code-embeddings-usage\" target=\"_blank\">here</a></p>",
      "rawMarkdown": "There's an SBERT model that generates code and query vectors in a neutral space trained on [code-search-net](https://paperswithcode.com/dataset/codesearchnet). The model is available [here](https://huggingface.co/flax-sentence-embeddings/st-codesearch-distilroberta-base). Anyone who wants to take the semantic search route in this competition will find it quite useful. Demo usage notebook [here](https://www.kaggle.com/jdoesv/flax-code-embeddings-usage)",
      "votes": null
    },
    {
      "id": "1786485",
      "postDate": "05/13/2022 00:26:48",
      "content": "<p>I've already been there. Since it's a Flax code maybe you can submmit it to the monthly Google prize.</p>",
      "rawMarkdown": "I've already been there. Since it's a Flax code maybe you can submmit it to the monthly Google prize.",
      "votes": null
    },
    {
      "id": "1787016",
      "postDate": "05/13/2022 14:11:54",
      "content": "<p>This is a really useful model and I'm sure it will be helpful for many people in the competition. Thanks for sharing!</p>",
      "rawMarkdown": "This is a really useful model and I'm sure it will be helpful for many people in the competition. Thanks for sharing!",
      "votes": null
    },
    {
      "id": "1793519",
      "postDate": "05/18/2022 01:47:22",
      "content": "<p>May I ask how the methods of the semantic search route work</p>",
      "rawMarkdown": "May I ask how the methods of the semantic search route work",
      "votes": null
    },
    {
      "id": "1793968",
      "postDate": "05/18/2022 11:43:32",
      "content": "<p>Haven't actively started working on this competition yet. So take this idea with a pinch of salt. </p>\n<p>It does seem like semantic search is a good approach for this. The basic idea is, given a markdown cell content, scan through the code cells to see where it would fit well. It's usually a costly task to train. But with libraries like Faiss/Annoy and Embeddings like the one I shared, should be easy to tackle.</p>\n<p>And there's another discussion with <a href=\"https://www.kaggle.com/sudalairajkumar\" target=\"_blank\">@sudalairajkumar</a> discussing this approach and possible solutions <a href=\"https://www.kaggle.com/competitions/AI4Code/discussion/324509\" target=\"_blank\">here</a></p>",
      "rawMarkdown": "Haven't actively started working on this competition yet. So take this idea with a pinch of salt. \n\nIt does seem like semantic search is a good approach for this. The basic idea is, given a markdown cell content, scan through the code cells to see where it would fit well. It's usually a costly task to train. But with libraries like Faiss/Annoy and Embeddings like the one I shared, should be easy to tackle.\n\nAnd there's another discussion with @sudalairajkumar discussing this approach and possible solutions [here](https://www.kaggle.com/competitions/AI4Code/discussion/324509)",
      "votes": null
    },
    {
      "id": "1811735",
      "postDate": "06/05/2022 04:14:51",
      "content": "<p>Hi,thanks for your sharing.And I tried this method and got a 0.7299 score.But when I want to elevate its performence,I take a fine-tuning with sample of text = [markdown,code(next to the mkd if exists)] and label is cosine similarity of this pair seted as a random float between 0.9 to 1.It's weird that the perform getting so worse that score is 0.5856.Do you have some idea to help me out.By the way,the performence on valid set also getting worse  during the train process.Maybe overfitting just happend?</p>",
      "rawMarkdown": "Hi,thanks for your sharing.And I tried this method and got a 0.7299 score.But when I want to elevate its performence,I take a fine-tuning with sample of text = [markdown,code(next to the mkd if exists)] and label is cosine similarity of this pair seted as a random float between 0.9 to 1.It's weird that the perform getting so worse that score is 0.5856.Do you have some idea to help me out.By the way,the performence on valid set also getting worse  during the train process.Maybe overfitting just happend?",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1786485,
      "author_name": "mpwolke",
      "author_url": "",
      "post_date": "05/13/2022 00:26:48",
      "content": "<p>I've already been there. Since it's a Flax code maybe you can submmit it to the monthly Google prize.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1787016,
      "author_name": "",
      "author_url": "",
      "post_date": "05/13/2022 14:11:54",
      "content": "<p>This is a really useful model and I'm sure it will be helpful for many people in the competition. Thanks for sharing!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1793519,
      "author_name": "clancyli",
      "author_url": "",
      "post_date": "05/18/2022 01:47:22",
      "content": "<p>May I ask how the methods of the semantic search route work</p>",
      "votes": null,
      "replies": [
        {
          "id": 1793968,
          "author_name": "jdoesv",
          "author_url": "",
          "post_date": "05/18/2022 11:43:32",
          "content": "<p>Haven't actively started working on this competition yet. So take this idea with a pinch of salt. </p>\n<p>It does seem like semantic search is a good approach for this. The basic idea is, given a markdown cell content, scan through the code cells to see where it would fit well. It's usually a costly task to train. But with libraries like Faiss/Annoy and Embeddings like the one I shared, should be easy to tackle.</p>\n<p>And there's another discussion with <a href=\"https://www.kaggle.com/sudalairajkumar\" target=\"_blank\">@sudalairajkumar</a> discussing this approach and possible solutions <a href=\"https://www.kaggle.com/competitions/AI4Code/discussion/324509\" target=\"_blank\">here</a></p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1811735,
      "author_name": "clancyli",
      "author_url": "",
      "post_date": "06/05/2022 04:14:51",
      "content": "<p>Hi,thanks for your sharing.And I tried this method and got a 0.7299 score.But when I want to elevate its performence,I take a fine-tuning with sample of text = [markdown,code(next to the mkd if exists)] and label is cosine similarity of this pair seted as a random float between 0.9 to 1.It's weird that the perform getting so worse that score is 0.5856.Do you have some idea to help me out.By the way,the performence on valid set also getting worse  during the train process.Maybe overfitting just happend?</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1785736": "There's an SBERT model that generates code and query vectors in a neutral space trained on [code-search-net](https://paperswithcode.com/dataset/codesearchnet). The model is available [here](https://huggingface.co/flax-sentence-embeddings/st-codesearch-distilroberta-base). Anyone who wants to take the semantic search route in this competition will find it quite useful. Demo usage notebook [here](https://www.kaggle.com/jdoesv/flax-code-embeddings-usage)",
    "1786485": "I've already been there. Since it's a Flax code maybe you can submmit it to the monthly Google prize.",
    "1787016": "This is a really useful model and I'm sure it will be helpful for many people in the competition. Thanks for sharing!",
    "1793519": "May I ask how the methods of the semantic search route work",
    "1793968": "Haven't actively started working on this competition yet. So take this idea with a pinch of salt. \n\nIt does seem like semantic search is a good approach for this. The basic idea is, given a markdown cell content, scan through the code cells to see where it would fit well. It's usually a costly task to train. But with libraries like Faiss/Annoy and Embeddings like the one I shared, should be easy to tackle.\n\nAnd there's another discussion with @sudalairajkumar discussing this approach and possible solutions [here](https://www.kaggle.com/competitions/AI4Code/discussion/324509)",
    "1811735": "Hi,thanks for your sharing.And I tried this method and got a 0.7299 score.But when I want to elevate its performence,I take a fine-tuning with sample of text = [markdown,code(next to the mkd if exists)] and label is cosine similarity of this pair seted as a random float between 0.9 to 1.It's weird that the perform getting so worse that score is 0.5856.Do you have some idea to help me out.By the way,the performence on valid set also getting worse  during the train process.Maybe overfitting just happend?"
  },
  "source": "meta"
}