Skip to content

Conversation

@itallix
Copy link
Contributor

@itallix itallix commented Nov 25, 2025

Summary

  • Pipeline, PipelineView
  • ModelRevision, ModelView

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)

@itallix itallix requested a review from a team as a code owner November 25, 2025 12:19
Copilot AI review requested due to automatic review settings November 25, 2025 12:19
@itallix itallix linked an issue Nov 25, 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 Nov 25, 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 introduces service layer entities for pipelines and model revisions, moving them from the schemas layer to the models layer. This refactoring centralizes domain entities and removes redundant mapper classes.

Key Changes:

  • Created Pipeline and ModelRevision entities in the models layer with validation logic
  • Moved PipelineStatus and TrainingStatus enums to the models layer
  • Replaced mapper classes with direct model_validate() calls for entity conversion
  • Introduced API-specific view schemas (PipelineView, ModelView) that adapt service layer entities for API responses

Reviewed changes

Copilot reviewed 32 out of 33 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
app/models/pipeline.py New service layer entity for Pipeline with status validation
app/models/model_revision.py New service layer entity for ModelRevision with training information
app/models/data_collection_policy.py Moved data collection policy models from schemas to models layer
app/api/schemas/pipeline.py New API view schema for Pipeline responses with serialization alias
app/api/schemas/model.py Converted to API view schema, removed duplicate entity definitions
app/services/pipeline_service.py Updated to use Pipeline entity and removed PipelineMapper dependency
app/services/model_service.py Updated to use ModelRevision entity and removed ModelRevisionMapper
app/services/mappers/pipeline_mapper.py Removed redundant mapper class
app/services/mappers/model_revision_mapper.py Removed redundant mapper class
tests/integration/project_factory.py Enhanced factory to support pipeline configuration with IDs
tests/integration/conftest.py Added explicit IDs to test fixtures for consistency
tests/unit/routers/test_*.py Updated imports to use new entity locations
tests/integration/services/test_*.py Updated to use new entities and enhanced test factory

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

@github-actions
Copy link

github-actions bot commented Nov 25, 2025

Docker Image Sizes

CPU

Image Size
geti-tune-cpu:pr-5032 3.6G
geti-tune-cpu:sha-d96fefc 3.6G

GPU

Image Size
geti-tune-gpu:pr-5032 10.6G
geti-tune-gpu:sha-d96fefc 10.6G

XPU

Image Size
geti-tune-xpu:pr-5032 8.7G
geti-tune-xpu:sha-d96fefc 8.7G

@github-actions
Copy link

github-actions bot commented Nov 25, 2025

📊 Test coverage report

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

@leoll2 leoll2 linked an issue Nov 26, 2025 that may be closed by this pull request
@itallix itallix added this pull request to the merge queue Nov 27, 2025
Merged via the queue into develop with commit f5baafa Nov 27, 2025
31 checks passed
@itallix itallix deleted the vitalii/4986-refactor-pipeline-service-layer branch November 27, 2025 09:26
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.

Introduce Pipeline service layer entities Introduce Model service layer entities

3 participants