Spaces:
Configuration error
Configuration error
Kaggle Read-Only File System Fix
Problem
OSError: [Errno 30] Read-only file system: '/kaggle/input/yolo-mpeb-training-code/code/datasets'
Root Cause
In Kaggle:
/kaggle/input/is READ-ONLY (contains your uploaded datasets)/kaggle/working/is WRITABLE (for outputs and temporary files)
The dataset YAML was trying to download/create files in /kaggle/input/, which is not allowed.
Solution
β Fixed Files
dataset_example.yaml- Changed dataset path# Before (WRONG): path: VisDrone # After (CORRECT): path: /kaggle/working/VisDronetrain_kaggle.py- New Kaggle-specific training script- Properly handles Kaggle paths
- Copies files from
/kaggle/input/to/kaggle/working/ - Sets up training in writable directory
kaggle_training_notebook.ipynb- Ready-to-use Kaggle notebook- Complete training workflow
- Validation and testing cells
- Visualization of results
KAGGLE_SETUP.md- Comprehensive setup guide- Step-by-step instructions
- Troubleshooting tips
- Path explanations
How to Use
Option 1: Use the Notebook (Recommended)
- Upload all files to a Kaggle dataset
- Create a new Kaggle notebook
- Add your dataset as input
- Upload
kaggle_training_notebook.ipynb - Run all cells
Option 2: Use the Python Script
- Upload all files to a Kaggle dataset
- Create a new Kaggle notebook
- Run:
import shutil shutil.copy('/kaggle/input/yolo-mpeb-training-code/code/train_kaggle.py', '/kaggle/working/train_kaggle.py') !python /kaggle/working/train_kaggle.py
Key Changes Summary
| File | Change | Reason |
|---|---|---|
dataset_example.yaml |
path: VisDrone β path: /kaggle/working/VisDrone |
Use writable directory |
train_kaggle.py |
New file | Kaggle-specific paths and setup |
kaggle_training_notebook.ipynb |
New file | Easy-to-use notebook template |
KAGGLE_SETUP.md |
New file | Documentation and troubleshooting |
Verification
After the fix, training should start successfully:
Ultralytics 8.3.239 π Python-3.11.13 torch-2.6.0+cu124 CUDA:0 (Tesla P100-PCIE-16GB, 16269MiB)
engine/trainer: ...
Downloading VisDrone dataset to /kaggle/working/VisDrone...
Training starting...
Important Notes
- Dataset Download: First run will download ~2.3 GB VisDrone dataset
- Training Time: ~6-8 hours on Tesla P100
- Save Outputs: Download weights before closing notebook
- GPU Required: Enable GPU in Kaggle settings
Files to Upload to Kaggle Dataset
Upload these files to your Kaggle dataset:
- β
yolov8_mpeb.yaml- Model architecture - β
yolov8_mpeb_modules.py- Custom modules - β
dataset_example.yaml- Dataset config (FIXED) - β
train_kaggle.py- Training script (NEW)
Quick Test
To verify the fix works, run this in a Kaggle notebook:
import yaml
with open('/kaggle/input/yolo-mpeb-training-code/code/dataset_example.yaml') as f:
config = yaml.safe_load(f)
print(f"Dataset path: {config['path']}")
# Should print: /kaggle/working/VisDrone
Support
If you still get errors:
- Check that dataset path is
/kaggle/working/VisDrone - Verify GPU is enabled
- Ensure all files are in your Kaggle dataset
- Check the KAGGLE_SETUP.md for detailed troubleshooting