-
Notifications
You must be signed in to change notification settings - Fork 462
Add query param for dataset revision to filter models on dataset #5185
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
base: develop
Are you sure you want to change the base?
Conversation
Signed-off-by: Jort Bergfeld <[email protected]>
Signed-off-by: Jort Bergfeld <[email protected]>
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 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_idquery 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.
📊 Test coverage report
|
Docker Image SizesCPU
GPU
XPU
|
Signed-off-by: Jort Bergfeld <[email protected]>
Signed-off-by: Jort Bergfeld <[email protected]>
|
@copilot open a new pull request to apply changes based on the comments in this thread |
|
@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]>
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
dataset_revision_idquery parameter to thelist_modelsendpoint inmodels.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
ModelService.list_modelsmethod to accept an optionaldataset_revision_idparameter and pass it to the repository, filtering models as needed. [1] [2]ModelRevisionRepository.list_allmethod to support filtering model revisions bytraining_dataset_id(corresponding to the dataset revision).Testing Improvements
test_model_service.pyto verify that filtering models bydataset_revision_idreturns only the relevant models. [1] [2]Resolves #5153
How to test
Added integration tests.
Checklist