-
Notifications
You must be signed in to change notification settings - Fork 459
Introduce Pipeline service layer entities #5032
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
Introduce Pipeline service layer entities #5032
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 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
PipelineandModelRevisionentities in the models layer with validation logic - Moved
PipelineStatusandTrainingStatusenums 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.
Docker Image SizesCPU
GPU
XPU
|
📊 Test coverage report
|
Summary
Pipeline,PipelineViewModelRevision,ModelViewChecklist