- Newest
- Most votes
- Most comments
I apologize for the frustration you're experiencing with this error. The "No space left on device" error you're encountering is not likely related to the overall storage capacity of your instance, but rather to how the space is being utilized during the training process.
This error typically occurs when a specific filesystem or partition runs out of space, even if there's plenty of storage available elsewhere on the system. In your case, it appears that the root filesystem (/) is filling up during the training process.
Here are a few potential solutions to consider:
-
Check disk usage: Run "df -h" to see which partitions are full. It's possible that temporary files or logs are filling up a specific partition.
-
Clean up unnecessary files: Remove any large, unnecessary files or old Docker images/containers that might be taking up space.
-
Adjust partition sizes: If possible, resize partitions to allocate more space to the root filesystem.
-
Use a different directory: Try changing the working directory for your training process to a partition with more available space, such as /home or /tmp.
-
Monitor disk usage during training: Add logging to track disk usage as the training progresses to identify where the space is being consumed.
-
Optimize your training pipeline: Look for ways to reduce disk usage in your training process, such as processing data in smaller batches or cleaning up temporary files more aggressively.
-
Consider using Amazon EFS: If the issue persists, you might want to consider using Amazon Elastic File System (EFS) for your training data and output, which provides scalable storage separate from your instance's local storage.
If none of these solutions work, you may need to reach out to AWS support for more detailed troubleshooting specific to your setup and the Llama 3.1 8B model training process.
Sources
AWS CodeBuild Failed with Error: no space left on device | AWS re:Post
"Cannot write: No space left on device" error even though there is storage available | AWS re:Post
No space left on device when deploy ECS Fargate Service with CDK | AWS re:Post
answered 2 years ago
I'd say the most likely cause for this is that your Hugging Face Datasets Cache is defaulting to a folder that's mounted to a small / fixed-size container volume, rather than utilising either the EBS or local NVMe SSD storage of the instance.
To resolve it, you can try explicitly setting the cache dir to somewhere under /tmp or /opt/ml to take advantage of your configured EBS storage space. Here are the folders I used in an older example - in which the code explicitly references the cache_dir config for several operations... Alternatively you could try setting the HF_HOME environment variable on your job as mentioned in the Hugging Face docs for automatic update of all operations - but I haven't tested this myself.
There should be alternative path(s) you could try to leverage the NVMe SSD for the cache instead (for reduced EBS requirement and maybe faster performance), but I'm not sure exactly what they'd be... You could try running a df -h shell command from your Python script at the start of the job and inspecting the logs, to see if you can find those extra mounted folders?
Relevant content
asked a year ago
asked a year ago
