{
  "id": 56852,
  "title": "Kaggle kernel LightGBM gpu",
  "url": "/competitions/avito-demand-prediction/discussion/56852",
  "author_name": "Rob Wishart",
  "post_date": "2018-05-15T19:39:35.786000",
  "votes": 3,
  "comment_count": 14,
  "views": 0,
  "content": "<p>I have tried using LightGBM on a Kaggle kernel with the gpu beta version set.</p>\n\n<p>The training speed is slightly slower than that of cpu (which I know can often be the case). However, I understand there is a different version of LightGBM that needs to be installed. Does anybody know if this is installed in the default docker or whether it needs to be installed as a custom package, and if so how ?</p>",
  "messages": [
    {
      "id": 477611,
      "postDate": "2019-02-25T01:02:17.663Z",
      "content": "<p>I've made an example of using LightGBM with the Kaggle-provided GPU here:\n<a href=\"https://www.kaggle.com/vinhnguyen/gpu-acceleration-for-lightgbm\">https://www.kaggle.com/vinhnguyen/gpu-acceleration-for-lightgbm</a></p>",
      "rawMarkdown": "I've made an example of using LightGBM with the Kaggle-provided GPU here:\nhttps://www.kaggle.com/vinhnguyen/gpu-acceleration-for-lightgbm",
      "votes": 9
    },
    {
      "id": 329130,
      "postDate": "2018-05-15T19:39:35.787Z",
      "content": "<p>I have tried using LightGBM on a Kaggle kernel with the gpu beta version set.</p>\n\n<p>The training speed is slightly slower than that of cpu (which I know can often be the case). However, I understand there is a different version of LightGBM that needs to be installed. Does anybody know if this is installed in the default docker or whether it needs to be installed as a custom package, and if so how ?</p>",
      "rawMarkdown": "I have tried using LightGBM on a Kaggle kernel with the gpu beta version set.\n\nThe training speed is slightly slower than that of cpu (which I know can often be the case). However, I understand there is a different version of LightGBM that needs to be installed. Does anybody know if this is installed in the default docker or whether it needs to be installed as a custom package, and if so how ?",
      "votes": 3
    },
    {
      "id": 329702,
      "postDate": "2018-05-17T02:26:35.097Z",
      "content": "<p>I've tried many times to install gpu-version on my local machine, fail every time. Do someone has successfully installed on windows platform?</p>",
      "rawMarkdown": "I've tried many times to install gpu-version on my local machine, fail every time. Do someone has successfully installed on windows platform?",
      "votes": 1,
      "replies": [
        {
          "id": 329805,
          "postDate": "2018-05-17T07:42:08.047Z",
          "content": "<p>I don't have an nvidia graphics card on my laptop so I cannot.</p>\n\n<p>I was specifically interested in getting it working on th Kaggle kernel gpu beta.</p>\n\n<p>I have raised a request with Kaggle.</p>",
          "rawMarkdown": "I don't have an nvidia graphics card on my laptop so I cannot.\n\nI was specifically interested in getting it working on th Kaggle kernel gpu beta.\n\n\n\nI have raised a request with Kaggle.\n",
          "votes": 1
        },
        {
          "id": 329807,
          "postDate": "2018-05-17T07:48:12.287Z",
          "content": "<p>Yeah, it should be add a lot of computing resources.</p>",
          "rawMarkdown": "Yeah, it should be add a lot of computing resources."
        },
        {
          "id": 334940,
          "postDate": "2018-05-28T19:18:33.577Z",
          "content": "<p>I did install lightgbm gpu on windows. Realised 2 things - </p>\n\n<ol>\n<li>only the cmake option for install works.</li>\n<li>only works for cuda v9.0 alongwith corresponding cudnn</li>\n</ol>",
          "rawMarkdown": "I did install lightgbm gpu on windows. Realised 2 things - \n\n1. only the cmake option for install works.\n2. only works for cuda v9.0 alongwith corresponding cudnn",
          "votes": 1
        },
        {
          "id": 335380,
          "postDate": "2018-05-29T16:59:58.660Z",
          "content": "<p>Have you tried using <a href=\"https://docs.docker.com/install/\">Docker</a> on your local machine? I've found it invaluable for dealing with GPU related installations and avoiding CUDA version conflicts. Microsoft has provided a complete <a href=\"https://github.com/Microsoft/LightGBM/tree/master/docker/gpu\">lightgbm-GPU image</a>. </p>",
          "rawMarkdown": "Have you tried using [Docker](https://docs.docker.com/install/) on your local machine? I've found it invaluable for dealing with GPU related installations and avoiding CUDA version conflicts. Microsoft has provided a complete [lightgbm-GPU image](https://github.com/Microsoft/LightGBM/tree/master/docker/gpu). "
        },
        {
          "id": 335448,
          "postDate": "2018-05-29T18:40:17.737Z",
          "content": "<p>I was specifically trying to get lightGBM gpu version running on a Kaggle kernel. Does the Kaggle kernel docker use the gpu version of lightGBM or the cpu version ? It would be good if the gpu version were installed so that when I enable gpu beta in settings lightGBM takes advantage of this.</p>",
          "rawMarkdown": "I was specifically trying to get lightGBM gpu version running on a Kaggle kernel. Does the Kaggle kernel docker use the gpu version of lightGBM or the cpu version ? It would be good if the gpu version were installed so that when I enable gpu beta in settings lightGBM takes advantage of this."
        },
        {
          "id": 335469,
          "postDate": "2018-05-29T19:40:49.553Z",
          "content": "<p>Looks like the current version of the kernel does not use the gpu version of lightGBM: <a href=\"https://github.com/Kaggle/docker-python/blob/cuda/Dockerfile#L133\">https://github.com/Kaggle/docker-python/blob/cuda/Dockerfile#L133</a></p>\n\n<p>We welcome PRs to that repo if you would like to fix that.</p>",
          "rawMarkdown": "Looks like the current version of the kernel does not use the gpu version of lightGBM: https://github.com/Kaggle/docker-python/blob/cuda/Dockerfile#L133\n\nWe welcome PRs to that repo if you would like to fix that."
        },
        {
          "id": 335495,
          "postDate": "2018-05-29T20:26:45.457Z",
          "content": "<p>Thanks for the clarification.</p>\n\n<p>I will try to fix it as soon as I can</p>",
          "rawMarkdown": "Thanks for the clarification.\n\nI will try to fix it as soon as I can"
        }
      ]
    },
    {
      "id": 329555,
      "postDate": "2018-05-16T17:54:35.507Z",
      "content": "<p><a href=\"http://lightgbm.readthedocs.io/en/latest/Installation-Guide.html#build-gpu-version\">http://lightgbm.readthedocs.io/en/latest/Installation-Guide.html#build-gpu-version</a> As a rule, the speed is higher, but the quality is lower :)</p>",
      "rawMarkdown": "http://lightgbm.readthedocs.io/en/latest/Installation-Guide.html#build-gpu-version As a rule, the speed is higher, but the quality is lower :)",
      "replies": [
        {
          "id": 329590,
          "postDate": "2018-05-16T19:13:36.407Z",
          "content": "<p>Surely, the quality (accuracy) is the same for gpu as cpu.</p>\n\n<p>gpu is supposed to be several times faster than cpu but I've certainly come across cases where the speed is about the same, presumably because there are other factors.</p>",
          "rawMarkdown": "Surely, the quality (accuracy) is the same for gpu as cpu.\n\ngpu is supposed to be several times faster than cpu but I've certainly come across cases where the speed is about the same, presumably because there are other factors.\n",
          "votes": -1
        },
        {
          "id": 329615,
          "postDate": "2018-05-16T20:09:40.813Z",
          "content": "<p>Accuracy with the GPU is lower due to rounding in the calculations. Decrease is insignificant, but it is.  <a href=\"https://github.com/Microsoft/LightGBM/blob/master/docs/GPU-Performance.rst\">https://github.com/Microsoft/LightGBM/blob/master/docs/GPU-Performance.rst</a> \nTo speed up the work of the algorithm, you should compile it yourself from the sources as described in the link in my previous answer.</p>",
          "rawMarkdown": "Accuracy with the GPU is lower due to rounding in the calculations. Decrease is insignificant, but it is.  https://github.com/Microsoft/LightGBM/blob/master/docs/GPU-Performance.rst \nTo speed up the work of the algorithm, you should compile it yourself from the sources as described in the link in my previous answer."
        },
        {
          "id": 329627,
          "postDate": "2018-05-16T20:31:04.187Z",
          "content": "<p>Are you saying there is a way I can compile the LightGBM(gpu) installation myself within the Kaggle docker ?</p>",
          "rawMarkdown": "Are you saying there is a way I can compile the LightGBM(gpu) installation myself within the Kaggle docker ?"
        }
      ]
    },
    {
      "id": 805663,
      "postDate": "2020-04-12T22:31:58.997Z",
      "content": "<p>Hi, Thanks a lot for your post! I have tried several times installing the GPU but I keep getting this error:   File \"\", line 3\n    cd LightGBM\n              ^\nSyntaxError: invalid syntax</p>\n\n<p>Could you please help out here? Thanks a lot!</p>",
      "rawMarkdown": "Hi, Thanks a lot for your post! I have tried several times installing the GPU but I keep getting this error:   File \"",
      "isDeleted": true
    }
  ],
  "comments": [
    {
      "id": 477611,
      "author_name": "Vinh Nguyen",
      "author_url": "",
      "post_date": "2019-02-25T01:02:17.663000",
      "content": "<p>I've made an example of using LightGBM with the Kaggle-provided GPU here:\n<a href=\"https://www.kaggle.com/vinhnguyen/gpu-acceleration-for-lightgbm\">https://www.kaggle.com/vinhnguyen/gpu-acceleration-for-lightgbm</a></p>",
      "votes": 9,
      "replies": []
    },
    {
      "id": 329702,
      "author_name": "Marcus Lin",
      "author_url": "",
      "post_date": "2018-05-17T02:26:35.097000",
      "content": "<p>I've tried many times to install gpu-version on my local machine, fail every time. Do someone has successfully installed on windows platform?</p>",
      "votes": 1,
      "replies": [
        {
          "id": 329805,
          "author_name": "Rob Wishart",
          "author_url": "",
          "post_date": "2018-05-17T07:42:08.047000",
          "content": "<p>I don't have an nvidia graphics card on my laptop so I cannot.</p>\n\n<p>I was specifically interested in getting it working on th Kaggle kernel gpu beta.</p>\n\n<p>I have raised a request with Kaggle.</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 329807,
          "author_name": "Marcus Lin",
          "author_url": "",
          "post_date": "2018-05-17T07:48:12.287000",
          "content": "<p>Yeah, it should be add a lot of computing resources.</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 334940,
          "author_name": "Abhimanyu Dikshit",
          "author_url": "",
          "post_date": "2018-05-28T19:18:33.577000",
          "content": "<p>I did install lightgbm gpu on windows. Realised 2 things - </p>\n\n<ol>\n<li>only the cmake option for install works.</li>\n<li>only works for cuda v9.0 alongwith corresponding cudnn</li>\n</ol>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 335380,
          "author_name": "Sohier Dane",
          "author_url": "",
          "post_date": "2018-05-29T16:59:58.660000",
          "content": "<p>Have you tried using <a href=\"https://docs.docker.com/install/\">Docker</a> on your local machine? I've found it invaluable for dealing with GPU related installations and avoiding CUDA version conflicts. Microsoft has provided a complete <a href=\"https://github.com/Microsoft/LightGBM/tree/master/docker/gpu\">lightgbm-GPU image</a>. </p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 335448,
          "author_name": "Rob Wishart",
          "author_url": "",
          "post_date": "2018-05-29T18:40:17.737000",
          "content": "<p>I was specifically trying to get lightGBM gpu version running on a Kaggle kernel. Does the Kaggle kernel docker use the gpu version of lightGBM or the cpu version ? It would be good if the gpu version were installed so that when I enable gpu beta in settings lightGBM takes advantage of this.</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 335469,
          "author_name": "Sohier Dane",
          "author_url": "",
          "post_date": "2018-05-29T19:40:49.553000",
          "content": "<p>Looks like the current version of the kernel does not use the gpu version of lightGBM: <a href=\"https://github.com/Kaggle/docker-python/blob/cuda/Dockerfile#L133\">https://github.com/Kaggle/docker-python/blob/cuda/Dockerfile#L133</a></p>\n\n<p>We welcome PRs to that repo if you would like to fix that.</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 335495,
          "author_name": "Rob Wishart",
          "author_url": "",
          "post_date": "2018-05-29T20:26:45.457000",
          "content": "<p>Thanks for the clarification.</p>\n\n<p>I will try to fix it as soon as I can</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 329555,
      "author_name": "Taras Baranyuk",
      "author_url": "",
      "post_date": "2018-05-16T17:54:35.507000",
      "content": "<p><a href=\"http://lightgbm.readthedocs.io/en/latest/Installation-Guide.html#build-gpu-version\">http://lightgbm.readthedocs.io/en/latest/Installation-Guide.html#build-gpu-version</a> As a rule, the speed is higher, but the quality is lower :)</p>",
      "votes": 0,
      "replies": [
        {
          "id": 329590,
          "author_name": "Rob Wishart",
          "author_url": "",
          "post_date": "2018-05-16T19:13:36.407000",
          "content": "<p>Surely, the quality (accuracy) is the same for gpu as cpu.</p>\n\n<p>gpu is supposed to be several times faster than cpu but I've certainly come across cases where the speed is about the same, presumably because there are other factors.</p>",
          "votes": -1,
          "replies": []
        },
        {
          "id": 329615,
          "author_name": "Taras Baranyuk",
          "author_url": "",
          "post_date": "2018-05-16T20:09:40.813000",
          "content": "<p>Accuracy with the GPU is lower due to rounding in the calculations. Decrease is insignificant, but it is.  <a href=\"https://github.com/Microsoft/LightGBM/blob/master/docs/GPU-Performance.rst\">https://github.com/Microsoft/LightGBM/blob/master/docs/GPU-Performance.rst</a> \nTo speed up the work of the algorithm, you should compile it yourself from the sources as described in the link in my previous answer.</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 329627,
          "author_name": "Rob Wishart",
          "author_url": "",
          "post_date": "2018-05-16T20:31:04.187000",
          "content": "<p>Are you saying there is a way I can compile the LightGBM(gpu) installation myself within the Kaggle docker ?</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 805663,
      "author_name": "",
      "author_url": "",
      "post_date": "2020-04-12T22:31:58.997000",
      "content": "<p>Hi, Thanks a lot for your post! I have tried several times installing the GPU but I keep getting this error:   File \"\", line 3\n    cd LightGBM\n              ^\nSyntaxError: invalid syntax</p>\n\n<p>Could you please help out here? Thanks a lot!</p>",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "477611": "I've made an example of using LightGBM with the Kaggle-provided GPU here:\nhttps://www.kaggle.com/vinhnguyen/gpu-acceleration-for-lightgbm",
    "329130": "I have tried using LightGBM on a Kaggle kernel with the gpu beta version set.\n\nThe training speed is slightly slower than that of cpu (which I know can often be the case). However, I understand there is a different version of LightGBM that needs to be installed. Does anybody know if this is installed in the default docker or whether it needs to be installed as a custom package, and if so how ?",
    "329702": "I've tried many times to install gpu-version on my local machine, fail every time. Do someone has successfully installed on windows platform?",
    "329555": "http://lightgbm.readthedocs.io/en/latest/Installation-Guide.html#build-gpu-version As a rule, the speed is higher, but the quality is lower :)",
    "805663": "Hi, Thanks a lot for your post! I have tried several times installing the GPU but I keep getting this error:   File \""
  }
}