Skip to content

Conversation

itallix
Copy link
Contributor

@itallix itallix commented Sep 22, 2025

Summary

This PR updates the existing model endpoints to include the project ID. Additionally, it introduces a skeleton for the model labels snapshot endpoint.

Note:
This PR should be merged after #4672 and the base branch should be updated to develop before merging.

How to test

  1. Run the server with ./run.sh
  2. The following APIs should work:
# Get available model revisions from the project
curl localhost:7860/api/projects/9d6af8e8-6017-4ebe-9126-33aae739c5fa/models
# Get details about project model revision
curl localhost:7860/api/projects/9d6af8e8-6017-4ebe-9126-33aae739c5fa/models/977eeb18-eaac-449d-bc80-e340fbe052ad
# Delete model revision
curl -X DELETE localhost:7860/api/projects/9d6af8e8-6017-4ebe-9126-33aae739c5fa/models/977eeb18-eaac-449d-bc80-e340fbe052ad

Checklist

  • I have added unit tests to cover my changes.​
  • I have added integration tests to cover my changes.​
  • I have ran e2e tests and there is no issues.
  • I have added the description of my changes into CHANGELOG in my target branch (e.g., CHANGELOG in develop).​
  • I have updated the documentation in my target branch accordingly (e.g., documentation in develop).
  • I have linked related issues.

License

  • I submit my code changes under the same Apache License that covers the project.
    Feel free to contact the maintainers if that's a concern.
  • I have updated the license header for each file (see an example below).
# Copyright (C) 2025 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

@github-actions github-actions bot added TEST Any changes in tests Geti Tune Backend Issues related to Geti Tune Studio backend labels Sep 22, 2025
@itallix itallix requested review from Copilot and removed request for warrkan, A-Artemis and leoll2 September 22, 2025 12:04
Copy link
Contributor

@Copilot 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 updates the model endpoints to include project ID as a required parameter and introduces a skeleton for a model labels endpoint. The changes refactor the model service to work within project contexts rather than globally.

  • Updates all model endpoints to require project ID and validates project existence
  • Adds a new skeleton endpoint for retrieving model labels
  • Refactors model service methods to accept project ID parameter

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
backend/app/api/endpoints/models.py Updates endpoints to include project ID in URLs and adds model labels skeleton endpoint
backend/app/services/model_service.py Refactors service methods to accept project ID and validate project existence
backend/app/repositories/base.py Adds exists() method for checking entity existence
backend/app/db/schema.py Adds model_revisions relationship to ProjectDB
backend/app/repositories/label_repo.py Changes constructor parameter order for consistency
backend/app/services/label_service.py Updates LabelRepository instantiation to match new constructor
backend/tests/unit/endpoints/test_models.py Updates tests to include project ID in API calls
backend/tests/integration/services/test_model_service.py Updates integration tests for new service method signatures

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link

github-actions bot commented Sep 22, 2025

Docker Image Sizes

Image Size
geti-tune-pr-4744 1.1G
geti-tune-sha-c837c21 1.1G

Copy link

github-actions bot commented Sep 22, 2025

📊 Test coverage report

Metric Coverage
Lines 27.9%
Functions 30.5%
Branches 85.8%
Statements 27.9%

@itallix itallix force-pushed the vitalii/4672-model-revisions-db branch from 4ee9a66 to 2a81249 Compare September 22, 2025 12:52
Base automatically changed from vitalii/4672-model-revisions-db to develop September 23, 2025 07:37
@itallix itallix force-pushed the vitalii/4673-model-endpoints-skeleton branch from 583e61f to 9166d22 Compare September 23, 2025 08:03
@itallix itallix linked an issue Sep 23, 2025 that may be closed by this pull request
@github-actions github-actions bot added the Geti Tune UI Issues related to Geti Tune Studio UI label Sep 23, 2025
camiloHimura
camiloHimura previously approved these changes Sep 23, 2025
@itallix itallix requested a review from A-Artemis September 23, 2025 13:42
@itallix itallix requested a review from warrkan September 23, 2025 13:42
jpggvilaca
jpggvilaca previously approved these changes Sep 24, 2025
@itallix itallix merged commit 8f488f8 into develop Sep 24, 2025
28 checks passed
@itallix itallix deleted the vitalii/4673-model-endpoints-skeleton branch September 24, 2025 09:34
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 Geti Tune UI Issues related to Geti Tune Studio UI TEST Any changes in tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create skeleton of get/delete model endpoints
5 participants