-
Notifications
You must be signed in to change notification settings - Fork 459
Inference device management #5058
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: develop
Are you sure you want to change the base?
Conversation
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 device selection functionality for inference pipelines, allowing users to specify which hardware device (CPU, XPU, or CUDA) should be used for model inference.
- Adds device validation to ensure selected devices are available on the system
- Implements device configuration in pipeline settings with proper validation and event emission
- Adds comprehensive test coverage for device validation logic
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| application/backend/app/models/pipeline.py | Adds device field with regex pattern validation |
| application/backend/app/db/schema.py | Adds device column to pipelines table |
| application/backend/app/alembic/versions/2786b50eb5a4_schema.py | Migration to add device column with default value |
| application/backend/app/api/schemas/pipeline.py | Adds device field to API schema with description |
| application/backend/app/api/routers/pipelines.py | Adds device validation before pipeline updates |
| application/backend/app/services/pipeline_service.py | Persists device field and emits device change events |
| application/backend/app/services/event/event_bus.py | Adds DEVICE_CHANGED event type |
| application/backend/app/services/system_service.py | Implements validate_device method to check device availability |
| application/backend/tests/unit/services/test_system_service.py | Adds comprehensive tests for device validation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
📊 Test coverage report
|
Docker Image SizesCPU
GPU
XPU
|
…device string parsing
Summary
Adds inference device selection to pipeline configuration.
How to test
PATCH /api/projects/{project_id}/pipelinewith {"device": "xpu"} in the body.Checklist