{
  "id": 236722,
  "title": "Spacy model loading Problem",
  "url": "/competitions/coleridgeinitiative-show-us-the-data/discussion/236722",
  "author_name": "",
  "post_date": "2021-05-05T14:33:27.168452800Z",
  "votes": 5,
  "comment_count": 5,
  "views": 0,
  "content": "<p>Hi. I trained a model in spacy v3 in my local computer and tried to load it in the kaggle kernel . Unfortunately, the version of spacy in Kaggle kernel is 2.3 which is not supported to load a model trained from spacy version 3. </p>\n<p>Since the submission notebook cannot have network access. Is it possible upgrade the version without network? or any advice or solution to load the model is appreciated.</p>\n<p>Thanks for the help.</p>",
  "messages": [
    {
      "id": "1294292",
      "postDate": "05/05/2021 14:33:27",
      "content": "<p>Hi. I trained a model in spacy v3 in my local computer and tried to load it in the kaggle kernel . Unfortunately, the version of spacy in Kaggle kernel is 2.3 which is not supported to load a model trained from spacy version 3. </p>\n<p>Since the submission notebook cannot have network access. Is it possible upgrade the version without network? or any advice or solution to load the model is appreciated.</p>\n<p>Thanks for the help.</p>",
      "rawMarkdown": "Hi. I trained a model in spacy v3 in my local computer and tried to load it in the kaggle kernel . Unfortunately, the version of spacy in Kaggle kernel is 2.3 which is not supported to load a model trained from spacy version 3. \n\nSince the submission notebook cannot have network access. Is it possible upgrade the version without network? or any advice or solution to load the model is appreciated.\n\nThanks for the help.",
      "votes": null
    },
    {
      "id": "1294308",
      "postDate": "05/05/2021 14:42:29",
      "content": "<p>I haven't tried it myself, but this notebook may help: </p>\n<p><a href=\"https://www.kaggle.com/samuelepino/pip-installing-packages-with-no-internet\" target=\"_blank\">https://www.kaggle.com/samuelepino/pip-installing-packages-with-no-internet</a></p>",
      "rawMarkdown": "I haven't tried it myself, but this notebook may help: \n\nhttps://www.kaggle.com/samuelepino/pip-installing-packages-with-no-internet",
      "votes": null
    },
    {
      "id": "1294339",
      "postDate": "05/05/2021 15:04:10",
      "content": "<p>Thank for the prompt reply. Will definitely try that. </p>",
      "rawMarkdown": "Thank for the prompt reply. Will definitely try that.",
      "votes": null
    },
    {
      "id": "1300236",
      "postDate": "05/10/2021 10:54:16",
      "content": "<p>Try this: <a href=\"https://www.kaggle.com/brotye/spacy-3-0-example\" target=\"_blank\">https://www.kaggle.com/brotye/spacy-3-0-example</a></p>\n<p>Normally, spacy 3.0 should come soon as fastai used to be the blocker to the upgrade to 3.0 (similarly why torch is still stuck on 1.7 on kaggle kernels) but it was recently updated with both torch 1.8 and spacy 3.0 support so it's just a matter of time as to when new spacy is released in kernels. (<a href=\"https://github.com/Kaggle/docker-python/issues/986\" target=\"_blank\">https://github.com/Kaggle/docker-python/issues/986</a>)</p>",
      "rawMarkdown": "Try this: https://www.kaggle.com/brotye/spacy-3-0-example\n\nNormally, spacy 3.0 should come soon as fastai used to be the blocker to the upgrade to 3.0 (similarly why torch is still stuck on 1.7 on kaggle kernels) but it was recently updated with both torch 1.8 and spacy 3.0 support so it's just a matter of time as to when new spacy is released in kernels. (https://github.com/Kaggle/docker-python/issues/986)",
      "votes": null
    },
    {
      "id": "1304241",
      "postDate": "05/12/2021 14:00:16",
      "content": "<p>i see. Thank you for your reply.</p>",
      "rawMarkdown": "i see. Thank you for your reply.",
      "votes": null
    },
    {
      "id": "1309401",
      "postDate": "05/15/2021 22:50:46",
      "content": "<p>I confirm that this works with one change of <code>pip wheel</code> for me (otherwise download fails)<br>\n<a href=\"https://www.kaggle.com/product-feedback/231197\" target=\"_blank\">https://www.kaggle.com/product-feedback/231197</a></p>\n<p>However, spaCy trf models consume a lot of time per sentence (~2s) with gpu and do not support multiprocessing. It was kind of a time waste. </p>",
      "rawMarkdown": "I confirm that this works with one change of `pip wheel` for me (otherwise download fails)\nhttps://www.kaggle.com/product-feedback/231197\n\nHowever, spaCy trf models consume a lot of time per sentence (~2s) with gpu and do not support multiprocessing. It was kind of a time waste.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1294308,
      "author_name": "hannes82",
      "author_url": "",
      "post_date": "05/05/2021 14:42:29",
      "content": "<p>I haven't tried it myself, but this notebook may help: </p>\n<p><a href=\"https://www.kaggle.com/samuelepino/pip-installing-packages-with-no-internet\" target=\"_blank\">https://www.kaggle.com/samuelepino/pip-installing-packages-with-no-internet</a></p>",
      "votes": null,
      "replies": [
        {
          "id": 1294339,
          "author_name": "harip98",
          "author_url": "",
          "post_date": "05/05/2021 15:04:10",
          "content": "<p>Thank for the prompt reply. Will definitely try that. </p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1309401,
          "author_name": "shivammiglani",
          "author_url": "",
          "post_date": "05/15/2021 22:50:46",
          "content": "<p>I confirm that this works with one change of <code>pip wheel</code> for me (otherwise download fails)<br>\n<a href=\"https://www.kaggle.com/product-feedback/231197\" target=\"_blank\">https://www.kaggle.com/product-feedback/231197</a></p>\n<p>However, spaCy trf models consume a lot of time per sentence (~2s) with gpu and do not support multiprocessing. It was kind of a time waste. </p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1300236,
      "author_name": "brotye",
      "author_url": "",
      "post_date": "05/10/2021 10:54:16",
      "content": "<p>Try this: <a href=\"https://www.kaggle.com/brotye/spacy-3-0-example\" target=\"_blank\">https://www.kaggle.com/brotye/spacy-3-0-example</a></p>\n<p>Normally, spacy 3.0 should come soon as fastai used to be the blocker to the upgrade to 3.0 (similarly why torch is still stuck on 1.7 on kaggle kernels) but it was recently updated with both torch 1.8 and spacy 3.0 support so it's just a matter of time as to when new spacy is released in kernels. (<a href=\"https://github.com/Kaggle/docker-python/issues/986\" target=\"_blank\">https://github.com/Kaggle/docker-python/issues/986</a>)</p>",
      "votes": null,
      "replies": [
        {
          "id": 1304241,
          "author_name": "harip98",
          "author_url": "",
          "post_date": "05/12/2021 14:00:16",
          "content": "<p>i see. Thank you for your reply.</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1294292": "Hi. I trained a model in spacy v3 in my local computer and tried to load it in the kaggle kernel . Unfortunately, the version of spacy in Kaggle kernel is 2.3 which is not supported to load a model trained from spacy version 3. \n\nSince the submission notebook cannot have network access. Is it possible upgrade the version without network? or any advice or solution to load the model is appreciated.\n\nThanks for the help.",
    "1294308": "I haven't tried it myself, but this notebook may help: \n\nhttps://www.kaggle.com/samuelepino/pip-installing-packages-with-no-internet",
    "1294339": "Thank for the prompt reply. Will definitely try that.",
    "1300236": "Try this: https://www.kaggle.com/brotye/spacy-3-0-example\n\nNormally, spacy 3.0 should come soon as fastai used to be the blocker to the upgrade to 3.0 (similarly why torch is still stuck on 1.7 on kaggle kernels) but it was recently updated with both torch 1.8 and spacy 3.0 support so it's just a matter of time as to when new spacy is released in kernels. (https://github.com/Kaggle/docker-python/issues/986)",
    "1304241": "i see. Thank you for your reply.",
    "1309401": "I confirm that this works with one change of `pip wheel` for me (otherwise download fails)\nhttps://www.kaggle.com/product-feedback/231197\n\nHowever, spaCy trf models consume a lot of time per sentence (~2s) with gpu and do not support multiprocessing. It was kind of a time waste."
  },
  "source": "meta"
}