-
Notifications
You must be signed in to change notification settings - Fork 846
feat(inspect): add training device selection #3056
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
feat(inspect): add training device selection #3056
Conversation
Signed-off-by: Ma, Xiangxiang <xiangxiang.ma@intel.com>
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 support for training jobs by introducing separate endpoints for querying inference and training devices, and extending the training job payload to accept an optional device parameter.
- New endpoints for querying available inference and training devices
- Training jobs can now specify device via payload
- Removed deprecated
/models/supported-devicesendpoint
Reviewed Changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| application/backend/src/utils/devices.py | New utility module for querying available inference and training devices |
| application/backend/src/pydantic_models/devices.py | New model for device list responses |
| application/backend/src/api/endpoints/devices_endpoints.py | New endpoints for inference and training device queries |
| application/backend/src/pydantic_models/job.py | Added optional device field to TrainJobPayload |
| application/backend/src/services/training_service.py | Updated training logic to accept and use device parameter |
| application/backend/src/services/model_service.py | Removed get_supported_devices method and related imports |
| application/backend/src/pydantic_models/model.py | Removed SupportedDevices model |
| application/backend/src/api/endpoints/model_endpoints.py | Removed supported-devices endpoint |
| application/backend/src/main.py | Added device_router to application |
| application/backend/src/core/logging/setup.py | Removed redundant global declaration |
| application/backend/tests/unit/services/test_training_service.py | Updated mock to accept device parameter |
| application/backend/tests/unit/services/test_pipeline_service.py | Added train_job_id to test model fixture |
| application/backend/tests/unit/endpoints/test_models.py | Added train_job_id to test model fixture |
| application/backend/tests/unit/conftest.py | Added device field to job payload fixture and train_job_id to model fixture |
Comments suppressed due to low confidence (1)
application/backend/src/api/endpoints/model_endpoints.py:1
- The endpoint path ':supported-devices' uses POST method but appears to be a read-only operation. The original implementation likely should have used GET method instead of POST.
# Copyright (C) 2025 Intel Corporation
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Signed-off-by: Ma, Xiangxiang <xiangxiang.ma@intel.com>
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 14 out of 14 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Signed-off-by: Ma, Xiangxiang <xiangxiang.ma@intel.com>
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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 15 out of 15 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
701aca5
into
open-edge-platform:feature/geti-inspect
* add training device selection Signed-off-by: Ma, Xiangxiang <xiangxiang.ma@intel.com> * fix style Signed-off-by: Ma, Xiangxiang <xiangxiang.ma@intel.com> * improve error handling Signed-off-by: Ma, Xiangxiang <xiangxiang.ma@intel.com> * reset uv lock * refactor device names Signed-off-by: Ma, Xiangxiang <xiangxiang.ma@intel.com> --------- Signed-off-by: Ma, Xiangxiang <xiangxiang.ma@intel.com>
* add training device selection Signed-off-by: Ma, Xiangxiang <xiangxiang.ma@intel.com> * fix style Signed-off-by: Ma, Xiangxiang <xiangxiang.ma@intel.com> * improve error handling Signed-off-by: Ma, Xiangxiang <xiangxiang.ma@intel.com> * reset uv lock * refactor device names Signed-off-by: Ma, Xiangxiang <xiangxiang.ma@intel.com> --------- Signed-off-by: Ma, Xiangxiang <xiangxiang.ma@intel.com>
📝 Description
/models/supported-devicesendpoint)✨ Changes
Select what type of change your PR is:
✅ Checklist
Before you submit your pull request, please make sure you have completed the following steps:
For more information about code review checklists, see the Code Review Checklist.