{
  "id": 546651,
  "title": "XGBoost training time too long",
  "url": "/competitions/brist1d/discussion/546651",
  "author_name": "",
  "post_date": "2024-11-17T04:35:50.360703100Z",
  "votes": 1,
  "comment_count": 1,
  "views": 0,
  "content": "<p>I have recently tried to use XGBoost for this competition.<br>\nHowever, it seems to take forever for a simple training (without any hyperparameter optimization).<br>\nI tried to convert the data to Cudf/Cupy, and tried to turn on GPU training mode for XGBoost (tree_method = 'gpu_hist'), but it didn't help. In fact, the GPU still didn't get involved in the training (I did turn on GPU P100 on Kaggle though).</p>\n<p>Could you please help me to take a look and see what is the problem in my code?</p>\n<p>Here is my notebook:<br>\n<a href=\"https://www.kaggle.com/code/victorvmd/brist1d-blood-glucose-prediction-xgboost\" target=\"_blank\">https://www.kaggle.com/code/victorvmd/brist1d-blood-glucose-prediction-xgboost</a></p>\n<p>Thank you!</p>",
  "messages": [
    {
      "id": "3047703",
      "postDate": "11/17/2024 04:35:50",
      "content": "<p>I have recently tried to use XGBoost for this competition.<br>\nHowever, it seems to take forever for a simple training (without any hyperparameter optimization).<br>\nI tried to convert the data to Cudf/Cupy, and tried to turn on GPU training mode for XGBoost (tree_method = 'gpu_hist'), but it didn't help. In fact, the GPU still didn't get involved in the training (I did turn on GPU P100 on Kaggle though).</p>\n<p>Could you please help me to take a look and see what is the problem in my code?</p>\n<p>Here is my notebook:<br>\n<a href=\"https://www.kaggle.com/code/victorvmd/brist1d-blood-glucose-prediction-xgboost\" target=\"_blank\">https://www.kaggle.com/code/victorvmd/brist1d-blood-glucose-prediction-xgboost</a></p>\n<p>Thank you!</p>",
      "rawMarkdown": "I have recently tried to use XGBoost for this competition.\nHowever, it seems to take forever for a simple training (without any hyperparameter optimization).\nI tried to convert the data to Cudf/Cupy, and tried to turn on GPU training mode for XGBoost (tree_method = 'gpu_hist'), but it didn't help. In fact, the GPU still didn't get involved in the training (I did turn on GPU P100 on Kaggle though).\n\nCould you please help me to take a look and see what is the problem in my code?\n\nHere is my notebook:\nhttps://www.kaggle.com/code/victorvmd/brist1d-blood-glucose-prediction-xgboost\n\nThank you!",
      "votes": null
    },
    {
      "id": "3047723",
      "postDate": "11/17/2024 05:38:58",
      "content": "<p><a href=\"https://www.kaggle.com/victorvmd\" target=\"_blank\">@victorvmd</a> this is a pretty big dataset, so training time will be long. <br>\nMy starter kernel <a href=\"https://www.kaggle.com/code/ravi20076/brist1d-baseline-v1\" target=\"_blank\">here</a> took 1 hour 20 minutes to execute as well. </p>\n<p><strong>Suggestion</strong> - <br>\nfrom xgboost==2.0.0 onwards, one may opt to put in the below parameters-</p>\n<pre><code> = , \n = ,\n</code></pre>\n<p>Please refer the documentation page here for details - <a href=\"https://xgboost.readthedocs.io/en/stable/parameter.html\" target=\"_blank\">link</a></p>\n<p>You may also choose to use the latest version of xgboost, it has speed enhancement over the older version on Kaggle base environment. You can install it as -</p>\n<pre><code>!pip install -q ==2.1.2 --force-reinstall\n</code></pre>",
      "rawMarkdown": "victorvmd this is a pretty big dataset, so training time will be long. \nMy starter kernel [here](https://www.kaggle.com/code/ravi20076/brist1d-baseline-v1) took 1 hour 20 minutes to execute as well. \n\n**Suggestion** - \nfrom xgboost==2.0.0 onwards, one may opt to put in the below parameters-\n```\ndevice = 'cuda', \ntree_method = 'hist',\n```\n\nPlease refer the documentation page here for details - [link](https://xgboost.readthedocs.io/en/stable/parameter.html)\n\nYou may also choose to use the latest version of xgboost, it has speed enhancement over the older version on Kaggle base environment. You can install it as -\n```\n!pip install -q xgboost==2.1.2 --force-reinstall\n```",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 3047723,
      "author_name": "ravi20076",
      "author_url": "",
      "post_date": "11/17/2024 05:38:58",
      "content": "<p><a href=\"https://www.kaggle.com/victorvmd\" target=\"_blank\">@victorvmd</a> this is a pretty big dataset, so training time will be long. <br>\nMy starter kernel <a href=\"https://www.kaggle.com/code/ravi20076/brist1d-baseline-v1\" target=\"_blank\">here</a> took 1 hour 20 minutes to execute as well. </p>\n<p><strong>Suggestion</strong> - <br>\nfrom xgboost==2.0.0 onwards, one may opt to put in the below parameters-</p>\n<pre><code> = , \n = ,\n</code></pre>\n<p>Please refer the documentation page here for details - <a href=\"https://xgboost.readthedocs.io/en/stable/parameter.html\" target=\"_blank\">link</a></p>\n<p>You may also choose to use the latest version of xgboost, it has speed enhancement over the older version on Kaggle base environment. You can install it as -</p>\n<pre><code>!pip install -q ==2.1.2 --force-reinstall\n</code></pre>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "3047703": "I have recently tried to use XGBoost for this competition.\nHowever, it seems to take forever for a simple training (without any hyperparameter optimization).\nI tried to convert the data to Cudf/Cupy, and tried to turn on GPU training mode for XGBoost (tree_method = 'gpu_hist'), but it didn't help. In fact, the GPU still didn't get involved in the training (I did turn on GPU P100 on Kaggle though).\n\nCould you please help me to take a look and see what is the problem in my code?\n\nHere is my notebook:\nhttps://www.kaggle.com/code/victorvmd/brist1d-blood-glucose-prediction-xgboost\n\nThank you!",
    "3047723": "victorvmd this is a pretty big dataset, so training time will be long. \nMy starter kernel [here](https://www.kaggle.com/code/ravi20076/brist1d-baseline-v1) took 1 hour 20 minutes to execute as well. \n\n**Suggestion** - \nfrom xgboost==2.0.0 onwards, one may opt to put in the below parameters-\n```\ndevice = 'cuda', \ntree_method = 'hist',\n```\n\nPlease refer the documentation page here for details - [link](https://xgboost.readthedocs.io/en/stable/parameter.html)\n\nYou may also choose to use the latest version of xgboost, it has speed enhancement over the older version on Kaggle base environment. You can install it as -\n```\n!pip install -q xgboost==2.1.2 --force-reinstall\n```"
  },
  "source": "meta"
}