-
Notifications
You must be signed in to change notification settings - Fork 459
Download model weights #5059
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?
Download model weights #5059
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 functionality to download trained model weights as a zip archive through a new API endpoint. The endpoint retrieves OpenVINO model files (model.xml and model.bin) and packages them into a downloadable zip file with FP16 precision naming.
Key changes:
- New
/api/projects/{project_id}/models/{model_id}/binaryendpoint for downloading model weights - Service method to retrieve and validate model file paths
- Comprehensive test coverage for success, not found, and invalid ID scenarios
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| application/backend/app/api/routers/models.py | Implements the new download endpoint with zip file creation and streaming response |
| application/backend/app/services/model_service.py | Adds get_model_files_path method to locate and validate model files |
| application/backend/tests/unit/routers/test_models.py | Adds three test cases covering successful download, not found error, and invalid ID scenarios |
| application/backend/app/db_seeder.py | Changes pipeline's is_running status from True to False |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
📊 Test coverage report
|
Docker Image SizesCPU
GPU
XPU
|
Summary
Added endpoint to download model weights as a zip archive
How to test
"GET /api/projects/9d6af8e8-6017-4ebe-9126-33aae739c5fa/models/977eeb18-eaac-449d-bc80-e340fbe052ad/binary HTTP/1.0" 200Checklist