{
  "id": 114614,
  "title": "Speed up LightGBM",
  "url": "/competitions/ashrae-energy-prediction/discussion/114614",
  "author_name": "",
  "post_date": "2019-10-28T01:01:37.406394500Z",
  "votes": 12,
  "comment_count": 2,
  "views": 0,
  "content": "<p>As I stated in this discussion: <a href=\"https://www.kaggle.com/product-feedback/109468\">Extremely low performance of LGBMClassifier</a>, LightGBM is very slow with version 1.16.4 of numpy, that is the version installed in the current Python Docker Images.</p>\n\n<p>The solution is to install the last numpy version:</p>\n\n<p>For notebook <a href=\"https://www.kaggle.com/juanmah/ashrae-update-numpy-notebook\">ASHRAE - Update NumPy. Notebook</a>:</p>\n\n<p><code>python\n!pip install --upgrade numpy==1.17.3\nimport numpy as np\n</code></p>\n\n<p>For script <a href=\"https://www.kaggle.com/juanmah/ashrae-update-numpy-script\">ASHRAE - Update NumPy. Script</a>:</p>\n\n<p><code>python\nimport subprocess\nsubprocess.check_call([\"python\", '-m', 'pip', 'install',\"--upgrade\", 'numpy==1.17.3'])\nimport numpy as np\n</code></p>\n\n<p>And don't forget to enable internet in the notebook:</p>\n\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F645169%2Fb5ca81ed53e0444b7f8cfd63ef489cf1%2FOpera%20Instantnia_2019-10-09_204612_www.kaggle.com.png?generation=1570646825470451&amp;alt=media\" alt=\"\"></p>",
  "messages": [
    {
      "id": "659602",
      "postDate": "10/28/2019 01:01:37",
      "content": "<p>As I stated in this discussion: <a href=\"https://www.kaggle.com/product-feedback/109468\">Extremely low performance of LGBMClassifier</a>, LightGBM is very slow with version 1.16.4 of numpy, that is the version installed in the current Python Docker Images.</p>\n\n<p>The solution is to install the last numpy version:</p>\n\n<p>For notebook <a href=\"https://www.kaggle.com/juanmah/ashrae-update-numpy-notebook\">ASHRAE - Update NumPy. Notebook</a>:</p>\n\n<p><code>python\n!pip install --upgrade numpy==1.17.3\nimport numpy as np\n</code></p>\n\n<p>For script <a href=\"https://www.kaggle.com/juanmah/ashrae-update-numpy-script\">ASHRAE - Update NumPy. Script</a>:</p>\n\n<p><code>python\nimport subprocess\nsubprocess.check_call([\"python\", '-m', 'pip', 'install',\"--upgrade\", 'numpy==1.17.3'])\nimport numpy as np\n</code></p>\n\n<p>And don't forget to enable internet in the notebook:</p>\n\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F645169%2Fb5ca81ed53e0444b7f8cfd63ef489cf1%2FOpera%20Instantnia_2019-10-09_204612_www.kaggle.com.png?generation=1570646825470451&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "As I stated in this discussion: [Extremely low performance of LGBMClassifier](https://www.kaggle.com/product-feedback/109468), LightGBM is very slow with version 1.16.4 of numpy, that is the version installed in the current Python Docker Images.\n\nThe solution is to install the last numpy version:\n\nFor notebook [ASHRAE - Update NumPy. Notebook](https://www.kaggle.com/juanmah/ashrae-update-numpy-notebook):\n\n``` python\n!pip install --upgrade numpy==1.17.3\nimport numpy as np\n```\n\nFor script [ASHRAE - Update NumPy. Script](https://www.kaggle.com/juanmah/ashrae-update-numpy-script):\n\n``` python\nimport subprocess\nsubprocess.check_call([\"python\", '-m', 'pip', 'install',\"--upgrade\", 'numpy==1.17.3'])\nimport numpy as np\n```\n\nAnd don't forget to enable internet in the notebook:\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F645169%2Fb5ca81ed53e0444b7f8cfd63ef489cf1%2FOpera%20Instantnia_2019-10-09_204612_www.kaggle.com.png?generation=1570646825470451&amp;alt=media)",
      "votes": null
    },
    {
      "id": "660158",
      "postDate": "10/28/2019 19:14:50",
      "content": "<p>For unknown reason, I am unable to install numpy 1.17.3. Any idea why ? <br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F2075243%2Fe3c377fd1df5a641c3528edda5086b39%2Fnumpy_version.PNG?generation=1572289975251867&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "For unknown reason, I am unable to install numpy 1.17.3. Any idea why ?  \n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F2075243%2Fe3c377fd1df5a641c3528edda5086b39%2Fnumpy_version.PNG?generation=1572289975251867&amp;alt=media)",
      "votes": null
    },
    {
      "id": "660171",
      "postDate": "10/28/2019 20:04:58",
      "content": "<p>I don't know why is showing the current numpy version, instead of the installed numpy. But the numpy installed is working good with LightGBM.</p>\n\n<p>And what work in runtime, could not work when committing. Or vice versa, the numpy version is the correct one when committing.</p>",
      "rawMarkdown": "I don't know why is showing the current numpy version, instead of the installed numpy. But the numpy installed is working good with LightGBM.\n\nAnd what work in runtime, could not work when committing. Or vice versa, the numpy version is the correct one when committing.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 660158,
      "author_name": "sdelecourt",
      "author_url": "",
      "post_date": "10/28/2019 19:14:50",
      "content": "<p>For unknown reason, I am unable to install numpy 1.17.3. Any idea why ? <br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F2075243%2Fe3c377fd1df5a641c3528edda5086b39%2Fnumpy_version.PNG?generation=1572289975251867&amp;alt=media\" alt=\"\"></p>",
      "votes": null,
      "replies": [
        {
          "id": 660171,
          "author_name": "juanmah",
          "author_url": "",
          "post_date": "10/28/2019 20:04:58",
          "content": "<p>I don't know why is showing the current numpy version, instead of the installed numpy. But the numpy installed is working good with LightGBM.</p>\n\n<p>And what work in runtime, could not work when committing. Or vice versa, the numpy version is the correct one when committing.</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "659602": "As I stated in this discussion: [Extremely low performance of LGBMClassifier](https://www.kaggle.com/product-feedback/109468), LightGBM is very slow with version 1.16.4 of numpy, that is the version installed in the current Python Docker Images.\n\nThe solution is to install the last numpy version:\n\nFor notebook [ASHRAE - Update NumPy. Notebook](https://www.kaggle.com/juanmah/ashrae-update-numpy-notebook):\n\n``` python\n!pip install --upgrade numpy==1.17.3\nimport numpy as np\n```\n\nFor script [ASHRAE - Update NumPy. Script](https://www.kaggle.com/juanmah/ashrae-update-numpy-script):\n\n``` python\nimport subprocess\nsubprocess.check_call([\"python\", '-m', 'pip', 'install',\"--upgrade\", 'numpy==1.17.3'])\nimport numpy as np\n```\n\nAnd don't forget to enable internet in the notebook:\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F645169%2Fb5ca81ed53e0444b7f8cfd63ef489cf1%2FOpera%20Instantnia_2019-10-09_204612_www.kaggle.com.png?generation=1570646825470451&amp;alt=media)",
    "660158": "For unknown reason, I am unable to install numpy 1.17.3. Any idea why ?  \n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F2075243%2Fe3c377fd1df5a641c3528edda5086b39%2Fnumpy_version.PNG?generation=1572289975251867&amp;alt=media)",
    "660171": "I don't know why is showing the current numpy version, instead of the installed numpy. But the numpy installed is working good with LightGBM.\n\nAnd what work in runtime, could not work when committing. Or vice versa, the numpy version is the correct one when committing."
  },
  "source": "meta"
}