Skip to content

Conversation

@A-Artemis
Copy link
Contributor

@A-Artemis A-Artemis commented Dec 4, 2025

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" 200

Checklist

  • The PR title and description are clear and descriptive
  • I have manually tested the changes
  • All changes are covered by automated tests
  • All related issues are linked to this PR (if applicable)
  • Documentation has been updated (if applicable)

@A-Artemis A-Artemis self-assigned this Dec 4, 2025
@A-Artemis A-Artemis requested a review from a team as a code owner December 4, 2025 10:20
Copilot AI review requested due to automatic review settings December 4, 2025 10:20
@A-Artemis A-Artemis linked an issue Dec 4, 2025 that may be closed by this pull request
@github-actions github-actions bot added TEST Any changes in tests Geti Tune Backend Issues related to Geti Tune Studio backend labels Dec 4, 2025
Copy link
Contributor

Copilot AI left a 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}/binary endpoint 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.

@github-actions
Copy link

github-actions bot commented Dec 4, 2025

📊 Test coverage report

Metric Coverage
Lines 40.2%
Functions 34.9%
Branches 84.8%
Statements 40.2%

@github-actions
Copy link

github-actions bot commented Dec 4, 2025

Docker Image Sizes

CPU

Image Size
geti-tune-cpu:pr-5059 2.80G
geti-tune-cpu:sha-39d9912 2.80G

GPU

Image Size
geti-tune-gpu:pr-5059 10.61G
geti-tune-gpu:sha-39d9912 10.61G

XPU

Image Size
geti-tune-xpu:pr-5059 8.63G
geti-tune-xpu:sha-39d9912 8.63G

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Geti Tune Backend Issues related to Geti Tune Studio backend TEST Any changes in tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add endpoint to download model weights

3 participants