-
Notifications
You must be signed in to change notification settings - Fork 0
Scripts for traning yolo object detection #28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…ge-processing into 13-traning-on-idun
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds training scripts and configurations for running YOLO and U-Net models on the Idun cluster, while restructuring the project to support multiple model training workflows.
Key Changes:
- Added new training directories with scripts for YOLO and U-Net models
- Created SLURM job configurations for GPU-based training on the Idun cluster
- Updated CI/CD workflows to reference the new requirements.txt location
Reviewed Changes
Copilot reviewed 11 out of 13 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| yolo_roboflow_training/train.py | Training script for YOLO model using Roboflow datasets |
| yolo_roboflow_training/requirements.txt | Python dependencies for YOLO training |
| yolo_roboflow_training/Job.slurm | SLURM configuration for YOLO training jobs |
| unet_roboflow_training/train.py | Training script for U-Net segmentation model |
| unet_roboflow_training/test.py | Inference script for testing trained U-Net models |
| unet_roboflow_training/requirements.txt | Python dependencies for U-Net training |
| unet_roboflow_training/Job.slurm | SLURM configuration for U-Net training jobs |
| YOLO-detect-buoys/requirements.txt | Moved requirements file to project directory |
| YOLO-detect-buoys/main.py | Updated to use Unix-style paths and added model export |
| YOLO-detect-buoys/Job.slurm | SLURM configuration for buoy detection training |
| .github/workflows/pylint.yml | Updated to reference new requirements.txt location |
Comments suppressed due to low confidence (2)
YOLO-detect-buoys/Job.slurm:1
- Invalid SLURM time format '999:99:99'. The time format should be DD-HH:MM:SS, HH:MM:SS, or MM:SS with valid values (e.g., hours 0-23, minutes/seconds 0-59).
YOLO-detect-buoys/Job.slurm:1 - The script references 'train.py' but the main entry point in this directory is 'main.py'. This should be 'python3 main.py' or 'python3 -m YOLO-detect-buoys'.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
for more information, see https://pre-commit.ci
f207b2e to
562d266
Compare
…nd quality of life
…moved to another repository
…ore consistent with other folder
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 17 out of 25 changed files in this pull request and generated 9 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 17 out of 25 changed files in this pull request and generated 8 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 19 out of 29 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| print("CUDA version:", torch.version.cuda) | ||
| print("cuDNN version:", torch.backends.cudnn.version()) | ||
| print("Using GPU:", torch.cuda.get_device_name(0)) |
Copilot
AI
Jan 8, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line 29 calls torch.cuda.get_device_name(0) without checking if GPU 0 exists. If the system has GPUs but not at index 0, or CUDA_VISIBLE_DEVICES is set differently, this could fail with an IndexError. Consider using torch.cuda.get_device_name(DEVICE) or checking the device count first.
| print("Using GPU:", torch.cuda.get_device_name(0)) | |
| device_count = torch.cuda.device_count() | |
| if isinstance(DEVICE, int) and 0 <= DEVICE < device_count: | |
| print("Using GPU:", torch.cuda.get_device_name(DEVICE)) | |
| else: | |
| print("Using CUDA device configuration:", DEVICE) |
Uh oh!
There was an error while loading. Please reload this page.