Skip to content

Conversation

@JortBergfeld
Copy link
Contributor

This pull request introduces the ability to filter models by dataset revision in the API, service, and repository layers. It also adds an integration test to verify this new functionality. The main changes are grouped below:

API and Schema Enhancements

  • Added an optional dataset_revision_id query parameter to the list_models endpoint in models.py, allowing clients to filter models by a specific dataset revision. The endpoint and its docstring were updated accordingly. [1] [2]

Service and Repository Layer Updates

  • Modified the ModelService.list_models method to accept an optional dataset_revision_id parameter and pass it to the repository, filtering models as needed. [1] [2]
  • Updated the ModelRevisionRepository.list_all method to support filtering model revisions by training_dataset_id (corresponding to the dataset revision).

Testing Improvements

  • Added an integration test in test_model_service.py to verify that filtering models by dataset_revision_id returns only the relevant models. [1] [2]

Resolves #5153

How to test

Added integration tests.

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)

@JortBergfeld JortBergfeld requested a review from a team as a code owner January 14, 2026 09:30
Copilot AI review requested due to automatic review settings January 14, 2026 09:30
@github-actions github-actions bot added TEST Any changes in tests Geti Tune Backend Issues related to Geti Tune backend labels Jan 14, 2026
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 the ability to filter models by dataset revision when listing models in a project. The change enables API consumers to retrieve only models trained on a specific dataset revision rather than all models in a project.

Changes:

  • Added optional dataset_revision_id query parameter to the models listing endpoint
  • Extended service and repository layers to support filtering by training dataset ID
  • Added integration test to verify the filtering behavior

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
application/backend/app/api/routers/models.py Added optional dataset_revision_id query parameter to list_models endpoint
application/backend/app/services/model_service.py Updated list_models method signature to accept and pass through dataset_revision_id filter
application/backend/app/repositories/model_revision_repo.py Modified list_all to support filtering by training_dataset_id
application/backend/tests/integration/services/test_model_service.py Added integration test verifying dataset revision filtering returns correct models

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link

github-actions bot commented Jan 14, 2026

📊 Test coverage report

Metric Coverage
Lines 37.3%
Functions 33.4%
Branches 85.9%
Statements 37.3%

@github-actions
Copy link

github-actions bot commented Jan 14, 2026

Docker Image Sizes

CPU

Image Size
geti-tune-cpu:pr-5185 2.88G
geti-tune-cpu:sha-fa0b598 2.88G

GPU

Image Size
geti-tune-gpu:pr-5185 10.66G
geti-tune-gpu:sha-fa0b598 10.66G

XPU

Image Size
geti-tune-xpu:pr-5185 8.72G
geti-tune-xpu:sha-fa0b598 8.72G

Signed-off-by: Jort Bergfeld <[email protected]>
@JortBergfeld
Copy link
Contributor Author

@copilot open a new pull request to apply changes based on the comments in this thread

Copy link

Copilot AI commented Jan 14, 2026

@JortBergfeld I've opened a new pull request, #5187, to work on those changes. Once the pull request is ready, I'll request review from you.

…leanup (#5187)

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: JortBergfeld <[email protected]>
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 backend TEST Any changes in tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add parameter to filter models by dataset revision

3 participants