{
  "id": 573090,
  "title": "Unable to Train with HuggingFace Trainer class",
  "url": "/competitions/byu-locating-bacterial-flagellar-motors-2025/discussion/573090",
  "author_name": "",
  "post_date": "2025-04-13T13:01:44.561809Z",
  "votes": -1,
  "comment_count": 3,
  "views": 0,
  "content": "<p>Hi all!</p>\n<p>I'm trying to use huggingface Trainer class to train my model. However, calling trainer.train() does nothing. It throws no error and the cell just keeps executing. I can see that the GPU utilization stays at 0% even though the GPU RAM consumption is around 1.3 GB which probably means the model and data is mounted on the GPU. I switched from P100 to T4 but the problem still persists.</p>\n<p>Is anyone else facing similar issues? Or has resolved this somehow…</p>\n<p>Thanks!</p>",
  "messages": [
    {
      "id": "3177920",
      "postDate": "04/13/2025 13:01:44",
      "content": "<p>Hi all!</p>\n<p>I'm trying to use huggingface Trainer class to train my model. However, calling trainer.train() does nothing. It throws no error and the cell just keeps executing. I can see that the GPU utilization stays at 0% even though the GPU RAM consumption is around 1.3 GB which probably means the model and data is mounted on the GPU. I switched from P100 to T4 but the problem still persists.</p>\n<p>Is anyone else facing similar issues? Or has resolved this somehow…</p>\n<p>Thanks!</p>",
      "rawMarkdown": "Hi all!\n\nI'm trying to use huggingface Trainer class to train my model. However, calling trainer.train() does nothing. It throws no error and the cell just keeps executing. I can see that the GPU utilization stays at 0% even though the GPU RAM consumption is around 1.3 GB which probably means the model and data is mounted on the GPU. I switched from P100 to T4 but the problem still persists.\n\nIs anyone else facing similar issues? Or has resolved this somehow...\n\nThanks!",
      "votes": null
    },
    {
      "id": "3179092",
      "postDate": "04/15/2025 03:10:02",
      "content": "<p>Can you post a code snippet?  We cannot debug without seeing your code</p>",
      "rawMarkdown": "Can you post a code snippet?  We cannot debug without seeing your code",
      "votes": null
    },
    {
      "id": "3179232",
      "postDate": "04/15/2025 07:55:51",
      "content": "<p>Most likely you have a problem with data loading. The trainer is hung and nothing is displayed due to the settings of the environment. Run the code in the local environment. There, most likely errors will begin to be displayed. Or try to somehow configure the data display.</p>",
      "rawMarkdown": "Most likely you have a problem with data loading. The trainer is hung and nothing is displayed due to the settings of the environment. Run the code in the local environment. There, most likely errors will begin to be displayed. Or try to somehow configure the data display.",
      "votes": null
    },
    {
      "id": "3179272",
      "postDate": "04/15/2025 08:43:17",
      "content": "<p>So I tried running the notebook again today having made no changes and it ran. It also displayed an error first which upon correction trained the entire model smoothly. Not sure why the notebook refused to throw any errors earlier….</p>",
      "rawMarkdown": "So I tried running the notebook again today having made no changes and it ran. It also displayed an error first which upon correction trained the entire model smoothly. Not sure why the notebook refused to throw any errors earlier....",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 3179092,
      "author_name": "connorjd",
      "author_url": "",
      "post_date": "04/15/2025 03:10:02",
      "content": "<p>Can you post a code snippet?  We cannot debug without seeing your code</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 3179232,
      "author_name": "zaakciiru",
      "author_url": "",
      "post_date": "04/15/2025 07:55:51",
      "content": "<p>Most likely you have a problem with data loading. The trainer is hung and nothing is displayed due to the settings of the environment. Run the code in the local environment. There, most likely errors will begin to be displayed. Or try to somehow configure the data display.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 3179272,
      "author_name": "agneyabhardwaj",
      "author_url": "",
      "post_date": "04/15/2025 08:43:17",
      "content": "<p>So I tried running the notebook again today having made no changes and it ran. It also displayed an error first which upon correction trained the entire model smoothly. Not sure why the notebook refused to throw any errors earlier….</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "3177920": "Hi all!\n\nI'm trying to use huggingface Trainer class to train my model. However, calling trainer.train() does nothing. It throws no error and the cell just keeps executing. I can see that the GPU utilization stays at 0% even though the GPU RAM consumption is around 1.3 GB which probably means the model and data is mounted on the GPU. I switched from P100 to T4 but the problem still persists.\n\nIs anyone else facing similar issues? Or has resolved this somehow...\n\nThanks!",
    "3179092": "Can you post a code snippet?  We cannot debug without seeing your code",
    "3179232": "Most likely you have a problem with data loading. The trainer is hung and nothing is displayed due to the settings of the environment. Run the code in the local environment. There, most likely errors will begin to be displayed. Or try to somehow configure the data display.",
    "3179272": "So I tried running the notebook again today having made no changes and it ran. It also displayed an error first which upon correction trained the entire model smoothly. Not sure why the notebook refused to throw any errors earlier...."
  },
  "source": "meta"
}