-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Problem
The YOLO plugin has 70+ occurrences of hardcoded "cpu" as the default device parameter. This causes the plugin to run on CPU even when the config file (models.yaml) specifies device: "cuda".
Locations affected:
plugin.py- Tool function defaults, manifest schema defaultsinference/*.py- All detection/tracking functionsvideo/*.py- All video processing functionsutils/team.py- Team classification
Current workaround:
The run_tool() method now reads from config, but if someone calls the underlying functions directly, they'll still get CPU.
Proposed Solution
-
Add a CI check to prevent new hardcoded
"cpu"defaults:- Create a script that scans for
device: str = "cpu"patterns - Fail CI if found outside of config fallback
- Create a script that scans for
-
Refactor to use config throughout:
- Create a
get_default_device()helper inconfigs/__init__.py - Replace all
device: str = "cpu"withdevice: str = get_default_device()
- Create a
-
Document the pattern:
- Add to plugin development guide
- Ensure all plugins follow the same pattern
Impact
- GPU acceleration not working by default on GPU-enabled systems
- Performance degradation on Kaggle/Colab where GPU is expected
- Confusing UX when config file is ignored
Priority
High - Affects core functionality (GPU vs CPU inference)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels