{
  "id": 543570,
  "title": "2 lines to speed up your notebook",
  "url": "/competitions/jane-street-real-time-market-data-forecasting/discussion/543570",
  "author_name": "",
  "post_date": "2024-10-31T10:22:48.157990200Z",
  "votes": 9,
  "comment_count": 4,
  "views": 0,
  "content": "<p>Source:<a href=\"https://www.kaggle.com/code/napetrov/pss3e23-fusion-model-with-scikit-learn-intelex/notebook\">pss3e23 fusion model with scikit learn intelex</a></p>\n<pre><code> sklearnex  patch_sklearn\npatch_sklearn()\n</code></pre>",
  "messages": [
    {
      "id": "3032749",
      "postDate": "10/31/2024 10:22:48",
      "content": "<p>Source:<a href=\"https://www.kaggle.com/code/napetrov/pss3e23-fusion-model-with-scikit-learn-intelex/notebook\">pss3e23 fusion model with scikit learn intelex</a></p>\n<pre><code> sklearnex  patch_sklearn\npatch_sklearn()\n</code></pre>",
      "rawMarkdown": "Source:<a href=\"https://www.kaggle.com/code/napetrov/pss3e23-fusion-model-with-scikit-learn-intelex/notebook\">pss3e23 fusion model with scikit learn intelex</a>\n```python\nfrom sklearnex import patch_sklearn\npatch_sklearn()\n```",
      "votes": null
    },
    {
      "id": "3032825",
      "postDate": "10/31/2024 12:41:54",
      "content": "<p>To mention that it optimizes and accelerates sklearn on Intel platforms and we have to import scikit-learn after these lines. Otherwise, the patching will not affect the original scikit-learn estimators.</p>",
      "rawMarkdown": "To mention that it optimizes and accelerates sklearn on Intel platforms and we have to import scikit-learn after these lines. Otherwise, the patching will not affect the original scikit-learn estimators.",
      "votes": null
    },
    {
      "id": "3032989",
      "postDate": "10/31/2024 16:52:43",
      "content": "<p>Thanks for the tip! I was not familiar with this option.<br>\nCan you explain a bit about what exactly does it do? And how it speeds up the notebook?</p>",
      "rawMarkdown": "Thanks for the tip! I was not familiar with this option.\nCan you explain a bit about what exactly does it do? And how it speeds up the notebook?",
      "votes": null
    },
    {
      "id": "3033044",
      "postDate": "10/31/2024 17:50:09",
      "content": "<p>How it improving the speed?</p>",
      "rawMarkdown": "How it improving the speed?",
      "votes": null
    },
    {
      "id": "3048520",
      "postDate": "11/18/2024 04:07:42",
      "content": "<p>Thanks for sharing! I trained a Ridge model with sklearnex, and it sped up training. However, during inference, I encountered:<br>\n<code>\nINFO:sklearnex: sklearn.linear_model.Ridge.predict: fallback to original Scikit-learn\n</code><br>\nDoes this happen on your side as well?</p>",
      "rawMarkdown": "Thanks for sharing! I trained a Ridge model with sklearnex, and it sped up training. However, during inference, I encountered:\n`\nINFO:sklearnex: sklearn.linear_model.Ridge.predict: fallback to original Scikit-learn\n`\nDoes this happen on your side as well?",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 3032825,
      "author_name": "eu1234",
      "author_url": "",
      "post_date": "10/31/2024 12:41:54",
      "content": "<p>To mention that it optimizes and accelerates sklearn on Intel platforms and we have to import scikit-learn after these lines. Otherwise, the patching will not affect the original scikit-learn estimators.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 3032989,
      "author_name": "dinezra11",
      "author_url": "",
      "post_date": "10/31/2024 16:52:43",
      "content": "<p>Thanks for the tip! I was not familiar with this option.<br>\nCan you explain a bit about what exactly does it do? And how it speeds up the notebook?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 3033044,
      "author_name": "farhankardan",
      "author_url": "",
      "post_date": "10/31/2024 17:50:09",
      "content": "<p>How it improving the speed?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 3048520,
      "author_name": "maaax",
      "author_url": "",
      "post_date": "11/18/2024 04:07:42",
      "content": "<p>Thanks for sharing! I trained a Ridge model with sklearnex, and it sped up training. However, during inference, I encountered:<br>\n<code>\nINFO:sklearnex: sklearn.linear_model.Ridge.predict: fallback to original Scikit-learn\n</code><br>\nDoes this happen on your side as well?</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "3032749": "Source:<a href=\"https://www.kaggle.com/code/napetrov/pss3e23-fusion-model-with-scikit-learn-intelex/notebook\">pss3e23 fusion model with scikit learn intelex</a>\n```python\nfrom sklearnex import patch_sklearn\npatch_sklearn()\n```",
    "3032825": "To mention that it optimizes and accelerates sklearn on Intel platforms and we have to import scikit-learn after these lines. Otherwise, the patching will not affect the original scikit-learn estimators.",
    "3032989": "Thanks for the tip! I was not familiar with this option.\nCan you explain a bit about what exactly does it do? And how it speeds up the notebook?",
    "3033044": "How it improving the speed?",
    "3048520": "Thanks for sharing! I trained a Ridge model with sklearnex, and it sped up training. However, during inference, I encountered:\n`\nINFO:sklearnex: sklearn.linear_model.Ridge.predict: fallback to original Scikit-learn\n`\nDoes this happen on your side as well?"
  },
  "source": "meta"
}